]> git.ipfire.org Git - thirdparty/nftables.git/commit
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)
commitbfb22bbf0f03a3f3ce0ab71d4a2dce7516bc23a0
tree420374c1b0d267139a9f10669bdc4ca5b5414583
parent5fcbe57949d67e15e8f88fffe906a25587cc84b4
tests/shell: use bash instead of /bin/sh for tests

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