gpu: nvgpu: unit: Shuffle the paths of tests around a bit

We will need to organize the unit tests in order to keep the
units/ directory managable.

The basic idea here is to mirror the common/ structure in
nvgpu proper under units/. There's one additrion at the
moment though: posix. This is for posix environment related
tests.

Also added a fix for the runlist unit test. Add it to the
tmake sources and move the nvgpu-runlist/ directory to just
runlist/.

Change-Id: I1f4163d0e33c3af70376cfeb3441d277d559e05a
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1935710
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Alex Waterman
2018-10-25 12:48:18 -07:00
committed by mobile promotions
parent 1023c6af14
commit 63da5366a6
31 changed files with 29 additions and 23 deletions

View File

@@ -22,12 +22,13 @@ NV_REPOSITORY_COMPONENTS :=
ifneq ($(NV_BUILD_CONFIGURATION_OS_IS_INTEGRITY),1)
NV_REPOSITORY_COMPONENTS := drivers/gpu/nvgpu
NV_REPOSITORY_COMPONENTS += userspace
NV_REPOSITORY_COMPONENTS += userspace/units/posix-bitops
NV_REPOSITORY_COMPONENTS += userspace/units/posix-env
NV_REPOSITORY_COMPONENTS += userspace/units/posix-mockio
NV_REPOSITORY_COMPONENTS += userspace/units/posix-fault-injection
NV_REPOSITORY_COMPONENTS += userspace/units/nvgpu-pramin
NV_REPOSITORY_COMPONENTS += userspace/units/posix/bitops
NV_REPOSITORY_COMPONENTS += userspace/units/posix/env
NV_REPOSITORY_COMPONENTS += userspace/units/posix/mockio
NV_REPOSITORY_COMPONENTS += userspace/units/posix/fault-injection
NV_REPOSITORY_COMPONENTS += userspace/units/pramin
NV_REPOSITORY_COMPONENTS += userspace/units/mm/nvgpu_allocator
NV_REPOSITORY_COMPONENTS += userspace/units/fifo/runlist
endif
# Local Variables:

View File

@@ -15,6 +15,8 @@ find_first_bit
find_first_zero_bit
find_next_bit
gk20a_bus_set_bar0_window
gk20a_get_ch_runlist_entry
gk20a_get_tsg_runlist_entry
nvgpu_alloc
nvgpu_alloc_base
nvgpu_alloc_common_init
@@ -60,6 +62,8 @@ nvgpu_pramin_memset
nvgpu_pramin_rd_n
nvgpu_pramin_wr_n
nvgpu_readl
nvgpu_runlist_construct_locked
nvgpu_rwsem_init
nvgpu_sgt_create_from_mem
nvgpu_usermode_writel
nvgpu_writel

View File

@@ -47,13 +47,13 @@ CORE_HEADERS := \
# Each directory under the UNIT_SRC directory should correspond to one module.
UNITS := \
$(UNIT_SRC)/posix-env \
$(UNIT_SRC)/posix-bitops \
$(UNIT_SRC)/posix-mockio \
$(UNIT_SRC)/posix-fault-injection \
$(UNIT_SRC)/nvgpu-pramin \
$(UNIT_SRC)/posix/env \
$(UNIT_SRC)/posix/bitops \
$(UNIT_SRC)/posix/mockio \
$(UNIT_SRC)/posix/fault-injection \
$(UNIT_SRC)/pramin \
$(UNIT_SRC)/mm/nvgpu_allocator \
$(UNIT_SRC)/fifo/nvgpu-runlist \
$(UNIT_SRC)/fifo/runlist \
$(UNIT_SRC)/list
# A test unit. Not really needed any more...

View File

@@ -23,4 +23,4 @@
OBJS = posix-bitops.o
MODULE = posix-bitops
include ../Makefile.units
include ../../Makefile.units

View File

@@ -14,7 +14,7 @@
NVGPU_UNIT_NAME=posix-bitops
include $(NV_COMPONENT_DIR)/../Makefile.units.common.interface.tmk
include $(NV_COMPONENT_DIR)/../../Makefile.units.common.interface.tmk
# Local Variables:
# indent-tabs-mode: t

View File

@@ -14,7 +14,7 @@
NVGPU_UNIT_NAME=posix-bitops
include $(NV_COMPONENT_DIR)/../Makefile.units.common.tmk
include $(NV_COMPONENT_DIR)/../../Makefile.units.common.tmk
# Local Variables:
# indent-tabs-mode: t

View File

@@ -23,4 +23,4 @@
OBJS = posix-env.o
MODULE = posix-env
include ../Makefile.units
include ../../Makefile.units

View File

@@ -14,7 +14,7 @@
NVGPU_UNIT_NAME=posix-env
include $(NV_COMPONENT_DIR)/../Makefile.units.common.interface.tmk
include $(NV_COMPONENT_DIR)/../../Makefile.units.common.interface.tmk
# Local Variables:
# indent-tabs-mode: t

View File

@@ -14,7 +14,7 @@
NVGPU_UNIT_NAME=posix-env
include $(NV_COMPONENT_DIR)/../Makefile.units.common.tmk
include $(NV_COMPONENT_DIR)/../../Makefile.units.common.tmk
# Local Variables:
# indent-tabs-mode: t

View File

@@ -25,4 +25,4 @@ OBJS = posix-fault-injection.o \
posix-fault-injection-dma-alloc.o
MODULE = posix-fault-injection
include ../Makefile.units
include ../../Makefile.units

View File

@@ -14,7 +14,7 @@
NVGPU_UNIT_NAME=posix-fault-injection
include $(NV_COMPONENT_DIR)/../Makefile.units.common.interface.tmk
include $(NV_COMPONENT_DIR)/../../Makefile.units.common.interface.tmk
# Local Variables:
# indent-tabs-mode: t

View File

@@ -17,7 +17,7 @@ NVGPU_UNIT_SRCS=posix-fault-injection.c \
posix-fault-injection-kmem.c \
posix-fault-injection-dma-alloc.c
include $(NV_COMPONENT_DIR)/../Makefile.units.common.tmk
include $(NV_COMPONENT_DIR)/../../Makefile.units.common.tmk
# Local Variables:
# indent-tabs-mode: t

View File

@@ -26,6 +26,7 @@
#include <nvgpu/dma.h>
#include <nvgpu/nvgpu_mem.h>
#include <nvgpu/posix/posix-fault-injection.h>
#include "posix-fault-injection-dma-alloc.h"
#define TEST_DEFAULT_SIZE 4096

View File

@@ -23,4 +23,4 @@
OBJS = posix-mockio.o
MODULE = posix-mockio
include ../Makefile.units
include ../../Makefile.units

View File

@@ -14,7 +14,7 @@
NVGPU_UNIT_NAME=posix-mockio
include $(NV_COMPONENT_DIR)/../Makefile.units.common.interface.tmk
include $(NV_COMPONENT_DIR)/../../Makefile.units.common.interface.tmk
# Local Variables:
# indent-tabs-mode: t

View File

@@ -14,7 +14,7 @@
NVGPU_UNIT_NAME=posix-mockio
include $(NV_COMPONENT_DIR)/../Makefile.units.common.tmk
include $(NV_COMPONENT_DIR)/../../Makefile.units.common.tmk
# Local Variables:
# indent-tabs-mode: t