mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: unit: add test levels
Add -t/--test-level option for the unit test framework. This correlates with the test plan levels in GVS. L0 tests are a subset of the L1 tests. Currently, only test levels 0 and 1 are supported. The test output has been updated to display skipped tests. Skipped tests are not included in the test dump. JIRA NVGPU-2251 Change-Id: Icc2ff19a81529be8526e89f70983e96040390e00 Signed-off-by: Philip Elcan <pelcan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2085280 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
f7860833f1
commit
c0d5a715bd
@@ -1160,85 +1160,101 @@ static int test_nvgpu_page_table_c2_full(struct unit_module *m,
|
||||
|
||||
|
||||
struct unit_module_test nvgpu_gmmu_tests[] = {
|
||||
UNIT_TEST(gmmu_init, test_nvgpu_gmmu_init, (void *) 1),
|
||||
UNIT_TEST(gmmu_init, test_nvgpu_gmmu_init, (void *) 1, 0),
|
||||
|
||||
/*
|
||||
* These 2 tests must run first in the order below to avoid caching
|
||||
* issues */
|
||||
UNIT_TEST(map_fail_pd_allocate,
|
||||
test_nvgpu_gmmu_map_unmap_map_fail,
|
||||
(void *) SPECIAL_MAP_FAIL_PD_ALLOCATE),
|
||||
(void *) SPECIAL_MAP_FAIL_PD_ALLOCATE,
|
||||
0),
|
||||
UNIT_TEST(map_fail_pd_allocate_child,
|
||||
test_nvgpu_gmmu_map_unmap_map_fail,
|
||||
(void *) SPECIAL_MAP_FAIL_PD_ALLOCATE_CHILD),
|
||||
(void *) SPECIAL_MAP_FAIL_PD_ALLOCATE_CHILD,
|
||||
0),
|
||||
|
||||
UNIT_TEST(gmmu_map_unmap_iommu_sysmem, test_nvgpu_gmmu_map_unmap,
|
||||
(void *) &test_iommu_sysmem),
|
||||
(void *) &test_iommu_sysmem, 0),
|
||||
UNIT_TEST(gmmu_map_unmap_iommu_sysmem_ro, test_nvgpu_gmmu_map_unmap,
|
||||
(void *) &test_iommu_sysmem_ro),
|
||||
(void *) &test_iommu_sysmem_ro, 0),
|
||||
UNIT_TEST(gmmu_map_unmap_iommu_sysmem_ro_f, test_nvgpu_gmmu_map_unmap,
|
||||
(void *) &test_iommu_sysmem_ro_fixed),
|
||||
(void *) &test_iommu_sysmem_ro_fixed, 0),
|
||||
UNIT_TEST(gmmu_map_unmap_no_iommu_sysmem, test_nvgpu_gmmu_map_unmap,
|
||||
(void *) &test_no_iommu_sysmem),
|
||||
(void *) &test_no_iommu_sysmem, 0),
|
||||
UNIT_TEST(gmmu_map_unmap_vidmem, test_nvgpu_gmmu_map_unmap,
|
||||
(void *) &test_no_iommu_vidmem),
|
||||
(void *) &test_no_iommu_vidmem, 0),
|
||||
UNIT_TEST(gmmu_map_unmap_iommu_sysmem_coh, test_nvgpu_gmmu_map_unmap,
|
||||
(void *) &test_iommu_sysmem_coh),
|
||||
(void *) &test_iommu_sysmem_coh, 0),
|
||||
UNIT_TEST(gmmu_set_pte, test_nvgpu_gmmu_set_pte,
|
||||
(void *) &test_iommu_sysmem),
|
||||
(void *) &test_iommu_sysmem, 0),
|
||||
UNIT_TEST(gmmu_map_unmap_iommu_sysmem_adv_kernel_pages,
|
||||
test_nvgpu_gmmu_map_unmap_adv,
|
||||
(void *) &test_iommu_sysmem_adv),
|
||||
(void *) &test_iommu_sysmem_adv,
|
||||
0),
|
||||
UNIT_TEST(gmmu_map_unmap_iommu_sysmem_adv_big_pages,
|
||||
test_nvgpu_gmmu_map_unmap_adv,
|
||||
(void *) &test_iommu_sysmem_adv_big),
|
||||
(void *) &test_iommu_sysmem_adv_big,
|
||||
0),
|
||||
UNIT_TEST(gmmu_map_unmap_iommu_sysmem_adv_big_pages_offset,
|
||||
test_nvgpu_gmmu_map_unmap_adv,
|
||||
(void *) &test_iommu_sysmem_adv_big_offset),
|
||||
(void *) &test_iommu_sysmem_adv_big_offset,
|
||||
0),
|
||||
UNIT_TEST(gmmu_map_unmap_no_iommu_sysmem_adv_big_pages_offset_large,
|
||||
test_nvgpu_gmmu_map_unmap_adv,
|
||||
(void *) &test_no_iommu_sysmem_adv_big_offset_large),
|
||||
(void *) &test_no_iommu_sysmem_adv_big_offset_large,
|
||||
0),
|
||||
UNIT_TEST(gmmu_map_unmap_iommu_sysmem_adv_small_pages_sparse,
|
||||
test_nvgpu_gmmu_map_unmap_adv,
|
||||
(void *) &test_iommu_sysmem_adv_small_sparse),
|
||||
(void *) &test_iommu_sysmem_adv_small_sparse,
|
||||
0),
|
||||
UNIT_TEST(gmmu_map_unmap_no_iommu_sysmem_noncacheable,
|
||||
test_nvgpu_gmmu_map_unmap,
|
||||
(void *) &test_no_iommu_sysmem_noncacheable),
|
||||
(void *) &test_no_iommu_sysmem_noncacheable,
|
||||
0),
|
||||
UNIT_TEST(gmmu_map_unmap_sgt_iommu_sysmem,
|
||||
test_nvgpu_gmmu_map_unmap,
|
||||
(void *) &test_sgt_iommu_sysmem),
|
||||
(void *) &test_sgt_iommu_sysmem,
|
||||
0),
|
||||
UNIT_TEST(gmmu_map_unmap_iommu_sysmem_adv_ctag,
|
||||
test_nvgpu_gmmu_map_unmap_adv,
|
||||
(void *) &test_iommu_sysmem_adv_ctag),
|
||||
(void *) &test_iommu_sysmem_adv_ctag,
|
||||
0),
|
||||
UNIT_TEST(gmmu_map_unmap_iommu_sysmem_adv_big_pages_batched,
|
||||
test_nvgpu_gmmu_map_unmap_batched,
|
||||
(void *) &test_iommu_sysmem_adv_big),
|
||||
(void *) &test_iommu_sysmem_adv_big,
|
||||
0),
|
||||
UNIT_TEST(gmmu_map_unmap_unmapped, test_nvgpu_gmmu_map_unmap,
|
||||
(void *) &test_no_iommu_unmapped),
|
||||
(void *) &test_no_iommu_unmapped,
|
||||
0),
|
||||
UNIT_TEST(gmmu_map_unmap_iommu_sysmem_adv_sgl_skip,
|
||||
test_nvgpu_gmmu_map_unmap_adv,
|
||||
(void *) &test_iommu_sysmem_sgl_skip),
|
||||
(void *) &test_iommu_sysmem_sgl_skip,
|
||||
0),
|
||||
UNIT_TEST(map_fail_fi_null_sgt,
|
||||
test_nvgpu_gmmu_map_unmap_map_fail,
|
||||
(void *) SPECIAL_MAP_FAIL_FI_NULL_SGT),
|
||||
(void *) SPECIAL_MAP_FAIL_FI_NULL_SGT,
|
||||
0),
|
||||
UNIT_TEST(map_fail_fi_vm_alloc,
|
||||
test_nvgpu_gmmu_map_unmap_map_fail,
|
||||
(void *) SPECIAL_MAP_FAIL_VM_ALLOC),
|
||||
(void *) SPECIAL_MAP_FAIL_VM_ALLOC,
|
||||
0),
|
||||
UNIT_TEST(init_page_table_fail,
|
||||
test_nvgpu_gmmu_init_page_table_fail,
|
||||
NULL),
|
||||
NULL,
|
||||
0),
|
||||
|
||||
/*
|
||||
* Requirement verification tests.
|
||||
*/
|
||||
UNIT_TEST_REQ("NVGPU-RQCD-45.C1", PAGE_TABLE_REQ1_UID, "V4",
|
||||
req_multiple_alignments, test_nvgpu_page_table_c1_full,
|
||||
NULL),
|
||||
NULL, 0),
|
||||
UNIT_TEST_REQ("NVGPU-RQCD-45.C2", PAGE_TABLE_REQ1_UID, "V4",
|
||||
req_fixed_address, test_nvgpu_page_table_c2_full,
|
||||
NULL),
|
||||
NULL, 0),
|
||||
|
||||
UNIT_TEST(gmmu_clean, test_nvgpu_gmmu_clean, NULL),
|
||||
UNIT_TEST(gmmu_clean, test_nvgpu_gmmu_clean, NULL, 0),
|
||||
};
|
||||
|
||||
UNIT_MODULE(page_table, nvgpu_gmmu_tests, UNIT_PRIO_NVGPU_TEST);
|
||||
|
||||
Reference in New Issue
Block a user