From 30a2e7967c43cbce009b8beace4c285cf8a2a284 Mon Sep 17 00:00:00 2001 From: Vedashree Vidwans Date: Tue, 26 May 2020 09:51:07 -0700 Subject: [PATCH] gpu: nvgpu: unit: modify linux driver load path Currently, nvgpu unit test framework tries to load libnvgpu-drv-igpu.so file from userspace for all OSes. However, in Linux, driver file is generated at userspace/build path. This results in execution failure on host. Modify __DEFAULT_ARG_DRIVER_LOAD_PATH for linux/posix. JIRA NVGPU-4666 Change-Id: I2594947b868f8fd95c032e2c0bacecc9226d0b59 Signed-off-by: Vedashree Vidwans Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2350630 Reviewed-by: automaticguardword Reviewed-by: Alex Waterman Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions --- userspace/include/unit/args.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/userspace/include/unit/args.h b/userspace/include/unit/args.h index 4e2cf9037..6b63fe5e7 100644 --- a/userspace/include/unit/args.h +++ b/userspace/include/unit/args.h @@ -32,8 +32,12 @@ #define stringify(x) __stringify(x) #ifndef __DEFAULT_ARG_DRIVER_LOAD_PATH +#if defined(__NVGPU_POSIX__) +#define __DEFAULT_ARG_DRIVER_LOAD_PATH ./build/libnvgpu-drv-igpu.so +#else #define __DEFAULT_ARG_DRIVER_LOAD_PATH ./libnvgpu-drv-igpu.so #endif +#endif #define DEFAULT_ARG_DRIVER_LOAD_PATH stringify(__DEFAULT_ARG_DRIVER_LOAD_PATH) #ifndef __DEFAULT_ARG_UNIT_LOAD_PATH