From a987a244c227d5130995999172598d768317efae Mon Sep 17 00:00:00 2001 From: shashank singh Date: Mon, 17 Feb 2020 14:30:37 +0530 Subject: [PATCH] gpu: nvgpu: add test type for boundary values checks in SWUTs -Allow only usermode submit, check for gpfifo max size. -Map buffer offset must be page aligned and in multiple of page size. -Check for unmapped address whether it's alloced or not. -Offset in alloc space must be multiple of page size. -Free space offset must be in the range of alloced space. Jira NVGPU-4470 Change-Id: I9d5e4eb121d6d462f8b8d17b31c839b34d7d6c1d Signed-off-by: shashank singh Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2298188 Reviewed-by: Vaibhav Kachore Reviewed-by: mobile promotions Tested-by: mobile promotions GVS: Gerrit_Virtual_Submit --- userspace/units/fifo/channel/nvgpu-channel.h | 2 +- userspace/units/mm/vm/vm.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/userspace/units/fifo/channel/nvgpu-channel.h b/userspace/units/fifo/channel/nvgpu-channel.h index 7867d0281..8d1d39eee 100644 --- a/userspace/units/fifo/channel/nvgpu-channel.h +++ b/userspace/units/fifo/channel/nvgpu-channel.h @@ -143,7 +143,7 @@ int test_channel_close(struct unit_module *m, struct gk20a *g, void *vargs); * * Description: Branch coverage for nvgpu_channel_setup_bind. * - * Test Type: Feature, Error injection + * Test Type: Feature, Error injection, Boundary values * * Targets: nvgpu_channel_setup_bind, nvgpu_channel_setup_usermode, * nvgpu_channel_as_bound, nvgpu_channel_update_runlist diff --git a/userspace/units/mm/vm/vm.h b/userspace/units/mm/vm/vm.h index de05bfb7d..468109c2f 100644 --- a/userspace/units/mm/vm/vm.h +++ b/userspace/units/mm/vm/vm.h @@ -38,7 +38,7 @@ struct unit_module; * Description: The VM unit shall be able to map a buffer of memory such that * the GPU may access that memory. * - * Test Type: Feature + * Test Type: Feature, Boundary values * * Targets: nvgpu_vm_init, nvgpu_vm_get_buffers, nvgpu_big_pages_possible, * nvgpu_vm_area_alloc, nvgpu_vm_map, nvgpu_vm_find_mapped_buf_range, @@ -87,7 +87,7 @@ int test_map_buf(struct unit_module *m, struct gk20a *g, void *__args); * function the resulting GPU virtual address of the map does/does not match * the requested GPU virtual address. * - * Test Type: Feature + * Test Type: Feature, Boundary values * * Targets: nvgpu_vm_init, nvgpu_vm_get_buffers, nvgpu_big_pages_possible, * nvgpu_vm_area_alloc, nvgpu_vm_map, nvgpu_vm_find_mapped_buf_range, @@ -346,7 +346,7 @@ int test_vm_aspace_id(struct unit_module *m, struct gk20a *g, void *__args); * Description: This test targets the nvgpu_vm_area_validate_buffer and * nvgpu_vm_area_alloc APIs. * - * Test Type: Feature, Error injection + * Test Type: Feature, Error injection, Boundary values * * Targets: nvgpu_vm_area_validate_buffer, nvgpu_vm_area_alloc, * nvgpu_vm_area_free