]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: use common shebang in "packetpath/flowtables" test
authorThomas Haller <thaller@redhat.com>
Fri, 9 Feb 2024 12:13:04 +0000 (13:13 +0100)
committerFlorian Westphal <fw@strlen.de>
Sun, 16 Jun 2024 11:38:40 +0000 (13:38 +0200)
"./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>
tests/shell/testcases/packetpath/flowtables

index ec7dfeb75c000e6606c2d52230451995debeb6f5..2c4a7e1f725adbccf0550fe770721ad5e3c492b0 100755 (executable)
@@ -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"