diff options
author | Logan Gunthorpe <logang@deltatee.com> | 2019-01-09 22:22:33 +0300 |
---|---|---|
committer | Jon Mason <jdmason@kudzu.us> | 2020-06-06 03:02:09 +0300 |
commit | 2130c0ba69d69bb21f5c52787f2587db00d13d8a (patch) | |
tree | aae98df83f489744850ec9bc5d6459322ee3a710 /tools | |
parent | 34d8673a01b053b6231a995a4eec9341163d63be (diff) | |
download | linux-2130c0ba69d69bb21f5c52787f2587db00d13d8a.tar.xz |
NTB: ntb_test: Fix bug when counting remote files
When remote files are counted in get_files_count, without using SSH,
the code returns 0 because there is a colon prepended to $LOC. $VPATH
should have been used instead of $LOC.
Fixes: 06bd0407d06c ("NTB: ntb_test: Update ntb_tool Scratchpad tests")
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Acked-by: Allen Hubbe <allenbh@gmail.com>
Tested-by: Alexander Fomichev <fomichev.ru@gmail.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/testing/selftests/ntb/ntb_test.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/ntb/ntb_test.sh b/tools/testing/selftests/ntb/ntb_test.sh index 9c60337317c6..020137b61407 100755 --- a/tools/testing/selftests/ntb/ntb_test.sh +++ b/tools/testing/selftests/ntb/ntb_test.sh @@ -241,7 +241,7 @@ function get_files_count() split_remote $LOC if [[ "$REMOTE" == "" ]]; then - echo $(ls -1 "$LOC"/${NAME}* 2>/dev/null | wc -l) + echo $(ls -1 "$VPATH"/${NAME}* 2>/dev/null | wc -l) else echo $(ssh "$REMOTE" "ls -1 \"$VPATH\"/${NAME}* | \ wc -l" 2> /dev/null) |