summaryrefslogtreecommitdiff
path: root/tools/testing/selftests
diff options
context:
space:
mode:
authorLogan Gunthorpe <logang@deltatee.com>2019-01-09 12:22:33 -0700
committerJon Mason <jdmason@kudzu.us>2019-03-21 15:50:46 -0400
commit6202b3c150bc1067b058d8327894016cfacadbd5 (patch)
tree219204a3c862bf8553c28754fc03302d338aac6c /tools/testing/selftests
parentea7e933d5c08804c8859f97a0acf207c24cf4fcd (diff)
downloadlinux-next-6202b3c150bc1067b058d8327894016cfacadbd5.tar.gz
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/testing/selftests')
-rwxr-xr-xtools/testing/selftests/ntb/ntb_test.sh2
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 08cbfbbc7029..17ca36403d04 100755
--- a/tools/testing/selftests/ntb/ntb_test.sh
+++ b/tools/testing/selftests/ntb/ntb_test.sh
@@ -250,7 +250,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)