gpu: nvgpu: unit: gr: Add more gr unit tests

Rename gr register space allocation and deallocation functions
to test_gr_init_setup and test_gr_remove_setup

Add tests to support following functions
nvgpu_gr_init
nvgpu_gr_init_support
nvgpu_gr_suspend
nvgpu_gr_remove_support

Jira NVGPU-3970

Change-Id: I11418ddcb9946ef75de162fd5689fdbbbfb62e79
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2194612
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
vinodg
2019-09-10 16:26:16 -07:00
committed by Alex Waterman
parent 64ecb8fb60
commit c91822381b
9 changed files with 193 additions and 102 deletions

View File

@@ -35,9 +35,12 @@
#include "../nvgpu-gr.h"
struct unit_module_test nvgpu_gr_init_tests[] = {
UNIT_TEST(init_support, test_gr_init_support, NULL, 0),
UNIT_TEST(init_prepare, test_gr_init_prepare, NULL, 0),
UNIT_TEST(remove_support, test_gr_remove_support, NULL, 0),
UNIT_TEST(gr_init_setup, test_gr_init_setup, NULL, 0),
UNIT_TEST(gr_init_prepare, test_gr_init_prepare, NULL, 0),
UNIT_TEST(gr_init_support, test_gr_init_support, NULL, 0),
UNIT_TEST(gr_suspend, test_gr_suspend, NULL, 0),
UNIT_TEST(gr_remove_support, test_gr_remove_support, NULL, 0),
UNIT_TEST(gr_remove_setup, test_gr_remove_setup, NULL, 0),
};
UNIT_MODULE(nvgpu_gr_init, nvgpu_gr_init_tests, UNIT_PRIO_NVGPU_TEST);