diff --git a/userspace/required_tests.json b/userspace/required_tests.json index 4a38477f3..7f3d4fa7e 100644 --- a/userspace/required_tests.json +++ b/userspace/required_tests.json @@ -354,7 +354,7 @@ "test_level": 0 }, { - "test": "test_setup", + "test": "test_bus_setup", "case": "bus_setup", "unit": "bus", "test_level": 0 @@ -378,7 +378,7 @@ "test_level": 0 }, { - "test": "test_free_reg_space", + "test": "test_bus_free_reg_space", "case": "bus_free_reg_space", "unit": "bus", "test_level": 0 diff --git a/userspace/units/bus/nvgpu-bus.c b/userspace/units/bus/nvgpu-bus.c index 546f4c815..c9061ec67 100644 --- a/userspace/units/bus/nvgpu-bus.c +++ b/userspace/units/bus/nvgpu-bus.c @@ -117,7 +117,7 @@ static struct nvgpu_posix_io_callbacks test_reg_callbacks = { #define NV_PTIMER_START 0x00009000U #define NV_PTIMER_SIZE 0x00000FFFU -int test_setup(struct unit_module *m, struct gk20a *g, void *args) +int test_bus_setup(struct unit_module *m, struct gk20a *g, void *args) { /* Init HAL */ g->ops.bus.init_hw = gk20a_bus_init_hw; @@ -160,7 +160,7 @@ int test_setup(struct unit_module *m, struct gk20a *g, void *args) return UNIT_SUCCESS; } -int test_free_reg_space(struct unit_module *m, struct gk20a *g, void *args) +int test_bus_free_reg_space(struct unit_module *m, struct gk20a *g, void *args) { /* Free register space */ nvgpu_posix_io_delete_reg_space(g, NV_PBUS_START); @@ -312,11 +312,11 @@ int test_isr(struct unit_module *m, struct gk20a *g, void *args) } struct unit_module_test bus_tests[] = { - UNIT_TEST(bus_setup, test_setup, NULL, 0), - UNIT_TEST(bus_init_hw, test_init_hw, NULL, 0), - UNIT_TEST(bus_bar_bind, test_bar_bind, NULL, 0), - UNIT_TEST(bus_isr, test_isr, NULL, 0), - UNIT_TEST(bus_free_reg_space, test_free_reg_space, NULL, 0), + UNIT_TEST(bus_setup, test_bus_setup, NULL, 0), + UNIT_TEST(bus_init_hw, test_init_hw, NULL, 0), + UNIT_TEST(bus_bar_bind, test_bar_bind, NULL, 0), + UNIT_TEST(bus_isr, test_isr, NULL, 0), + UNIT_TEST(bus_free_reg_space, test_bus_free_reg_space, NULL, 0), }; UNIT_MODULE(bus, bus_tests, UNIT_PRIO_NVGPU_TEST); diff --git a/userspace/units/bus/nvgpu-bus.h b/userspace/units/bus/nvgpu-bus.h index 32de7b861..1f7d8734c 100644 --- a/userspace/units/bus/nvgpu-bus.h +++ b/userspace/units/bus/nvgpu-bus.h @@ -33,7 +33,7 @@ struct unit_module; */ /** - * Test specification for: test_setup + * Test specification for: test_bus_setup * * Description: Setup prerequisites for tests. * @@ -50,16 +50,16 @@ struct unit_module; * - UNIT_FAIL if encounters an error creating reg space * - UNIT_SUCCESS otherwise */ -int test_setup(struct unit_module *m, struct gk20a *g, void *args); +int test_bus_setup(struct unit_module *m, struct gk20a *g, void *args); /** - * Test specification for: test_free_reg_space + * Test specification for: test_bus_free_reg_space * - * Description: Free resources from test_setup() + * Description: Free resources from test_bus_setup() * - * Test Type: Other (setup) + * Test Type: Other (cleanup) * - * Input: test_setup() has been executed. + * Input: test_bus_setup() has been executed. * * Steps: * - Free up NV_PBUS, NV_PMC and NV_PTIMER register space. @@ -67,18 +67,18 @@ int test_setup(struct unit_module *m, struct gk20a *g, void *args); * Output: * - UNIT_SUCCESS */ -int test_free_reg_space(struct unit_module *m, struct gk20a *g, void *args); +int test_bus_free_reg_space(struct unit_module *m, struct gk20a *g, void *args); /** * Test specification for: test_init_hw * * Description: Verify the bus.init_hw and bus.configure_debug_bus HAL. * - * Test Type: Feature Based + * Test Type: Feature * * Targets: gk20a_bus_init_hw, gv11b_bus_configure_debug_bus. * - * Input: test_setup() has been executed. + * Input: test_bus_setup() has been executed. * * Steps: * - Initialize the Debug bus related registers to non-zero value. @@ -99,11 +99,11 @@ int test_init_hw(struct unit_module *m, struct gk20a *g, void *args); * * Description: Verify the bus.bar1_bind and bus.bar2_bind HAL. * - * Test Type: Feature Based + * Test Type: Feature, Error injection * * Targets: gm20b_bus_bar1_bind, gp10b_bus_bar2_bind. * - * Input: test_setup() has been executed. + * Input: test_bus_setup() has been executed. * * Steps: * - Initialize cpu_va to a known value (say 0xCE418000U). @@ -134,11 +134,11 @@ int test_bar_bind(struct unit_module *m, struct gk20a *g, void *args); * * Description: Verify the bus.isr HAL. * - * Test Type: Feature Based + * Test Type: Feature, Error injection * * Targets: gk20a_bus_isr * - * Input: test_setup() has been executed. + * Input: test_bus_setup() has been executed. * * Steps: * - Initialize interrupt register bus_intr_0_r() to 0x2(pri_squash)