tests: Remove bashisms (s/source/.)
Subsystems (2)
PATCH 1/1 tests: Remove bashisms (s/source/.)
--- testsuite/tests/ip/link/new_link.t | 2 +- testsuite/tests/ip/link/show_dev_wo_vf_rate.t | 2 +- testsuite/tests/ip/netns/set_nsid.t | 2 +- testsuite/tests/ip/netns/set_nsid_batch.t | 2 +- testsuite/tests/ip/route/add_default_route.t | 4 ++-- testsuite/tests/ip/tunnel/add_tunnel.t | 2 +- testsuite/tests/tc/cls-testbed.t | 2 +- testsuite/tests/tc/dsmark.t | 2 +- testsuite/tests/tc/pedit.t | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-)
testsuite/tests/ip/link/new_link.t +1 -1
@@ -1,6 +1,6 @@ #!/bin/sh -source lib/generic.sh +. lib/generic.sh ts_log "[Testing add/del virtual links]"
testsuite/tests/ip/link/show_dev_wo_vf_rate.t +1 -1
@@ -1,6 +1,6 @@ #!/bin/sh -source lib/generic.sh +. lib/generic.sh NL_FILE="tests/ip/link/dev_wo_vf_rate.nl" ts_ip "$0" "Show VF devices w/o VF rate info" -d monitor file $NL_FILE
testsuite/tests/ip/netns/set_nsid.t +1 -1
@@ -1,6 +1,6 @@ #!/bin/sh -source lib/generic.sh +. lib/generic.sh ts_log "[Testing netns nsid]"
testsuite/tests/ip/netns/set_nsid_batch.t +1 -1
@@ -1,6 +1,6 @@ #!/bin/sh -source lib/generic.sh +. lib/generic.sh ts_log "[Testing netns nsid in batch mode]"
testsuite/tests/ip/route/add_default_route.t +2 -2
@@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -source lib/generic.sh +. lib/generic.sh ts_log "[Testing add default route]"
testsuite/tests/ip/tunnel/add_tunnel.t +1 -1
@@ -1,6 +1,6 @@ #!/bin/sh -source lib/generic.sh +. lib/generic.sh TUNNEL_NAME="tunnel_test_ip"
testsuite/tests/tc/cls-testbed.t +1 -1
@@ -1,7 +1,7 @@ #!/bin/bash # vim: ft=sh -source lib/generic.sh +. lib/generic.sh QDISCS="cbq htb dsmark"
testsuite/tests/tc/dsmark.t +1 -1
@@ -1,7 +1,7 @@ #!/bin/bash # vim: ft=sh -source lib/generic.sh +. lib/generic.sh ts_qdisc_available "dsmark" if [ $? -eq 0 ]; then
testsuite/tests/tc/pedit.t +1 -1
@@ -1,6 +1,6 @@ #!/bin/sh -source lib/generic.sh +. lib/generic.sh DEV="$(rand_dev)" ts_ip "$0" "Add $DEV dummy interface" link add dev $DEV type dummy
Signature · 1 line
2.14.2
Quoted 1 line · On Sun, 8 Oct 2017 16:39:16 +0200 Petr Vorel <[email protected]> wrote:
Signed-off-by Petr Vorel <[email protected]>
Ok, applied. But iproute2 is really limited to Linux and bash is lingua franca on Linux
Quoted 7 lines · Stephen Hemminger
Quoted 1 line · On Sun, 8 Oct 2017 16:39:16 +0200 Petr Vorel <[email protected]> wrote:
Signed-off-by Petr Vorel <[email protected]>Ok, applied. But iproute2 is really limited to Linux and bash is lingua franca on Linux
no French, please. Some distros use dash, but being POSIX is usually good.
Signature · 1 line
~Randy
testsuite/tests/ip/route/add_default_route.t line 1
Quoted 9 lines · Petr Vorel
testsuite/tests/ip/route/add_default_route.t +1
-1@@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash
Funny - ^^^ choosing bash explicitly while
vvvv removing the bashism?
Quoted 4 lines
testsuite/tests/ip/route/add_default_route.t +1
-1-source lib/generic.sh +. lib/generic.sh
ts_log"[Testing add default route]"
I noticed a couple other files already specified /bin/bash, yet you removed the bashisms. But the above struck me as something that would not seem to have been intended.
Hi Mark,
Quoted 8 lines
testsuite/tests/ip/route/add_default_route.t line 1
Quoted 5 lines
testsuite/tests/ip/route/add_default_route.t +1
-1@@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bashFunny - ^^^ choosing bash explicitly while
vvvv removing the bashism?
Eh, this is really silly, sorry. I've sent a patch to revert it back as it was unintentional.
Quoted 1 line
I noticed a couple other files already specified
/bin/bash, yet you removed the bashisms. But the above struck me as something that would not seem to have been intended.
I plan to remove all bashisms. Although having explicit dependency on bash (i.e. /bin/bash in shebang), it would be nice have posix compliant shell scripts (as Randy Dunlap also noted). Or at least don't have bashisms in script with /bin/sh shebang.
Kind regards,
Petr