From 2f8278adafb68a86d7992feec52f8ea8e40ec177 Mon Sep 17 00:00:00 2001 From: Kent Russell Date: Thu, 6 Jul 2023 13:50:58 -0400 Subject: [PATCH] run_kfdtest.sh: Clarify parameters taking arguments For --node and --exclude, these flags take arguments, but usage was unclear. This led to attempts like --node=1 , which will not work appropriately. Add examples for flags that take parameters, as well as the requirements for those parameters. Also change --exclude parsing to match --node parsing, for consistency Change-Id: I563ba9b370a24d9a84b9c39093f3cb1a5d723cef [ROCm/ROCR-Runtime commit: 1958224379a9939d1edbd577ab4206d29539834d] --- .../tests/kfdtest/scripts/run_kfdtest.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/projects/rocr-runtime/tests/kfdtest/scripts/run_kfdtest.sh b/projects/rocr-runtime/tests/kfdtest/scripts/run_kfdtest.sh index fe60fdb8c2..a850a027c9 100755 --- a/projects/rocr-runtime/tests/kfdtest/scripts/run_kfdtest.sh +++ b/projects/rocr-runtime/tests/kfdtest/scripts/run_kfdtest.sh @@ -91,12 +91,16 @@ printUsage() { "pass on the specified platform. Usually you"\ "don't need this option" echo " -g , --gdb Run in debugger" - echo " -n , --node NodeId to test. If"\ - "not specified test will be run on all nodes" + echo " -n , --node NodeId(s) to test. Takes a single integer, or a"\ + "quoted, space-separated string as an argument"\ + "(e.g. -n 1 OR -n \"1 2 3\")"\ + "NOTE: Node numbers come from /sys/class/kfd/kfd/topology/nodes/#" echo " -l , --list List available nodes" echo " --high Force clocks to high for test execution" echo " -d , --docker Run in docker container" - echo " -e , --exclude Additional tests to exclude, in addition to kfdtest.exclude (colon-separated, single quoted string as an argument)" + echo " -e , --exclude Additional tests to exclude, in addition to kfdtest.exclude."\ + "Takes a colon-separated string as an argument"\ + "(e.g. -e KFDEvictTest.*:KFDSVMEvictTest.*)" echo " -h , --help Prints this help" echo echo "Gtest arguments will be forwarded to the app" @@ -264,7 +268,7 @@ while [ "$1" != "" ]; do -d | --docker ) RUN_IN_DOCKER="true" ;; -e | --exclude ) - ADDITIONAL_EXCLUDE="$2" ; shift ;; + shift 1; ADDITIONAL_EXCLUDE="$1" ;; -h | --help ) printUsage; exit 0 ;; *)