Skip to content
Commit e79027c0 authored by David Ahern's avatar David Ahern Committed by Jakub Kicinski
Browse files

selftests: Declare local variable for pause in fcnal-test.sh



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: default avatarDavid Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20240130154327.33848-1-dsahern@kernel.org
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 567058d3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment