summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2024-02-09 13:13:04 +0100
committerFlorian Westphal <fw@strlen.de>2024-06-16 13:38:40 +0200
commit48b1f5e88f09eea1632fe7c27dd30b7c370d647f (patch)
treeb0749ae2404cc434f869e84474e6d0f37c0c4996 /tests/shell/testcases
parentf82a9a2632323df346815dcb6825bf6ac9040a37 (diff)
tests: use common shebang in "packetpath/flowtables" test
"./tools/check-tree.sh" checks for a certain shebang. Either `/bin/bash` or `/bin/bash -e`. No other are currently allowed, because it makes sense to be strict/consistent and there is no need such flexibility. Move the "-x" to a later command. Note that "set -x" may not be a good choice anyway. If you want to debug a test and see the shell commands, you could just run $ ./tests/shell/run-tests.sh tests/shell/testcases/packetpath/flowtables -x That will automatically use `/bin/bash -x` as interpreter. And that works for all tests the same. This is also the reason why "check-tree.sh" checks for a well-known shebang. Because the "-x" option of the test runner mangles the shebang, but for that it needs to understand it. Signed-off-by: Thomas Haller <thaller@redhat.com> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/shell/testcases')
-rwxr-xr-xtests/shell/testcases/packetpath/flowtables4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/shell/testcases/packetpath/flowtables b/tests/shell/testcases/packetpath/flowtables
index ec7dfeb7..2c4a7e1f 100755
--- a/tests/shell/testcases/packetpath/flowtables
+++ b/tests/shell/testcases/packetpath/flowtables
@@ -1,7 +1,9 @@
-#! /bin/bash -x
+#!/bin/bash
# NFT_TEST_SKIP(NFT_TEST_SKIP_slow)
+set -x
+
rnd=$(mktemp -u XXXXXXXX)
R="flowtable-router-$rnd"
C="flowtable-client-$rnd"