public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v2 1/2] network: fix printing commands in verbose mode
@ 2016-12-08  9:54 Petr Vorel
  2016-12-08  9:54 ` [LTP] [PATCH v2 2/2] network: cleanup duplicity + other minor cleanup Petr Vorel
  2016-12-14 14:51 ` [LTP] [PATCH v2 1/2] network: fix printing commands in verbose mode Cyril Hrubis
  0 siblings, 2 replies; 3+ messages in thread
From: Petr Vorel @ 2016-12-08  9:54 UTC (permalink / raw)
  To: ltp

Copy & paste error from testscripts/networkstress.sh

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testscripts/network.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testscripts/network.sh b/testscripts/network.sh
index 6b81823f9..2d2c6762c 100755
--- a/testscripts/network.sh
+++ b/testscripts/network.sh
@@ -94,7 +94,7 @@ if [ ${VERBOSE} = "yes" ]; then
 	echo " - ${LHOST_IFACES} local interface (MAC address: ${LHOST_HWADDRS})"
 	echo " - ${RHOST_IFACES} remote interface (MAC address: ${RHOST_HWADDRS})"
 
-	cat $TMPDIR/network_stress.tests
+	cat $CMDFILE
 	${LTPROOT}/ver_linux
 	echo ""
 	echo ${LTPROOT}/bin/ltp-pan -e -l /tmp/netpan.log -S -a ltpnet -n ltpnet -f $CMDFILE
-- 
2.11.0


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

* [LTP] [PATCH v2 2/2] network: cleanup duplicity + other minor cleanup
  2016-12-08  9:54 [LTP] [PATCH v2 1/2] network: fix printing commands in verbose mode Petr Vorel
@ 2016-12-08  9:54 ` Petr Vorel
  2016-12-14 14:51 ` [LTP] [PATCH v2 1/2] network: fix printing commands in verbose mode Cyril Hrubis
  1 sibling, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2016-12-08  9:54 UTC (permalink / raw)
  To: ltp

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testscripts/network.sh | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/testscripts/network.sh b/testscripts/network.sh
index 2d2c6762c..0736bf1e3 100755
--- a/testscripts/network.sh
+++ b/testscripts/network.sh
@@ -11,7 +11,7 @@ fi
 export TMPDIR=/tmp/netpan-$$
 mkdir -p $TMPDIR
 CMDFILE=${TMPDIR}/network.tests
-VERBOSE="no"
+VERBOSE=
 
 export PATH="${PATH}:${LTPROOT}/testcases/bin"
 
@@ -89,20 +89,23 @@ done
 
 cd $TMPDIR
 
-if [ ${VERBOSE} = "yes" ]; then
-	echo "Network parameters:"
-	echo " - ${LHOST_IFACES} local interface (MAC address: ${LHOST_HWADDRS})"
-	echo " - ${RHOST_IFACES} remote interface (MAC address: ${RHOST_HWADDRS})"
+COMMAND="$LTPROOT/bin/ltp-pan -e -l /tmp/netpan.log -S -a ltpnet -n ltpnet -f $CMDFILE"
+if [ "$VERBOSE" = "yes" ]; then
+cat << EOF
+Network parameters:
+ - ${LHOST_IFACES} local interface (MAC address: ${LHOST_HWADDRS})
+ - ${RHOST_IFACES} remote interface (MAC address: ${RHOST_HWADDRS})
 
-	cat $CMDFILE
-	${LTPROOT}/ver_linux
-	echo ""
-	echo ${LTPROOT}/bin/ltp-pan -e -l /tmp/netpan.log -S -a ltpnet -n ltpnet -f $CMDFILE
+`cat $CMDFILE`
+`${LTPROOT}/ver_linux`
+
+$COMMAND
+EOF
 fi
 
-${LTPROOT}/bin/ltp-pan -e -l /tmp/netpan.log -S -a ltpnet -n ltpnet -f $CMDFILE
+$COMMAND
 
-if [ $? -eq "0" ]; then
+if [ $? -eq 0 ]; then
 	echo ltp-pan reported PASS
 else
 	echo ltp-pan reported FAIL
-- 
2.11.0


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

* [LTP] [PATCH v2 1/2] network: fix printing commands in verbose mode
  2016-12-08  9:54 [LTP] [PATCH v2 1/2] network: fix printing commands in verbose mode Petr Vorel
  2016-12-08  9:54 ` [LTP] [PATCH v2 2/2] network: cleanup duplicity + other minor cleanup Petr Vorel
@ 2016-12-14 14:51 ` Cyril Hrubis
  1 sibling, 0 replies; 3+ messages in thread
From: Cyril Hrubis @ 2016-12-14 14:51 UTC (permalink / raw)
  To: ltp

Hi!
Looks obviously correct to me, pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

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

end of thread, other threads:[~2016-12-14 14:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-08  9:54 [LTP] [PATCH v2 1/2] network: fix printing commands in verbose mode Petr Vorel
2016-12-08  9:54 ` [LTP] [PATCH v2 2/2] network: cleanup duplicity + other minor cleanup Petr Vorel
2016-12-14 14:51 ` [LTP] [PATCH v2 1/2] network: fix printing commands in verbose mode Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox