All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests: Remove bashisms (s/source/.)
@ 2017-10-08 14:39 Petr Vorel
  2017-10-11 18:01 ` Stephen Hemminger
  2017-10-13 17:55 ` Rustad, Mark D
  0 siblings, 2 replies; 5+ messages in thread
From: Petr Vorel @ 2017-10-08 14:39 UTC (permalink / raw)
  To: netdev; +Cc: Petr Vorel

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
 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(-)

diff --git a/testsuite/tests/ip/link/new_link.t b/testsuite/tests/ip/link/new_link.t
index 699adbcd..c17650a2 100755
--- a/testsuite/tests/ip/link/new_link.t
+++ b/testsuite/tests/ip/link/new_link.t
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-source lib/generic.sh
+. lib/generic.sh
 
 ts_log "[Testing add/del virtual links]"
 
diff --git a/testsuite/tests/ip/link/show_dev_wo_vf_rate.t b/testsuite/tests/ip/link/show_dev_wo_vf_rate.t
index a600ba65..5b3c004e 100755
--- a/testsuite/tests/ip/link/show_dev_wo_vf_rate.t
+++ b/testsuite/tests/ip/link/show_dev_wo_vf_rate.t
@@ -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
diff --git a/testsuite/tests/ip/netns/set_nsid.t b/testsuite/tests/ip/netns/set_nsid.t
index 606d45ab..8f8c7792 100755
--- a/testsuite/tests/ip/netns/set_nsid.t
+++ b/testsuite/tests/ip/netns/set_nsid.t
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-source lib/generic.sh
+. lib/generic.sh
 
 ts_log "[Testing netns nsid]"
 
diff --git a/testsuite/tests/ip/netns/set_nsid_batch.t b/testsuite/tests/ip/netns/set_nsid_batch.t
index abb3f1bb..196fd4b3 100755
--- a/testsuite/tests/ip/netns/set_nsid_batch.t
+++ b/testsuite/tests/ip/netns/set_nsid_batch.t
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-source lib/generic.sh
+. lib/generic.sh
 
 ts_log "[Testing netns nsid in batch mode]"
 
diff --git a/testsuite/tests/ip/route/add_default_route.t b/testsuite/tests/ip/route/add_default_route.t
index e5ea6473..0b566f1f 100755
--- a/testsuite/tests/ip/route/add_default_route.t
+++ b/testsuite/tests/ip/route/add_default_route.t
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
 
-source lib/generic.sh
+. lib/generic.sh
 
 ts_log "[Testing add default route]"
 
diff --git a/testsuite/tests/ip/tunnel/add_tunnel.t b/testsuite/tests/ip/tunnel/add_tunnel.t
index 18f6e370..3f5a9d3c 100755
--- a/testsuite/tests/ip/tunnel/add_tunnel.t
+++ b/testsuite/tests/ip/tunnel/add_tunnel.t
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-source lib/generic.sh
+. lib/generic.sh
 
 TUNNEL_NAME="tunnel_test_ip"
 
diff --git a/testsuite/tests/tc/cls-testbed.t b/testsuite/tests/tc/cls-testbed.t
index 2afc26fc..d5c21e5c 100755
--- a/testsuite/tests/tc/cls-testbed.t
+++ b/testsuite/tests/tc/cls-testbed.t
@@ -1,7 +1,7 @@
 #!/bin/bash
 # vim: ft=sh
 
-source lib/generic.sh
+. lib/generic.sh
 
 QDISCS="cbq htb dsmark"
 
diff --git a/testsuite/tests/tc/dsmark.t b/testsuite/tests/tc/dsmark.t
index 6934165e..177585e6 100755
--- a/testsuite/tests/tc/dsmark.t
+++ b/testsuite/tests/tc/dsmark.t
@@ -1,7 +1,7 @@
 #!/bin/bash
 # vim: ft=sh
 
-source lib/generic.sh
+. lib/generic.sh
 
 ts_qdisc_available "dsmark"
 if [ $? -eq 0 ]; then
