* [LTP] [PATCH 1/1] network: load test_net.sh after getopts
@ 2016-11-07 12:19 Petr Vorel
2016-11-09 11:26 ` Alexey Kodanev
0 siblings, 1 reply; 4+ messages in thread
From: Petr Vorel @ 2016-11-07 12:19 UTC (permalink / raw)
To: ltp
We shouldn't ask rsh/ssh password or require having set ssh pub keys
just for displaying help.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testscripts/network.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/testscripts/network.sh b/testscripts/network.sh
index 66bacef..fea2f68 100755
--- a/testscripts/network.sh
+++ b/testscripts/network.sh
@@ -11,8 +11,6 @@ if [ $? -eq 0 ]; then
export LTPROOT=${PWD}
fi
-. test_net.sh
-
export TMPDIR=/tmp/netpan-$$
mkdir -p $TMPDIR
CMDFILE=${TMPDIR}/network.tests
@@ -81,6 +79,8 @@ if [ "$OPTIND" -eq 1 ]; then
exit 1
fi
+. test_net.sh
+
rm -f $CMDFILE
for t in $TEST_CASES; do
--
2.10.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* [LTP] [PATCH 1/1] network: load test_net.sh after getopts
2016-11-07 12:19 [LTP] [PATCH 1/1] network: load test_net.sh after getopts Petr Vorel
@ 2016-11-09 11:26 ` Alexey Kodanev
0 siblings, 0 replies; 4+ messages in thread
From: Alexey Kodanev @ 2016-11-09 11:26 UTC (permalink / raw)
To: ltp
Hi,
On 11/07/2016 03:19 PM, Petr Vorel wrote:
> We shouldn't ask rsh/ssh password or require having set ssh pub keys
> just for displaying help.
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> testscripts/network.sh | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/testscripts/network.sh b/testscripts/network.sh
> index 66bacef..fea2f68 100755
> --- a/testscripts/network.sh
> +++ b/testscripts/network.sh
> @@ -11,8 +11,6 @@ if [ $? -eq 0 ]; then
> export LTPROOT=${PWD}
> fi
>
> -. test_net.sh
> -
> export TMPDIR=/tmp/netpan-$$
> mkdir -p $TMPDIR
> CMDFILE=${TMPDIR}/network.tests
> @@ -81,6 +79,8 @@ if [ "$OPTIND" -eq 1 ]; then
> exit 1
> fi
>
> +. test_net.sh
> +
Agree, but we should reset TCID and TST_TOTAL after test_net.sh
inclusion (not before).
May be something like this where they were moved close to each other:
@@ -81,6 +79,8 @@ if [ "$OPTIND" -eq 1 ]; then
exit 1
fi
+TST_TOTAL=1
+TCID="network_settings"
+
+. test_net.sh
+
+# Reset variables.
+# Don't break the tests which are using 'testcases/lib/cmdlib.sh'
+export TCID=
+export TST_LIB_LOADED=
+
rm -f $CMDFILE
Best regards,
Alexey
> rm -f $CMDFILE
>
> for t in $TEST_CASES; do
^ permalink raw reply [flat|nested] 4+ messages in thread
* [LTP] [PATCH 1/1] network: load test_net.sh after getopts
@ 2016-11-09 14:35 Petr Vorel
2016-11-11 8:58 ` Alexey Kodanev
0 siblings, 1 reply; 4+ messages in thread
From: Petr Vorel @ 2016-11-09 14:35 UTC (permalink / raw)
To: ltp
We shouldn't ask rsh/ssh password or require having set ssh pub keys
just for displaying help.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Alexey, thanks a lot for your point, I overlooked the comment in the
code.
v2: reset TST_TOTAL and TCID variables after loading test_net.sh
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
testscripts/network.sh | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/testscripts/network.sh b/testscripts/network.sh
index 66bacef..6b81823 100755
--- a/testscripts/network.sh
+++ b/testscripts/network.sh
@@ -1,8 +1,5 @@
#!/bin/sh
-TST_TOTAL=1
-TCID="network_settings"
-
cd $(dirname $0)
export LTPROOT=${LTPROOT:-"$PWD"}
echo $LTPROOT | grep -q testscripts
@@ -11,8 +8,6 @@ if [ $? -eq 0 ]; then
export LTPROOT=${PWD}
fi
-. test_net.sh
-
export TMPDIR=/tmp/netpan-$$
mkdir -p $TMPDIR
CMDFILE=${TMPDIR}/network.tests
@@ -20,11 +15,6 @@ VERBOSE="no"
export PATH="${PATH}:${LTPROOT}/testcases/bin"
-# Reset variables.
-# Don't break the tests which are using 'testcases/lib/cmdlib.sh'
-export TCID=
-export TST_LIB_LOADED=
-
usage()
{
echo "Usage: $0 OPTIONS"
@@ -81,6 +71,16 @@ if [ "$OPTIND" -eq 1 ]; then
exit 1
fi
+TST_TOTAL=1
+TCID="network_settings"
+
+. test_net.sh
+
+# Reset variables.
+# Don't break the tests which are using 'testcases/lib/cmdlib.sh'
+export TCID=
+export TST_LIB_LOADED=
+
rm -f $CMDFILE
for t in $TEST_CASES; do
--
2.10.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-11-11 8:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-07 12:19 [LTP] [PATCH 1/1] network: load test_net.sh after getopts Petr Vorel
2016-11-09 11:26 ` Alexey Kodanev
-- strict thread matches above, loose matches on Subject: below --
2016-11-09 14:35 Petr Vorel
2016-11-11 8:58 ` Alexey Kodanev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox