]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests/shell: use bash instead of /bin/sh for tests
authorThomas Haller <thaller@redhat.com>
Mon, 16 Oct 2023 13:30:10 +0000 (15:30 +0200)
committerFlorian Westphal <fw@strlen.de>
Mon, 16 Oct 2023 20:34:46 +0000 (22:34 +0200)
All tests under "tests/shell" are shell scripts with shebang /bin/bash
or /bin/sh. This may seem expected, since these tests are under
"tests/shell" directory, but any executable file would work.

Anyway. The vast majority of the tests has "#!/bin/bash" as shebang.
A few tests had "#!/bin/sh" or "#!/bin/sh -e". Unify this and always use bash.
Since we anyway require bash, this is not a limitation.

Also, if we know that this is a bash script (by parsing the shebang), we
can let the test wrapper pass "-x" to the script. The next commit will
do that, and it is nicer if the shebangs are all uniform.

Signed-off-by: Thomas Haller <thaller@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
12 files changed:
tests/shell/testcases/chains/0014rename_0
tests/shell/testcases/chains/0044chain_destroy_0
tests/shell/testcases/flowtable/0015destroy_0
tests/shell/testcases/maps/0014destroy_0
tests/shell/testcases/rule_management/0010replace_0
tests/shell/testcases/rule_management/0012destroy_0
tests/shell/testcases/sets/0043concatenated_ranges_0
tests/shell/testcases/sets/0043concatenated_ranges_1
tests/shell/testcases/sets/0044interval_overlap_0
tests/shell/testcases/sets/0044interval_overlap_1
tests/shell/testcases/sets/0072destroy_0
tests/shell/testcases/transactions/bad_expression

index bebe48d67af9ec01a0dc7564306154a0fa33a218..bd84e95784a75a62c435da5dcfd4da7e3b7a33bc 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 $NFT add table t || exit 1
 $NFT add chain t c1 || exit 1
index 1763d802c1dda64531a0608f7ab081b0ab5cf556..5c5a10a7b9c8028be0c226560aef151c92327c47 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/bash -e
 
 # NFT_TEST_REQUIRES(NFT_TEST_HAVE_destroy)
 
index 9e91ef5036a2e3993ef5626d4c451915906da592..d2a87da080fbc47d2a3bda064f87a6323271e81f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/bash -e
 
 # NFT_TEST_REQUIRES(NFT_TEST_HAVE_destroy)
 
index b17d0021d9267fb8334c485136218d53d89d9373..ee81e3cdcca90126673cb78738c205ad9be7cfa8 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/bash -e
 
 # NFT_TEST_REQUIRES(NFT_TEST_HAVE_destroy)
 
index 251cebb26ec080a566d1e80240c1414e20f1daaf..cd69a89d986109c17bbdc353d9b49d25cc118608 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # test for kernel commit ca08987885a147643817d02bf260bc4756ce8cd4
 # ("netfilter: nf_tables: deactivate expressions in rule replecement routine")
index 46a906cf36b8380df6218c3c7acd29d096434c59..a058150fed14b1253c843e629b532bcb18100b5a 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/bash -e
 
 # NFT_TEST_REQUIRES(NFT_TEST_HAVE_destroy)
 
index 4165b2f5f7114fe4bc513aee85b255de53276bf9..83d743503c7b5aea47ab8e4d092e66d81dfb313e 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/bash -e
 #
 # NFT_TEST_SKIP(NFT_TEST_SKIP_slow)
 #
index bab189c56d8c436bef86fb228d656dbd797ed732..1be2889352c98769ea725d2b4b319a1b2aae3303 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/bash -e
 #
 # 0043concatenated_ranges_1 - Insert and list subnets of different sizes
 
index 19aa6f5ed081c897bccb2a2e05ee15a64ee4304d..71bf3345a558bd96a13ddd03a35b424c3dd9c0b3 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/bash -e
 #
 # NFT_TEST_SKIP(NFT_TEST_SKIP_slow)
 #
index 905e6d5a0348d1d7b57a02c630eef340e8a25b69..cdd0c8446f1b2e84b5d55a9b3e208aa2250a7203 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/bash -e
 #
 # NFT_TEST_SKIP(NFT_TEST_SKIP_slow)
 #
index 6399dd0ff4c80301af206655e4410b3b3b896681..9886a9b0446392a778513344d655bbaebf409a80 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/bash -e
 
 # NFT_TEST_REQUIRES(NFT_TEST_HAVE_destroy)
 
index a820c2b98c3942f1d7b15e00b38eac289d49e2d0..794b62581b629b5e3f148affaa860eeb511890f0 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # table with invalid expression (masquerade called from filter table).
 # nft must return an error.  Also catch nfnetlink retry loops that