diff --git a/testsuite/tests/tc/pedit.t b/testsuite/tests/tc/pedit.t
index e9b6c333..8d531a05 100755
--- a/testsuite/tests/tc/pedit.t
+++ b/testsuite/tests/tc/pedit.t
@@ -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
-- 
2.14.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] tests: Remove bashisms (s/source/.)
  2017-10-08 14:39 [PATCH] tests: Remove bashisms (s/source/.) Petr Vorel
@ 2017-10-11 18:01 ` Stephen Hemminger
  2017-10-11 18:02   ` Randy Dunlap
  2017-10-13 17:55 ` Rustad, Mark D
  1 sibling, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2017-10-11 18:01 UTC (permalink / raw)
  To: Petr Vorel; +Cc: netdev

On Sun,  8 Oct 2017 16:39:16 +0200
Petr Vorel <petr.vorel@gmail.com> wrote:

> Signed-off-by: Petr Vorel <petr.vorel@gmail.com>

Ok, applied. But iproute2 is really limited to Linux and bash is lingua franca on Linux

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tests: Remove bashisms (s/source/.)
  2017-10-11 18:01 ` Stephen Hemminger
@ 2017-10-11 18:02   ` Randy Dunlap
  0 siblings, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2017-10-11 18:02 UTC (permalink / raw)
  To: Stephen Hemminger, Petr Vorel; +Cc: netdev

On 10/11/17 11:01, Stephen Hemminger wrote:
> On Sun,  8 Oct 2017 16:39:16 +0200
> Petr Vorel <petr.vorel@gmail.com> wrote:
> 
>> Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
> 
> 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.

-- 
~Randy

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tests: Remove bashisms (s/source/.)
  2017-10-08 14:39 [PATCH] tests: Remove bashisms (s/source/.) Petr Vorel
  2017-10-11 18:01 ` Stephen Hemminger
@ 2017-10-13 17:55 ` Rustad, Mark D
  2017-10-15 10:05   ` Petr Vorel
  1 sibling, 1 reply; 5+ messages in thread
From: Rustad, Mark D @ 2017-10-13 17:55 UTC (permalink / raw)
  To: Petr Vorel; +Cc: netdev

[-- Attachment #1: Type: text/plain, Size: 717 bytes --]

> On Oct 8, 2017, at 7:39 AM, Petr Vorel <petr.vorel@gmail.com> wrote:
> 
> diff --git a/testsuite/tests/ip/route/add_default_route.t b/testsuite/tests/ip/route/add_default_route.t
> index e5ea6473..0b566f1f 100755
> --- a/testsuite/tests/ip/route/add_default_route.t
> +++ b/testsuite/tests/ip/route/add_default_route.t
> @@ -1,6 +1,6 @@
> -#!/bin/sh
> +#!/bin/bash

Funny - ^^^ choosing bash explicitly while
   vvvv removing the bashism?

> -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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tests: Remove bashisms (s/source/.)
  2017-10-13 17:55 ` Rustad, Mark D
@ 2017-10-15 10:05   ` Petr Vorel
  0 siblings, 0 replies; 5+ messages in thread
From: Petr Vorel @ 2017-10-15 10:05 UTC (permalink / raw)
  To: Rustad, Mark D; +Cc: netdev

Hi Mark,

> > --- a/testsuite/tests/ip/route/add_default_route.t
> > +++ b/testsuite/tests/ip/route/add_default_route.t
> > @@ -1,6 +1,6 @@
> > -#!/bin/sh
> > +#!/bin/bash

> Funny - ^^^ 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.


> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-10-15 10:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-08 14:39 [PATCH] tests: Remove bashisms (s/source/.) Petr Vorel
2017-10-11 18:01 ` Stephen Hemminger
2017-10-11 18:02   ` Randy Dunlap
2017-10-13 17:55 ` Rustad, Mark D
2017-10-15 10:05   ` Petr Vorel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.