* [PATCH net-next] selftests: Declare local variable for pause in fcnal-test.sh
@ 2024-01-30 15:43 David Ahern
2024-02-01 5:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: David Ahern @ 2024-01-30 15:43 UTC (permalink / raw)
To: netdev; +Cc: David Ahern
Running fcnal-test.sh script with -P argument is causing test failures:
$ ./fcnal-test.sh -t ping -P
TEST: ping out - ns-B IP [ OK ]
hit enter to continue, 'q' to quit
fcnal-test.sh: line 106: [: ping: integer expression expected
TEST: out, [FAIL]
expected rc ping; actual rc 0
hit enter to continue, 'q' to quit
The test functions use local variable 'a' for addresses and
then log_test is also using 'a' without a local declaration.
Fix by declaring a local variable and using 'ans' (for answer)
in the read.
Signed-off-by: David Ahern <dsahern@kernel.org>
---
tools/testing/selftests/net/fcnal-test.sh | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/net/fcnal-test.sh b/tools/testing/selftests/net/fcnal-test.sh
index d7cfb7c2b427..386ebd829df5 100755
--- a/tools/testing/selftests/net/fcnal-test.sh
+++ b/tools/testing/selftests/net/fcnal-test.sh
@@ -100,6 +100,7 @@ log_test()
local rc=$1
local expected=$2
local msg="$3"
+ local ans
[ "${VERBOSE}" = "1" ] && echo
@@ -113,16 +114,16 @@ log_test()
if [ "${PAUSE_ON_FAIL}" = "yes" ]; then
echo
echo "hit enter to continue, 'q' to quit"
- read a
- [ "$a" = "q" ] && exit 1
+ read ans
+ [ "$ans" = "q" ] && exit 1
fi
fi
if [ "${PAUSE}" = "yes" ]; then
echo
echo "hit enter to continue, 'q' to quit"
- read a
- [ "$a" = "q" ] && exit 1
+ read ans
+ [ "$ans" = "q" ] && exit 1
fi
kill_procs
--
2.39.3 (Apple Git-145)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] selftests: Declare local variable for pause in fcnal-test.sh
2024-01-30 15:43 [PATCH net-next] selftests: Declare local variable for pause in fcnal-test.sh David Ahern
@ 2024-02-01 5:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-02-01 5:20 UTC (permalink / raw)
To: David Ahern; +Cc: netdev
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 30 Jan 2024 08:43:27 -0700 you wrote:
> Running fcnal-test.sh script with -P argument is causing test failures:
>
> $ ./fcnal-test.sh -t ping -P
> TEST: ping out - ns-B IP [ OK ]
>
> hit enter to continue, 'q' to quit
>
> [...]
Here is the summary with links:
- [net-next] selftests: Declare local variable for pause in fcnal-test.sh
https://git.kernel.org/netdev/net-next/c/e79027c08302
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-01 5:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-30 15:43 [PATCH net-next] selftests: Declare local variable for pause in fcnal-test.sh David Ahern
2024-02-01 5:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).