Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Logan Gunthorpe and committed by
Jon Mason
2130c0ba 34d8673a

+1 -1
+1 -1
tools/testing/selftests/ntb/ntb_test.sh
··· 241 241 split_remote $LOC 242 242 243 243 if [[ "$REMOTE" == "" ]]; then 244 - echo $(ls -1 "$LOC"/${NAME}* 2>/dev/null | wc -l) 244 + echo $(ls -1 "$VPATH"/${NAME}* 2>/dev/null | wc -l) 245 245 else 246 246 echo $(ssh "$REMOTE" "ls -1 \"$VPATH\"/${NAME}* | \ 247 247 wc -l" 2> /dev/null)