mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: unit: add --driver-load-path arg
Add --driver-load-path option to specify which library to
load for driver.
There is already an --unit-load-path option that can be
used to specify where to load units from.
Example usage:
./nvgpu_unit --nvtest --unit-load-path units/dgpu \
--no-color --num-threads 1 \
--driver-load-path ./libnvgpu-drv-dgpu.so
Jira NVGPU-5217
Change-Id: I6af5d2029138b25a6715154779b812d30052e9e9
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2333498
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Alex Waterman
parent
88d3640bc5
commit
80285be2da
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -37,6 +37,7 @@ static struct option core_opts[] = {
|
||||
{ "nvtest", 0, NULL, 'n' },
|
||||
{ "is-qnx", 0, NULL, 'Q' },
|
||||
{ "unit-load-path", 1, NULL, 'L' },
|
||||
{ "driver-load-path", 1, NULL, 'K' },
|
||||
{ "num-threads", 1, NULL, 'j' },
|
||||
{ "test-level", 1, NULL, 't' },
|
||||
{ "debug", 0, NULL, 'd' },
|
||||
@@ -44,7 +45,7 @@ static struct option core_opts[] = {
|
||||
{ NULL, 0, NULL, 0 }
|
||||
};
|
||||
|
||||
static const char *core_opts_str = "hvqCnQL:j:t:dr:";
|
||||
static const char *core_opts_str = "hvqCnQL:K:j:t:dr:";
|
||||
|
||||
void core_print_help(struct unit_fw *fw)
|
||||
{
|
||||
@@ -69,6 +70,8 @@ void core_print_help(struct unit_fw *fw)
|
||||
" -Q, --is-qnx QNX specific tests\n",
|
||||
" -L, --unit-load-path <PATH>\n",
|
||||
" Path to where the unit test libraries reside.\n",
|
||||
" -K, --driver-load-path <PATH>\n",
|
||||
" Path to driver library.\n",
|
||||
" -j, --num-threads <COUNT>\n",
|
||||
" Number of threads to use while running all tests.\n",
|
||||
" -t, --test-level <LEVEL>\n",
|
||||
@@ -92,6 +95,7 @@ NULL
|
||||
|
||||
static void set_arg_defaults(struct unit_fw_args *args)
|
||||
{
|
||||
args->driver_load_path = DEFAULT_ARG_DRIVER_LOAD_PATH;
|
||||
args->unit_load_path = DEFAULT_ARG_UNIT_LOAD_PATH;
|
||||
args->thread_count = 1;
|
||||
args->test_lvl = TEST_PLAN_MAX;
|
||||
@@ -150,6 +154,9 @@ int core_parse_args(struct unit_fw *fw, int argc, char **argv)
|
||||
case 'L':
|
||||
args->unit_load_path = optarg;
|
||||
break;
|
||||
case 'K':
|
||||
args->driver_load_path = optarg;
|
||||
break;
|
||||
case 'j':
|
||||
args->thread_count = strtol(optarg, NULL, 10);
|
||||
if (args->thread_count == 0) {
|
||||
|
||||
Reference in New Issue
Block a user