All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [LNG][PATCH 0/9] ltp-networking on ubuntu
@ 2013-10-29 22:20 Vincent Hsu
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 1/9] ltp-networking/nfs: Setting the NFS to version 3 by default. NFSv3 is more compatibled with recent linux distributions Vincent Hsu
                   ` (8 more replies)
  0 siblings, 9 replies; 26+ messages in thread
From: Vincent Hsu @ 2013-10-29 22:20 UTC (permalink / raw)
  To: ltp-list; +Cc: linaro-networking

Hi
I want to do ltp-networking test with ubuntu rootfs on the arndale board, but some of them can't test success. So I do several changes based on the ltp release 20130904. Could you help to review them?

Vincent Hsu (9):
  ltp-networking/nfs: Setting the NFS to version 3 by default. NFSv3 is
        more compatibled with recent linux distributions.
  ltp-networking/nfs: don't use absolute path for showmount. showmount
       does not locate at /user/sbin/showmount on Ubuntu 12.04.
  ltp-networking/tcp_cmds/finger: finger an unknown host test will
    return     1 even if execution success on Ubuntu 12.04
  ltp-networking/tcp_cmds/netstat: netstat cmds will return 1 even if
    no     output in stderr on Ubuntu 12.04
  ltp-networking/tcp_cmds/tcpdump:     1. RHOST IP won't appear in
    network interfaces. It should be LHOST.     2. Host commad can't
    fetch IP in no DNS enviroment. use ping intead of        it
  ltp-networking/iproute:     ip02: set original mtu size back. this
    test will set mtu to 300.     ip05: if there is nott only one route
    using "head" command will get           wrong result.
  ltp-networking/iptables: "iptables -L -t nat" lists 4 chains not
    3 chains on Ubuntu 12.04
  ltp-networking: standardize test result message
  ltp-networking/rpc: gave precise test name

 testcases/network/iproute/ip_tests.sh              |    6 +++++-
 testcases/network/iptables/iptables_tests.sh       |   22 +++++++++++++-------
 testcases/network/multicast/mc_cmds/mc_cmds        |    9 ++++++--
 testcases/network/multicast/mc_commo/mc_commo      |    8 +++++--
 testcases/network/multicast/mc_member/mc_member    |    8 +++++--
 testcases/network/multicast/mc_opts/mc_opts        |    8 +++++--
 testcases/network/nfs/fsx-linux/fsx.sh             |    9 +++++---
 testcases/network/nfs/nfs01/nfs01                  |    9 +++++---
 testcases/network/nfs/nfs02/nfs02                  |   11 ++++++----
 testcases/network/nfs/nfs03/nfs03                  |    9 +++++---
 testcases/network/nfs/nfs04/nfs04                  |    2 +-
 testcases/network/nfs/nfslock01/nfslock01          |    7 +++++--
 testcases/network/nfs/nfsstat01/nfsstat01          |    9 +++++---
 testcases/network/nfs/nfsstress/nfsstress          |   11 ++++++----
 testcases/network/rpc/basic_tests/rpc01/rpc01      |    7 +++++--
 .../network/rpc/basic_tests/rpcinfo/rpcinfo01      |    9 +++++---
 testcases/network/rpc/basic_tests/rup/rup01        |    9 +++++---
 testcases/network/rpc/basic_tests/rusers/rusers01  |    7 +++++--
 testcases/network/tcp_cmds/finger/finger01         |    4 ++--
 testcases/network/tcp_cmds/netstat/netstat01       |    3 ++-
 testcases/network/tcp_cmds/tcpdump/tcpdump01       |    4 ++--
 21 files changed, 117 insertions(+), 54 deletions(-)

--
1.7.9.5


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* [LTP] [LNG][PATCH 1/9] ltp-networking/nfs: Setting the NFS to version 3 by default. NFSv3 is more compatibled with recent linux distributions.
  2013-10-29 22:20 [LTP] [LNG][PATCH 0/9] ltp-networking on ubuntu Vincent Hsu
@ 2013-10-29 22:20 ` Vincent Hsu
  2013-11-07 13:29   ` chrubis
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 2/9] ltp-networking/nfs: don't use absolute path for showmount. showmount does not locate at /user/sbin/showmount on Ubuntu 12.04 Vincent Hsu
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 26+ messages in thread
From: Vincent Hsu @ 2013-10-29 22:20 UTC (permalink / raw)
  To: ltp-list; +Cc: linaro-networking

---
 testcases/network/nfs/fsx-linux/fsx.sh    |    2 +-
 testcases/network/nfs/nfs01/nfs01         |    2 +-
 testcases/network/nfs/nfs02/nfs02         |    2 +-
 testcases/network/nfs/nfs03/nfs03         |    2 +-
 testcases/network/nfs/nfs04/nfs04         |    2 +-
 testcases/network/nfs/nfsstat01/nfsstat01 |    2 +-
 testcases/network/nfs/nfsstress/nfsstress |    4 ++--
 7 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/testcases/network/nfs/fsx-linux/fsx.sh b/testcases/network/nfs/fsx-linux/fsx.sh
index 9d94166..a3c4801 100755
--- a/testcases/network/nfs/fsx-linux/fsx.sh
+++ b/testcases/network/nfs/fsx-linux/fsx.sh
@@ -75,7 +75,7 @@ $trace_logic

     PID=$$

-    VERSION=${VERSION:=2}
+    VERSION=${VERSION:=3}
     RHOST=${RHOST:=`hostname`}
     ITERATIONS=${ITERATIONS:=50000}
     SOCKET_TYPE=${SOCKET_TYPE:=udp}
diff --git a/testcases/network/nfs/nfs01/nfs01 b/testcases/network/nfs/nfs01/nfs01
index 924f2c2..e52915c 100755
--- a/testcases/network/nfs/nfs01/nfs01
+++ b/testcases/network/nfs/nfs01/nfs01
@@ -72,7 +72,7 @@ $trace_logic

     PID=$$

-    VERSION=${VERSION:=2}
+    VERSION=${VERSION:=3}
     RHOST=${RHOST:=`hostname`}
     NFILES=${NFILES:=1000}
     SOCKET_TYPE=${SOCKET_TYPE:=udp}
diff --git a/testcases/network/nfs/nfs02/nfs02 b/testcases/network/nfs/nfs02/nfs02
index c655678..5ff4651 100755
--- a/testcases/network/nfs/nfs02/nfs02
+++ b/testcases/network/nfs/nfs02/nfs02
@@ -50,7 +50,7 @@ TCtmp=${TCtmp:=$TCbin/$TC$$}
 PID=$$

 RHOST=${RHOST:=`hostname`}
-VERSION=${VERSION:=2}
+VERSION=${VERSION:=3}
 SOCKET_TYPE=${SOCKET_TYPE:=udp}
 TESTDIR=${TESTDIR:=/tmp/$TC$PID.testdir}
 CLEANUP=${CLEANUP:="ON"}
diff --git a/testcases/network/nfs/nfs03/nfs03 b/testcases/network/nfs/nfs03/nfs03
index 80a4cbd..f1f4bb4 100755
--- a/testcases/network/nfs/nfs03/nfs03
+++ b/testcases/network/nfs/nfs03/nfs03
@@ -53,7 +53,7 @@ RHOST=${RHOST:=`hostname | awk {'print $1'}`}
 PID=$$

 # Setting the NFS to version 2 by default
-VERSION=${VERSION:=2}
+VERSION=${VERSION:=3}
 SOCKET_TYPE=${SOCKET_TYPE:=udp}
 TESTDIR=${TESTDIR:=/tmp/$TC$PID.testdir}
 NFS_TYPE=${NFS_TYPE:=nfs}
diff --git a/testcases/network/nfs/nfs04/nfs04 b/testcases/network/nfs/nfs04/nfs04
index 3289f0e..7518d5b 100755
--- a/testcases/network/nfs/nfs04/nfs04
+++ b/testcases/network/nfs/nfs04/nfs04
@@ -71,7 +71,7 @@ $trace_logic

     PID=$$

-    VERSION=${VERSION:=2}
+    VERSION=${VERSION:=3}
     RHOST=${RHOST:=`hostname`}
     FILESIZE=${FILESIZE:=10}
     SOCKET_TYPE=${SOCKET_TYPE:=udp}
diff --git a/testcases/network/nfs/nfsstat01/nfsstat01 b/testcases/network/nfs/nfsstat01/nfsstat01
index 9d52a45..8b54815 100755
--- a/testcases/network/nfs/nfsstat01/nfsstat01
+++ b/testcases/network/nfs/nfsstat01/nfsstat01
@@ -46,7 +46,7 @@ TCbin=${TCbin:=`pwd`}
 EXPORTDIR=${EXPORTDIR:=/tmp/$TC$PID}
 HOST=`hostname`
 CLEANUP=${CLEANUP:="ON"}
-VERSION=${VERSION:=2}
+VERSION=${VERSION:=3}
 TESTDIR=${TESTDIR:=/tmp/$TC$PID.testdir}
 NFS_TYPE=${NFS_TYPE:nfs}

diff --git a/testcases/network/nfs/nfsstress/nfsstress b/testcases/network/nfs/nfsstress/nfsstress
index 7f0006b..914c308 100755
--- a/testcases/network/nfs/nfsstress/nfsstress
+++ b/testcases/network/nfs/nfsstress/nfsstress
@@ -50,9 +50,9 @@ TCtmp=${TCtmp:=$TCbin/$TC$$}
 TCdump=${TCdump:=$TCbin}
 RHOST=${RHOST:=`hostname|awk {'print $1'}`}

-# Setting the NFS to version 2 with UDP by default
+# Setting the NFS to version 3 with UDP by default
 PID=$$
-VERSION=${VERSION:=2}
+VERSION=${VERSION:=3}
 SOCKET_TYPE=${SOCKET_TYPE:=udp}
 TESTDIR=${TESTDIR:=/tmp/$TC$PID.testdir}
 NFS_TYPE=${NFS_TYPE:=nfs}
--
1.7.9.5


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* [LTP] [LNG][PATCH 2/9] ltp-networking/nfs: don't use absolute path for showmount. showmount does not locate at /user/sbin/showmount on Ubuntu 12.04.
  2013-10-29 22:20 [LTP] [LNG][PATCH 0/9] ltp-networking on ubuntu Vincent Hsu
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 1/9] ltp-networking/nfs: Setting the NFS to version 3 by default. NFSv3 is more compatibled with recent linux distributions Vincent Hsu
@ 2013-10-29 22:20 ` Vincent Hsu
  2013-11-07 13:29   ` chrubis
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 3/9] ltp-networking/tcp_cmds/finger: finger an unknown host test will return 1 even if execution success " Vincent Hsu
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 26+ messages in thread
From: Vincent Hsu @ 2013-10-29 22:20 UTC (permalink / raw)
  To: ltp-list; +Cc: linaro-networking

---
 testcases/network/nfs/nfs02/nfs02 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/network/nfs/nfs02/nfs02 b/testcases/network/nfs/nfs02/nfs02
index 5ff4651..3a157a1 100755
--- a/testcases/network/nfs/nfs02/nfs02
+++ b/testcases/network/nfs/nfs02/nfs02
@@ -100,7 +100,7 @@ $trace_logic
    fi

    #Verify export
-   /usr/sbin/showmount -e $RHOST | grep $TESTDIR
+   showmount -e $RHOST | grep $TESTDIR
    [ $? -eq 0 ] || end_testcase "$TESTDIR not exported"

    #Create $TCtmp for mount point
--
1.7.9.5


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* [LTP] [LNG][PATCH 3/9] ltp-networking/tcp_cmds/finger: finger an unknown host test will return 1 even if execution success on Ubuntu 12.04
  2013-10-29 22:20 [LTP] [LNG][PATCH 0/9] ltp-networking on ubuntu Vincent Hsu
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 1/9] ltp-networking/nfs: Setting the NFS to version 3 by default. NFSv3 is more compatibled with recent linux distributions Vincent Hsu
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 2/9] ltp-networking/nfs: don't use absolute path for showmount. showmount does not locate at /user/sbin/showmount on Ubuntu 12.04 Vincent Hsu
@ 2013-10-29 22:20 ` Vincent Hsu
  2013-11-07 13:12   ` chrubis
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 4/9] ltp-networking/tcp_cmds/netstat: netstat cmds will return 1 even if no output in stderr " Vincent Hsu
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 26+ messages in thread
From: Vincent Hsu @ 2013-10-29 22:20 UTC (permalink / raw)
  To: ltp-list; +Cc: linaro-networking

for example:
    $ finger @xxxx || echo "test fail"
    finger: unknown host: xxxx
    getaddrinfo: No address associated with hostname
    test fail
---
 testcases/network/tcp_cmds/finger/finger01 |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/network/tcp_cmds/finger/finger01 b/testcases/network/tcp_cmds/finger/finger01
index 6a72c8f..a5206be 100755
--- a/testcases/network/tcp_cmds/finger/finger01
+++ b/testcases/network/tcp_cmds/finger/finger01
@@ -116,8 +116,8 @@ do_test2()

     tst_resm TINFO "finger -bad user "
     finger $BADUSER 2>&1 1>/dev/null || end_testcase "finger $BADUSER"
-    finger @$BADHOST 2>&1 1>/dev/null || end_testcase "finger @$BADHOST"
-    if ! finger $BADUSER@$BADHOST 2>&1 1>/dev/null; then
+    finger @$BADHOST 2>&1 1>/dev/null | grep "finger: unknown host" || end_testcase "finger @$BADHOST"
+    if ! finger $BADUSER@$BADHOST 2>&1 1>/dev/null | grep "finger: unknown host"; then
         end_testcase "finger $BADUSER@$BADHOST"
     fi
 }
--
1.7.9.5


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* [LTP] [LNG][PATCH 4/9] ltp-networking/tcp_cmds/netstat: netstat cmds will return 1 even if no output in stderr on Ubuntu 12.04
  2013-10-29 22:20 [LTP] [LNG][PATCH 0/9] ltp-networking on ubuntu Vincent Hsu
                   ` (2 preceding siblings ...)
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 3/9] ltp-networking/tcp_cmds/finger: finger an unknown host test will return 1 even if execution success " Vincent Hsu
@ 2013-10-29 22:20 ` Vincent Hsu
  2013-11-07 13:14   ` chrubis
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 5/9] ltp-networking/tcp_cmds/tcpdump: 1. RHOST IP won't appear in network interfaces. It should be LHOST. 2. Host commad can't fetch IP in no DNS enviroment. use ping intead of it Vincent Hsu
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 26+ messages in thread
From: Vincent Hsu @ 2013-10-29 22:20 UTC (permalink / raw)
  To: ltp-list; +Cc: linaro-networking

for example:
    $ netstat -s 1>netstat/dev/null 2>&1 ; echo $?
    1

This if condition would have worng result.
    if ! netstat $flag 1>/dev/null 2>&1; then
        end_testcase "netstat $flag failed"
    fi
---
 testcases/network/tcp_cmds/netstat/netstat01 |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/testcases/network/tcp_cmds/netstat/netstat01 b/testcases/network/tcp_cmds/netstat/netstat01
index 3c2d1bb..6d4682a 100755
--- a/testcases/network/tcp_cmds/netstat/netstat01
+++ b/testcases/network/tcp_cmds/netstat/netstat01
@@ -58,7 +58,8 @@ do_test() {
     while [ $TST_COUNT -le $NUMLOOPS ]; do

         for flag in "-s" "-rn" "-i" "-gn" "-apn"; do
-            if ! netstat $flag 1>/dev/null 2>&1; then
+            var=$(netstat $flag 1>/dev/null 2>&1);
+            if [ "$var" != "" ]; then
                 end_testcase "netstat $flag failed"
             fi
         done
--
1.7.9.5


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* [LTP] [LNG][PATCH 5/9] ltp-networking/tcp_cmds/tcpdump: 1. RHOST IP won't appear in network interfaces. It should be LHOST. 2. Host commad can't fetch IP in no DNS enviroment. use ping intead of it
  2013-10-29 22:20 [LTP] [LNG][PATCH 0/9] ltp-networking on ubuntu Vincent Hsu
                   ` (3 preceding siblings ...)
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 4/9] ltp-networking/tcp_cmds/netstat: netstat cmds will return 1 even if no output in stderr " Vincent Hsu
@ 2013-10-29 22:20 ` Vincent Hsu
  2013-11-07 13:25   ` chrubis
                     ` (2 more replies)
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 6/9] ltp-networking/iproute: ip02: set original mtu size back. this test will set mtu to 300. ip05: if there is nott only one route using "head" command will get wrong result Vincent Hsu
                   ` (3 subsequent siblings)
  8 siblings, 3 replies; 26+ messages in thread
From: Vincent Hsu @ 2013-10-29 22:20 UTC (permalink / raw)
  To: ltp-list; +Cc: linaro-networking

---
 testcases/network/tcp_cmds/tcpdump/tcpdump01 |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/network/tcp_cmds/tcpdump/tcpdump01 b/testcases/network/tcp_cmds/tcpdump/tcpdump01
index 4866720..6d99398 100755
--- a/testcases/network/tcp_cmds/tcpdump/tcpdump01
+++ b/testcases/network/tcp_cmds/tcpdump/tcpdump01
@@ -47,8 +47,8 @@ do_setup()
     tst_setup

     exists awk grep host hostname ifconfig netstat ping tail tcpdump
-    RHOST=${RHOST:-`hostname`}
-    IP=`host ${RHOST} 2>/dev/null | awk '{print $4}'`
+    LHOST=${LHOST:-`hostname`}
+    IP=`ping ${LHOST} -c 1 | awk '{print $3}' | head -n1 | cut -f2 -d'(' | cut -f1 -d')'`
     IFNUMS=`netstat -i|wc -l`
     IFNUMS=$(( $IFNUMS - 2 ))
     IFNAME=${IFNAME:-$(netstat -i | awk '{print $1}' | tail -n ${IFNUMS})}
--
1.7.9.5


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* [LTP] [LNG][PATCH 6/9] ltp-networking/iproute: ip02: set original mtu size back. this test will set mtu to 300. ip05: if there is nott only one route using "head" command will get wrong result.
  2013-10-29 22:20 [LTP] [LNG][PATCH 0/9] ltp-networking on ubuntu Vincent Hsu
                   ` (4 preceding siblings ...)
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 5/9] ltp-networking/tcp_cmds/tcpdump: 1. RHOST IP won't appear in network interfaces. It should be LHOST. 2. Host commad can't fetch IP in no DNS enviroment. use ping intead of it Vincent Hsu
@ 2013-10-29 22:20 ` Vincent Hsu
  2013-11-07 13:52   ` chrubis
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 7/9] ltp-networking/iptables: "iptables -L -t nat" lists 4 chains not 3 chains on Ubuntu 12.04 Vincent Hsu
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 26+ messages in thread
From: Vincent Hsu @ 2013-10-29 22:20 UTC (permalink / raw)
  To: ltp-list; +Cc: linaro-networking

---
 testcases/network/iproute/ip_tests.sh |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/testcases/network/iproute/ip_tests.sh b/testcases/network/iproute/ip_tests.sh
index ce4cabc..49b2886 100755
--- a/testcases/network/iproute/ip_tests.sh
+++ b/testcases/network/iproute/ip_tests.sh
@@ -187,6 +187,7 @@ test01()

 	tst_resm TINFO "Test #1: changing mtu size of eth0:1 device."

+	MTUSZ_BAK=`ifconfig eth0:1 | grep -i MTU | sed "s/^.*MTU://" | awk '{print $1}'`
 	ip link set eth0:1 mtu 300 >$LTPTMP/tst_ip.err 2>&1
 	if [ $RC -ne 0 ]
 	then
@@ -198,6 +199,7 @@ test01()
 		if [ $MTUSZ -eq 300 ]
 		then
 			tst_resm TPASS "Test #1: changing mtu size success"
+	        ip link set eth0:1 mtu $MTUSZ_BAK >$LTPTMP/tst_ip.err 2>&1
 		else
 			tst_resm FAIL NULL \
 				"Test #1: MTU value not set to 300: ifconfig returned: $MTUSZ"
@@ -453,7 +455,9 @@ test05()
 		10.6.6.6 via 127.0.0.1 dev lo
 		EOF

-		ip route show | head -n1 >$LTPTMP/tst_ip.out 2>&1 || RC=$?
+		ip route show >$LTPTMP/tst_ip.out.tmp
+        grep "10.6.6.6 via 127.0.0.1 dev lo" $LTPTMP/tst_ip.out.tmp \
+            >$LTPTMP/tst_ip.out 2>&1 || RC=$?
 		if [ $RC -ne 0 ]
 		then
 			tst_res TFAIL $LTPTMP/tst_ip.err \
--
1.7.9.5


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* [LTP] [LNG][PATCH 7/9] ltp-networking/iptables: "iptables -L -t nat" lists 4 chains not 3 chains on Ubuntu 12.04
  2013-10-29 22:20 [LTP] [LNG][PATCH 0/9] ltp-networking on ubuntu Vincent Hsu
                   ` (5 preceding siblings ...)
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 6/9] ltp-networking/iproute: ip02: set original mtu size back. this test will set mtu to 300. ip05: if there is nott only one route using "head" command will get wrong result Vincent Hsu
@ 2013-10-29 22:20 ` Vincent Hsu
  2013-11-07 13:31   ` chrubis
  2013-11-08  2:30   ` Simon Xu
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 8/9] ltp-networking: standardize test result message Vincent Hsu
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 9/9] ltp-networking/rpc: gave precise test name Vincent Hsu
  8 siblings, 2 replies; 26+ messages in thread
From: Vincent Hsu @ 2013-10-29 22:20 UTC (permalink / raw)
  To: ltp-list; +Cc: linaro-networking

---
 testcases/network/iptables/iptables_tests.sh |   22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/testcases/network/iptables/iptables_tests.sh b/testcases/network/iptables/iptables_tests.sh
index 028d54e..641f327 100755
--- a/testcases/network/iptables/iptables_tests.sh
+++ b/testcases/network/iptables/iptables_tests.sh
@@ -165,13 +165,21 @@ test01()
 		return $RC
 	else
 		chaincnt=$(grep -c Chain $LTPTMP/tst_iptables.out)
-		if [ $chaincnt -ne 3 ]; then
-			tst_res TFAIL $LTPTMP/tst_iptables.out \
-				"$TCID: $cmd failed to list rules. Reason:"
-			return $chaincnt
-		else
-			tst_resm TINFO "$TCID: $cmd lists rules."
-		fi
+            # for debian or ubuntu
+            if [ -f /etc/debian_version ]; then
+                if [ $chaincnt -ne 4 ]; then
+                    tst_res TFAIL $LTPTMP/tst_iptables.out \
+                        "$TCID: $cmd failed to list rules. Reason:"
+                        return $chaincnt
+                fi
+            else
+                if [ $chaincnt -ne 3 ]; then
+                    tst_res TFAIL $LTPTMP/tst_iptables.out \
+                        "$TCID: $cmd failed to list rules. Reason:"
+                        return $chaincnt
+                fi
+            fi
+            tst_resm TINFO "$TCID: $cmd lists rules."
 	fi

 	local cmd="iptables -L -t mangle"
--
1.7.9.5


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* [LTP] [LNG][PATCH 8/9] ltp-networking: standardize test result message
  2013-10-29 22:20 [LTP] [LNG][PATCH 0/9] ltp-networking on ubuntu Vincent Hsu
                   ` (6 preceding siblings ...)
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 7/9] ltp-networking/iptables: "iptables -L -t nat" lists 4 chains not 3 chains on Ubuntu 12.04 Vincent Hsu
@ 2013-10-29 22:20 ` Vincent Hsu
  2013-11-07 13:43   ` chrubis
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 9/9] ltp-networking/rpc: gave precise test name Vincent Hsu
  8 siblings, 1 reply; 26+ messages in thread
From: Vincent Hsu @ 2013-10-29 22:20 UTC (permalink / raw)
  To: ltp-list; +Cc: linaro-networking

---
 testcases/network/multicast/mc_cmds/mc_cmds        |    9 +++++++--
 testcases/network/multicast/mc_commo/mc_commo      |    8 ++++++--
 testcases/network/multicast/mc_member/mc_member    |    8 ++++++--
 testcases/network/multicast/mc_opts/mc_opts        |    8 ++++++--
 testcases/network/nfs/fsx-linux/fsx.sh             |    7 +++++--
 testcases/network/nfs/nfs01/nfs01                  |    7 +++++--
 testcases/network/nfs/nfs02/nfs02                  |    7 +++++--
 testcases/network/nfs/nfs03/nfs03                  |    7 +++++--
 testcases/network/nfs/nfslock01/nfslock01          |    7 +++++--
 testcases/network/nfs/nfsstat01/nfsstat01          |    7 +++++--
 testcases/network/nfs/nfsstress/nfsstress          |    7 +++++--
 testcases/network/rpc/basic_tests/rpc01/rpc01      |    7 +++++--
 .../network/rpc/basic_tests/rpcinfo/rpcinfo01      |    7 +++++--
 testcases/network/rpc/basic_tests/rup/rup01        |    7 +++++--
 testcases/network/rpc/basic_tests/rusers/rusers01  |    7 +++++--
 15 files changed, 80 insertions(+), 30 deletions(-)

diff --git a/testcases/network/multicast/mc_cmds/mc_cmds b/testcases/network/multicast/mc_cmds/mc_cmds
index e9b7bb5..e2c410e 100755
--- a/testcases/network/multicast/mc_cmds/mc_cmds
+++ b/testcases/network/multicast/mc_cmds/mc_cmds
@@ -36,6 +36,11 @@ $trace_logic

 TC=mc_cmds
 PING_OUT=/tmp/${TC}_out
+
+export TCID=$TC
+export TST_TOTAL=1
+export TST_COUNT=1
+
 # Set the LTPROOT variable to the correct path
 # from the ltp/testcases/bin directory or the
 # /ltp/testcases/network/multicast/mc_cmds directory
@@ -187,8 +192,8 @@ end_testcase()
    # Call other cleanup functions
    [ $CLEANUP = "ON" ] && do_cleanup

-   [ $# = 0 ] && { echo "Test Successful"; exit 0; }
-   echo "Test Failed: $@"
+   [ $# = 0 ] && { tst_resm TPASS "Test Successful"; exit 0; }
+   tst_resm TFAIL "Test Failed: $@"
    exit 1
 }

diff --git a/testcases/network/multicast/mc_commo/mc_commo b/testcases/network/multicast/mc_commo/mc_commo
index 50fa6b9..14dce85 100755
--- a/testcases/network/multicast/mc_commo/mc_commo
+++ b/testcases/network/multicast/mc_commo/mc_commo
@@ -51,6 +51,10 @@ OUTFILE=$TCtmp/mc_commo_out
 NUMLOOPS=${NUMLOOPS:-2}
 INTERFACE=${INTERFACE:-$("$LTPROOT/bin/gethost" `hostname` | grep addresses: | awk '{print $2}')}

+export TCID=$TC
+export TST_TOTAL=1
+export TST_COUNT=1
+
 this_file=${0##*/}
 trap "interrupt_test" 2

@@ -195,8 +199,8 @@ end_testcase()
    # Call other cleanup functions
    [ $CLEANUP = "ON" ] && do_cleanup

-   [ $# = 0 ] && { echo "Test Successful"; exit 0; }
-   echo "Test Failed: $@"
+   [ $# = 0 ] && { tst_resm TPASS "Test Successful"; exit 0; }
+   tst_resm TFAIL "Test Failed: $@"
    exit 1
 }

diff --git a/testcases/network/multicast/mc_member/mc_member b/testcases/network/multicast/mc_member/mc_member
index 0e79cdb..6801ebf 100755
--- a/testcases/network/multicast/mc_member/mc_member
+++ b/testcases/network/multicast/mc_member/mc_member
@@ -50,6 +50,10 @@ GLIST=${GLIST:-$TCsrc/ManyGroups}
 TooManyGLIST=${TooManyGLIST:-$TCsrc/TooManyGroups}
 ERRFILE=${ERRFILE:-$TCtmp/errors}

+export TCID=$TC
+export TST_TOTAL=1
+export TST_COUNT=1
+
 this_file=${0##*/}
 trap "interrupt_test" 2

@@ -183,8 +187,8 @@ end_testcase()
    # Call other cleanup functions
    [ $CLEANUP = "ON" ] && do_cleanup

-   [ $# = 0 ] && { echo "Test Successful"; exit 0; }
-   echo "Test Failed: $@"
+   [ $# = 0 ] && { tst_resm TPASS "Test Successful"; exit 0; }
+   tst_resm TFAIL "Test Failed: $@"
    exit 1
 }

diff --git a/testcases/network/multicast/mc_opts/mc_opts b/testcases/network/multicast/mc_opts/mc_opts
index 41e1d68..a029f1e 100755
--- a/testcases/network/multicast/mc_opts/mc_opts
+++ b/testcases/network/multicast/mc_opts/mc_opts
@@ -49,6 +49,10 @@ EXECUTABLES=${EXECUTABLES:-"opts opts_e"}
 NUMLOOPS=${NUMLOOPS:-10}
 IPADDR=${IPADDR:-$("$LTPROOT/bin/gethost" `hostname`| grep address |awk '{ print $2 }')}

+export TCID=$TC
+export TST_TOTAL=1
+export TST_COUNT=1
+
 this_file=${0##*/}
 trap "interrupt_test" 2

@@ -138,8 +142,8 @@ end_testcase()
    # Call other cleanup functions
    [ $CLEANUP = "ON" ] && do_cleanup

-   [ $# = 0 ] && { echo "Test Successful"; exit 0; }
-   echo "Test Failed: $@"
+   [ $# = 0 ] && { tst_resm TPASS "Test Successful"; exit 0; }
+   tst_resm TFAIL "Test Failed: $@"
    exit 1
 }

diff --git a/testcases/network/nfs/fsx-linux/fsx.sh b/testcases/network/nfs/fsx-linux/fsx.sh
index a3c4801..facc708 100755
--- a/testcases/network/nfs/fsx-linux/fsx.sh
+++ b/testcases/network/nfs/fsx-linux/fsx.sh
@@ -51,6 +51,9 @@ TCdat=${TCdat:=$TCbin}
 TCsrc=${TCsrc:=$TCbin}
 TCtmp=${TCtmp:=$TCbin/$TC$$}
 TCdump=${TCdump:=$TCbin}
+export TCID=$TC
+export TST_TOTAL=1
+export TST_COUNT=1

 # If CLEANUP is not set; set it to "ON"
 CLEANUP=${CLEANUP:="ON"}
@@ -177,8 +180,8 @@ $trace_logic
  rsh -n $RHOST "rm -rf $TESTDIR"
     fi

-    [ $# = 0 ] && { echo "Test Successful"; exit 0; }
-    echo "Test Failed: $@"
+    [ $# = 0 ] && { tst_resm TPASS "Test Successful"; exit 0; }
+    tst_resm TFAIL "Test Failed: $@"
     exit 1
 }

diff --git a/testcases/network/nfs/nfs01/nfs01 b/testcases/network/nfs/nfs01/nfs01
index e52915c..77d2775 100755
--- a/testcases/network/nfs/nfs01/nfs01
+++ b/testcases/network/nfs/nfs01/nfs01
@@ -48,6 +48,9 @@ TCdat=${TCdat:=$TCbin}
 TCsrc=${TCsrc:=$TCbin}
 TCtmp=${TCtmp:=$TCbin/$TC$$}
 TCdump=${TCdump:=$TCbin}
+export TCID=$TC
+export TST_TOTAL=1
+export TST_COUNT=1

 # If CLEANUP is not set; set it to "ON"
 CLEANUP=${CLEANUP:="ON"}
@@ -187,8 +190,8 @@ $trace_logic
 		 rsh -n $RHOST "rm -rf $TESTDIR"
     fi

-    [ $# = 0 ] && { echo "Test Successful"; exit 0; }
-    echo "Test Failed: $@"
+    [ $# = 0 ] && { tst_resm TPASS "Test Successful"; exit 0; }
+    tst_resm TFAIL "Test Failed: $@"
     exit 1
 }

diff --git a/testcases/network/nfs/nfs02/nfs02 b/testcases/network/nfs/nfs02/nfs02
index 3a157a1..c192d96 100755
--- a/testcases/network/nfs/nfs02/nfs02
+++ b/testcases/network/nfs/nfs02/nfs02
@@ -46,6 +46,9 @@ TCbin=${TCbin:=`pwd`}
 TCdat=${TCdat:=$TCbin/datafiles}
 TCsrc=${TCsrc:=$TCbin}
 TCtmp=${TCtmp:=$TCbin/$TC$$}
+export TCID=$TC
+export TST_TOTAL=1
+export TST_COUNT=1

 PID=$$

@@ -221,8 +224,8 @@ $trace_logic
        do_cleanup
     fi

-    [ $# = 0 ] && { echo "Test Successful"; exit 0; }
-    echo "Test Failed: $@"
+    [ $# = 0 ] && { tst_resm TPASS "Test Successful"; exit 0; }
+    tst_resm TFAIL "Test Failed: $@"
     exit 1
 }

diff --git a/testcases/network/nfs/nfs03/nfs03 b/testcases/network/nfs/nfs03/nfs03
index f1f4bb4..a599a6d 100755
--- a/testcases/network/nfs/nfs03/nfs03
+++ b/testcases/network/nfs/nfs03/nfs03
@@ -49,6 +49,9 @@ TCsrc=${TCsrc:=$TCbin}
 TCtmp=${TCtmp:=$TCbin/$TC$$}
 TCdump=${TCdump:=$TCbin}
 RHOST=${RHOST:=`hostname | awk {'print $1'}`}
+export TCID=$TC
+export TST_TOTAL=1
+export TST_COUNT=1

 PID=$$

@@ -411,8 +414,8 @@ $trace_logic

     fi

-    [ $# = 0 ] && { echo "Test Successful"; exit 0; }
-    echo "Test Failed: $@"
+    [ $# = 0 ] && { tst_resm TPASS "Test Successful"; exit 0; }
+    tst_resm TFAIL "Test Failed: $@"
     exit 1
 }

diff --git a/testcases/network/nfs/nfslock01/nfslock01 b/testcases/network/nfs/nfslock01/nfslock01
index 1e40073..8485d85 100755
--- a/testcases/network/nfs/nfslock01/nfslock01
+++ b/testcases/network/nfs/nfslock01/nfslock01
@@ -42,6 +42,9 @@ TCbin=${TCbin:=`pwd`}
 TCtmp=${TCtmp:=$TCbin/$TC$$}
 TCsrc=${TCsrc:=$TCbin}
 TClog=${TClog:=$TCtmp}
+export TCID=$TC
+export TST_TOTAL=1
+export TST_COUNT=1

 mkdir $TCtmp >/dev/null 2>&1

@@ -129,8 +132,8 @@ end_testcase()
      do_cleanup
    fi

-   [ $# = 0 ] && { echo "Test Successful"; exit 0; }
-   echo "Test Failed: $@"
+   [ $# = 0 ] && { tst_resm TPASS "Test Successful"; exit 0; }
+   tst_resm TFAIL "Test Failed: $@"
    exit 1
 }

diff --git a/testcases/network/nfs/nfsstat01/nfsstat01 b/testcases/network/nfs/nfsstat01/nfsstat01
index 8b54815..7b1ac43 100755
--- a/testcases/network/nfs/nfsstat01/nfsstat01
+++ b/testcases/network/nfs/nfsstat01/nfsstat01
@@ -49,6 +49,9 @@ CLEANUP=${CLEANUP:="ON"}
 VERSION=${VERSION:=3}
 TESTDIR=${TESTDIR:=/tmp/$TC$PID.testdir}
 NFS_TYPE=${NFS_TYPE:nfs}
+export TCID=$TC
+export TST_TOTAL=1
+export TST_COUNT=1

 if [ "x$NFS_TYPE" != "xnfs4" ]; then
     OPTS=${OPTS:="-o vers=$VERSION "}
@@ -236,8 +239,8 @@ $trace_logic
        do_cleanup
     fi

-    [ $? = 0 ] && { echo "Test PASS"; exit 0; }
-    echo "Test FAIL: $@"
+    [ $# = 0 ] && { tst_resm TPASS "Test Successful"; exit 0; }
+    tst_resm TFAIL "Test Failed: $@"
     exit 1
 }

diff --git a/testcases/network/nfs/nfsstress/nfsstress b/testcases/network/nfs/nfsstress/nfsstress
index 914c308..3e078d9 100755
--- a/testcases/network/nfs/nfsstress/nfsstress
+++ b/testcases/network/nfs/nfsstress/nfsstress
@@ -49,6 +49,9 @@ TCsrc=${TCsrc:=$TCbin}
 TCtmp=${TCtmp:=$TCbin/$TC$$}
 TCdump=${TCdump:=$TCbin}
 RHOST=${RHOST:=`hostname|awk {'print $1'}`}
+export TCID=$TC
+export TST_TOTAL=1
+export TST_COUNT=1

 # Setting the NFS to version 3 with UDP by default
 PID=$$
@@ -192,8 +195,8 @@ $trace_logic
 		 rsh -n $RHOST "rm -rf $TESTDIR"
     fi

-    [ $# = 0 ] && { echo "Test Successful"; exit 0; }
-    echo "Test Failed: $@"
+    [ $# = 0 ] && { tst_resm TPASS "Test Successful"; exit 0; }
+    tst_resm TFAIL "Test Failed: $@"
     exit 1
 }

diff --git a/testcases/network/rpc/basic_tests/rpc01/rpc01 b/testcases/network/rpc/basic_tests/rpc01/rpc01
index ef97a95..fd236b1 100755
--- a/testcases/network/rpc/basic_tests/rpc01/rpc01
+++ b/testcases/network/rpc/basic_tests/rpc01/rpc01
@@ -43,6 +43,9 @@ NUMLOOPS=${NUMLOOPS:=3}
 RHOST=${RHOST:=`hostname`}
 CLEANUP=${CLEANUP:="ON"}
 DATAFILES=${DATAFILES:="file.1 file.2"}
+export TCID=$TC
+export TST_TOTAL=1
+export TST_COUNT=1

 #=============================================================================
 # FUNCTION NAME:        do_test
@@ -115,8 +118,8 @@ end_testcase()
    $trace_logic
    echo "$this_file: doing $0."

-   [ $# = 0 ] && { echo "Test Successful"; exit 0; }
-   echo "Test Failed: $@"
+   [ $# = 0 ] && { tst_resm TPASS "Test Successful"; exit 0; }
+   tst_resm TFAIL "Test Failed: $@"
    exit 1
 }

diff --git a/testcases/network/rpc/basic_tests/rpcinfo/rpcinfo01 b/testcases/network/rpc/basic_tests/rpcinfo/rpcinfo01
index 11bdaca..7f8104f 100755
--- a/testcases/network/rpc/basic_tests/rpcinfo/rpcinfo01
+++ b/testcases/network/rpc/basic_tests/rpcinfo/rpcinfo01
@@ -65,6 +65,9 @@ LUSER=${LUSER:=root}
 RHOST=${RHOST:=`hostname`}
 CLEANUP=${CLEANUP:="ON"}
 PID=0
+export TCID=$TC
+export TST_TOTAL=1
+export TST_COUNT=1

 #=============================================================================
 # FUNCTION NAME:        do_test
@@ -273,8 +276,8 @@ end_testcase()
      do_cleanup
    fi

-   [ $# = 0 ] && { echo "Test Successfull"; exit 0; }
-   echo "Test Failed: $@"
+   [ $# = 0 ] && { tst_resm TPASS "Test Successful"; exit 0; }
+   tst_resm TFAIL "Test Failed: $@"
    exit 1
 }

diff --git a/testcases/network/rpc/basic_tests/rup/rup01 b/testcases/network/rpc/basic_tests/rup/rup01
index 229a03f..5845528 100755
--- a/testcases/network/rpc/basic_tests/rup/rup01
+++ b/testcases/network/rpc/basic_tests/rup/rup01
@@ -54,6 +54,9 @@ LUSER=${LUSER:=root}
 RHOST=${RHOST:=`hostname`}
 CLEANUP=${CLEANUP:="ON"}
 PID=0
+export TCID=$TC
+export TST_TOTAL=1
+export TST_COUNT=1

 #=============================================================================
 # FUNCTION NAME:        do_test
@@ -158,8 +161,8 @@ end_testcase()
      do_cleanup
    fi

-   [ $# = 0 ] && { echo "Test Successfull"; exit 0; }
-   echo "Test Failed: $@"
+   [ $# = 0 ] && { tst_resm TPASS "Test Successful"; exit 0; }
+   tst_resm TFAIL "Test Failed: $@"
    exit 1
 }

diff --git a/testcases/network/rpc/basic_tests/rusers/rusers01 b/testcases/network/rpc/basic_tests/rusers/rusers01
index 13c884a..0b28c9e 100755
--- a/testcases/network/rpc/basic_tests/rusers/rusers01
+++ b/testcases/network/rpc/basic_tests/rusers/rusers01
@@ -55,6 +55,9 @@ LUSER=${LUSER:=root}
 RHOST=${RHOST:=`hostname`}
 CLEANUP=${CLEANUP:="ON"}
 PID=0
+export TCID=$TC
+export TST_TOTAL=1
+export TST_COUNT=1

 #=============================================================================
 # FUNCTION NAME:        do_test
@@ -152,8 +155,8 @@ end_testcase()
      do_cleanup
    fi

-   [ $# = 0 ] && { echo "Test Successfull"; exit 0; }
-   echo "Test Failed: $@"
+   [ $# = 0 ] && { tst_resm TPASS "Test Successful"; exit 0; }
+   tst_resm TFAIL "Test Failed: $@"
    exit 1
 }

--
1.7.9.5


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* [LTP] [LNG][PATCH 9/9] ltp-networking/rpc: gave precise test name
  2013-10-29 22:20 [LTP] [LNG][PATCH 0/9] ltp-networking on ubuntu Vincent Hsu
                   ` (7 preceding siblings ...)
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 8/9] ltp-networking: standardize test result message Vincent Hsu
@ 2013-10-29 22:20 ` Vincent Hsu
  2013-11-07 13:45   ` chrubis
  8 siblings, 1 reply; 26+ messages in thread
From: Vincent Hsu @ 2013-10-29 22:20 UTC (permalink / raw)
  To: ltp-list; +Cc: linaro-networking

---
 .../network/rpc/basic_tests/rpcinfo/rpcinfo01      |    2 +-
 testcases/network/rpc/basic_tests/rup/rup01        |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/network/rpc/basic_tests/rpcinfo/rpcinfo01 b/testcases/network/rpc/basic_tests/rpcinfo/rpcinfo01
index 7f8104f..cb063d8 100755
--- a/testcases/network/rpc/basic_tests/rpcinfo/rpcinfo01
+++ b/testcases/network/rpc/basic_tests/rpcinfo/rpcinfo01
@@ -57,7 +57,7 @@

 $trace_logic
 this_file=${0##*/}
-TC=rusers
+TC=rpcinfo01
 TCtmp=${TCtmp:=`pwd`}
 TCbin=${TCbin:=`pwd`}
 TCsrc=${TCsrc:=$TCbin}
diff --git a/testcases/network/rpc/basic_tests/rup/rup01 b/testcases/network/rpc/basic_tests/rup/rup01
index 5845528..99916d4 100755
--- a/testcases/network/rpc/basic_tests/rup/rup01
+++ b/testcases/network/rpc/basic_tests/rup/rup01
@@ -46,7 +46,7 @@

 $trace_logic
 this_file=${0##*/}
-TC=rusers
+TC=rup01
 TCtmp=${TCtmp:=`pwd`}
 TCbin=${TCbin:=`pwd`}
 TCsrc=${TCsrc:=$TCbin}
--
1.7.9.5


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [LNG][PATCH 3/9] ltp-networking/tcp_cmds/finger: finger an unknown host test will return 1 even if execution success on Ubuntu 12.04
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 3/9] ltp-networking/tcp_cmds/finger: finger an unknown host test will return 1 even if execution success " Vincent Hsu
@ 2013-11-07 13:12   ` chrubis
       [not found]     ` <CAARHBVsQQEdYjY59Wa80ZO6TiVvb5gfWRA4vigMPmy-+tyH0jA@mail.gmail.com>
  0 siblings, 1 reply; 26+ messages in thread
From: chrubis @ 2013-11-07 13:12 UTC (permalink / raw)
  To: Vincent Hsu; +Cc: ltp-list, linaro-networking

Hi!
> for example:
>     $ finger @xxxx || echo "test fail"
>     finger: unknown host: xxxx
>     getaddrinfo: No address associated with hostname
>     test fail

Hmm, at my computers (SUSE, Gentoo) it works as:

$ finger @xxxx || echo "test fail"
finger: unknown host: xxxx

Are you sure that finger returns nonzero? From what package and what
version does your finger come from?

Btw what is wrong at the code bellow is the redirection, which does not
work, the >/dev/null should be before the 2>&1. Even if your finger
really returns nonzero the code bellow is quite cryptic as it looks like
it redirects all output from the finger into the /dev/null but it really
just redirects stderr into stdout which goes to the grep...

> ---
>  testcases/network/tcp_cmds/finger/finger01 |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/testcases/network/tcp_cmds/finger/finger01 b/testcases/network/tcp_cmds/finger/finger01
> index 6a72c8f..a5206be 100755
> --- a/testcases/network/tcp_cmds/finger/finger01
> +++ b/testcases/network/tcp_cmds/finger/finger01
> @@ -116,8 +116,8 @@ do_test2()
> 
>      tst_resm TINFO "finger -bad user "
>      finger $BADUSER 2>&1 1>/dev/null || end_testcase "finger $BADUSER"
> -    finger @$BADHOST 2>&1 1>/dev/null || end_testcase "finger @$BADHOST"
> -    if ! finger $BADUSER@$BADHOST 2>&1 1>/dev/null; then
> +    finger @$BADHOST 2>&1 1>/dev/null | grep "finger: unknown host" || end_testcase "finger @$BADHOST"
> +    if ! finger $BADUSER@$BADHOST 2>&1 1>/dev/null | grep "finger: unknown host"; then
>          end_testcase "finger $BADUSER@$BADHOST"
>      fi
>  }

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [LNG][PATCH 4/9] ltp-networking/tcp_cmds/netstat: netstat cmds will return 1 even if no output in stderr on Ubuntu 12.04
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 4/9] ltp-networking/tcp_cmds/netstat: netstat cmds will return 1 even if no output in stderr " Vincent Hsu
@ 2013-11-07 13:14   ` chrubis
       [not found]     ` <CAARHBVvTzEtp=ycDaiTwEwYFRR_DpVu=og-A7TWcOA7gPtwQeQ@mail.gmail.com>
  0 siblings, 1 reply; 26+ messages in thread
From: chrubis @ 2013-11-07 13:14 UTC (permalink / raw)
  To: Vincent Hsu; +Cc: ltp-list, linaro-networking

Hi!
> for example:
>     $ netstat -s 1>netstat/dev/null 2>&1 ; echo $?
>     1

This is completly bogus code, it returns nonzero because the file
'netstat/dev/null' cannot be found. It works for me if I remove the
'netstat' from the line.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [LNG][PATCH 5/9] ltp-networking/tcp_cmds/tcpdump: 1. RHOST IP won't appear in network interfaces. It should be LHOST. 2. Host commad can't fetch IP in no DNS enviroment. use ping intead of it
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 5/9] ltp-networking/tcp_cmds/tcpdump: 1. RHOST IP won't appear in network interfaces. It should be LHOST. 2. Host commad can't fetch IP in no DNS enviroment. use ping intead of it Vincent Hsu
@ 2013-11-07 13:25   ` chrubis
  2013-11-07 14:03     ` chrubis
  2013-11-07 13:27   ` chrubis
  2013-11-08  2:32   ` Simon Xu
  2 siblings, 1 reply; 26+ messages in thread
From: chrubis @ 2013-11-07 13:25 UTC (permalink / raw)
  To: Vincent Hsu; +Cc: ltp-list, linaro-networking

Hi!
>  testcases/network/tcp_cmds/tcpdump/tcpdump01 |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/testcases/network/tcp_cmds/tcpdump/tcpdump01 b/testcases/network/tcp_cmds/tcpdump/tcpdump01
> index 4866720..6d99398 100755
> --- a/testcases/network/tcp_cmds/tcpdump/tcpdump01
> +++ b/testcases/network/tcp_cmds/tcpdump/tcpdump01
> @@ -47,8 +47,8 @@ do_setup()
>      tst_setup
> 
>      exists awk grep host hostname ifconfig netstat ping tail tcpdump
> -    RHOST=${RHOST:-`hostname`}
> -    IP=`host ${RHOST} 2>/dev/null | awk '{print $4}'`
> +    LHOST=${LHOST:-`hostname`}
> +    IP=`ping ${LHOST} -c 1 | awk '{print $3}' | head -n1 | cut -f2 -d'(' | cut -f1 -d')'`
>      IFNUMS=`netstat -i|wc -l`
>      IFNUMS=$(( $IFNUMS - 2 ))
>      IFNAME=${IFNAME:-$(netstat -i | awk '{print $1}' | tail -n ${IFNUMS})}

Technically that fixes the problem, but the parsing is too fragile.

What about rewriting the test to use IP="127.0.0.1" and IFNAME="lo"?

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [LNG][PATCH 5/9] ltp-networking/tcp_cmds/tcpdump: 1. RHOST IP won't appear in network interfaces. It should be LHOST. 2. Host commad can't fetch IP in no DNS enviroment. use ping intead of it
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 5/9] ltp-networking/tcp_cmds/tcpdump: 1. RHOST IP won't appear in network interfaces. It should be LHOST. 2. Host commad can't fetch IP in no DNS enviroment. use ping intead of it Vincent Hsu
  2013-11-07 13:25   ` chrubis
@ 2013-11-07 13:27   ` chrubis
  2013-11-08  2:32   ` Simon Xu
  2 siblings, 0 replies; 26+ messages in thread
From: chrubis @ 2013-11-07 13:27 UTC (permalink / raw)
  To: Vincent Hsu; +Cc: ltp-list, linaro-networking

Hi!
Also make sure that the first line of commit description (which is
translated to the mail Subject is short (usuall < 60 chars) and the
verbose commit description goes into the mail body. (i.e. is after empty
line in the git commit message)

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [LNG][PATCH 1/9] ltp-networking/nfs: Setting the NFS to version 3 by default. NFSv3 is more compatibled with recent linux distributions.
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 1/9] ltp-networking/nfs: Setting the NFS to version 3 by default. NFSv3 is more compatibled with recent linux distributions Vincent Hsu
@ 2013-11-07 13:29   ` chrubis
       [not found]     ` <CAARHBVvTfK3B6dMPXvwd0dajfFWv_cNX-DkV_fHUnZjuB04u+A@mail.gmail.com>
  0 siblings, 1 reply; 26+ messages in thread
From: chrubis @ 2013-11-07 13:29 UTC (permalink / raw)
  To: Vincent Hsu; +Cc: ltp-list, linaro-networking

Hi!
This patch is fine, but the description is not right (the subject is too
long). Please fix and resend.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [LNG][PATCH 2/9] ltp-networking/nfs: don't use absolute path for showmount. showmount does not locate at /user/sbin/showmount on Ubuntu 12.04.
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 2/9] ltp-networking/nfs: don't use absolute path for showmount. showmount does not locate at /user/sbin/showmount on Ubuntu 12.04 Vincent Hsu
@ 2013-11-07 13:29   ` chrubis
  0 siblings, 0 replies; 26+ messages in thread
From: chrubis @ 2013-11-07 13:29 UTC (permalink / raw)
  To: Vincent Hsu; +Cc: ltp-list, linaro-networking

Hi!
This patch is fine, but the description is not right (the subject is too
long). Please fix and resend.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [LNG][PATCH 7/9] ltp-networking/iptables: "iptables -L -t nat" lists 4 chains not 3 chains on Ubuntu 12.04
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 7/9] ltp-networking/iptables: "iptables -L -t nat" lists 4 chains not 3 chains on Ubuntu 12.04 Vincent Hsu
@ 2013-11-07 13:31   ` chrubis
  2013-11-08  2:30   ` Simon Xu
  1 sibling, 0 replies; 26+ messages in thread
From: chrubis @ 2013-11-07 13:31 UTC (permalink / raw)
  To: Vincent Hsu; +Cc: ltp-list, linaro-networking

Hi!
> ---
>  testcases/network/iptables/iptables_tests.sh |   22 +++++++++++++++-------
>  1 file changed, 15 insertions(+), 7 deletions(-)
> 
> diff --git a/testcases/network/iptables/iptables_tests.sh b/testcases/network/iptables/iptables_tests.sh
> index 028d54e..641f327 100755
> --- a/testcases/network/iptables/iptables_tests.sh
> +++ b/testcases/network/iptables/iptables_tests.sh
> @@ -165,13 +165,21 @@ test01()
>  		return $RC
>  	else
>  		chaincnt=$(grep -c Chain $LTPTMP/tst_iptables.out)
> -		if [ $chaincnt -ne 3 ]; then
> -			tst_res TFAIL $LTPTMP/tst_iptables.out \
> -				"$TCID: $cmd failed to list rules. Reason:"
> -			return $chaincnt
> -		else
> -			tst_resm TINFO "$TCID: $cmd lists rules."
> -		fi
> +            # for debian or ubuntu
> +            if [ -f /etc/debian_version ]; then
> +                if [ $chaincnt -ne 4 ]; then
> +                    tst_res TFAIL $LTPTMP/tst_iptables.out \
> +                        "$TCID: $cmd failed to list rules. Reason:"
> +                        return $chaincnt
> +                fi
> +            else
> +                if [ $chaincnt -ne 3 ]; then
> +                    tst_res TFAIL $LTPTMP/tst_iptables.out \
> +                        "$TCID: $cmd failed to list rules. Reason:"
> +                        return $chaincnt
> +                fi
> +            fi
> +            tst_resm TINFO "$TCID: $cmd lists rules."
>  	fi

It has four Chain lines on basically every new enough Linux. So let's
accept either 3 or 4 in the general case.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [LNG][PATCH 8/9] ltp-networking: standardize test result message
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 8/9] ltp-networking: standardize test result message Vincent Hsu
@ 2013-11-07 13:43   ` chrubis
  0 siblings, 0 replies; 26+ messages in thread
From: chrubis @ 2013-11-07 13:43 UTC (permalink / raw)
  To: Vincent Hsu; +Cc: ltp-list, linaro-networking

Hi!
This patch is OK, but needs to be applied after the NFS default version
patch. So I'm not applying it now.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [LNG][PATCH 9/9] ltp-networking/rpc: gave precise test name
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 9/9] ltp-networking/rpc: gave precise test name Vincent Hsu
@ 2013-11-07 13:45   ` chrubis
  0 siblings, 0 replies; 26+ messages in thread
From: chrubis @ 2013-11-07 13:45 UTC (permalink / raw)
  To: Vincent Hsu; +Cc: ltp-list, linaro-networking

Hi!
> ---

This patch is fine, but misses the Signed-off-by: line. Please configure
you git username and email and commit patches with 'git commit -s'.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [LNG][PATCH 6/9] ltp-networking/iproute: ip02: set original mtu size back. this test will set mtu to 300. ip05: if there is nott only one route using "head" command will get wrong result.
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 6/9] ltp-networking/iproute: ip02: set original mtu size back. this test will set mtu to 300. ip05: if there is nott only one route using "head" command will get wrong result Vincent Hsu
@ 2013-11-07 13:52   ` chrubis
  0 siblings, 0 replies; 26+ messages in thread
From: chrubis @ 2013-11-07 13:52 UTC (permalink / raw)
  To: Vincent Hsu; +Cc: ltp-list, linaro-networking

Hi!
> -		ip route show | head -n1 >$LTPTMP/tst_ip.out 2>&1 || RC=$?
> +		ip route show >$LTPTMP/tst_ip.out.tmp
> +        grep "10.6.6.6 via 127.0.0.1 dev lo" $LTPTMP/tst_ip.out.tmp \
> +            >$LTPTMP/tst_ip.out 2>&1 || RC=$?

Minus the indentation this looks reasonable, but you can do better and
pipe the output from ip route show directly to grep and use -q (quiet).

ip route show | grep -q "10.6.6.6 via 127.0.0.1 dev lo" || RC=$?

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [LNG][PATCH 5/9] ltp-networking/tcp_cmds/tcpdump: 1. RHOST IP won't appear in network interfaces. It should be LHOST. 2. Host commad can't fetch IP in no DNS enviroment. use ping intead of it
  2013-11-07 13:25   ` chrubis
@ 2013-11-07 14:03     ` chrubis
  0 siblings, 0 replies; 26+ messages in thread
From: chrubis @ 2013-11-07 14:03 UTC (permalink / raw)
  To: Vincent Hsu; +Cc: ltp-list, linaro-networking

Hi!
> Technically that fixes the problem, but the parsing is too fragile.
> 
> What about rewriting the test to use IP="127.0.0.1" and IFNAME="lo"?

I've just applied a fix for this problem from Simon, see 87f593c.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [LNG][PATCH 7/9] ltp-networking/iptables: "iptables -L -t nat" lists 4 chains not 3 chains on Ubuntu 12.04
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 7/9] ltp-networking/iptables: "iptables -L -t nat" lists 4 chains not 3 chains on Ubuntu 12.04 Vincent Hsu
  2013-11-07 13:31   ` chrubis
@ 2013-11-08  2:30   ` Simon Xu
  1 sibling, 0 replies; 26+ messages in thread
From: Simon Xu @ 2013-11-08  2:30 UTC (permalink / raw)
  To: Vincent Hsu, ltp-list; +Cc: linaro-networking

Hi,

Please see 
https://github.com/linux-test-project/ltp/commit/792fcce8ae68436c8963c6a51f1f98c66c575494

Thanks
Simon

On 2013/10/30 6:20, Vincent Hsu wrote:
> ---
>   testcases/network/iptables/iptables_tests.sh |   22 +++++++++++++++-------
>   1 file changed, 15 insertions(+), 7 deletions(-)
>
> diff --git a/testcases/network/iptables/iptables_tests.sh b/testcases/network/iptables/iptables_tests.sh
> index 028d54e..641f327 100755
> --- a/testcases/network/iptables/iptables_tests.sh
> +++ b/testcases/network/iptables/iptables_tests.sh
> @@ -165,13 +165,21 @@ test01()
>   		return $RC
>   	else
>   		chaincnt=$(grep -c Chain $LTPTMP/tst_iptables.out)
> -		if [ $chaincnt -ne 3 ]; then
> -			tst_res TFAIL $LTPTMP/tst_iptables.out \
> -				"$TCID: $cmd failed to list rules. Reason:"
> -			return $chaincnt
> -		else
> -			tst_resm TINFO "$TCID: $cmd lists rules."
> -		fi
> +            # for debian or ubuntu
> +            if [ -f /etc/debian_version ]; then
> +                if [ $chaincnt -ne 4 ]; then
> +                    tst_res TFAIL $LTPTMP/tst_iptables.out \
> +                        "$TCID: $cmd failed to list rules. Reason:"
> +                        return $chaincnt
> +                fi
> +            else
> +                if [ $chaincnt -ne 3 ]; then
> +                    tst_res TFAIL $LTPTMP/tst_iptables.out \
> +                        "$TCID: $cmd failed to list rules. Reason:"
> +                        return $chaincnt
> +                fi
> +            fi
> +            tst_resm TINFO "$TCID: $cmd lists rules."
>   	fi
>
>   	local cmd="iptables -L -t mangle"
> --
> 1.7.9.5
>
>
> ------------------------------------------------------------------------------
> Android is increasing in popularity, but the open development platform that
> developers love is also attractive to malware creators. Download this white
> paper to learn more about secure code signing practices that can help keep
> Android apps secure.
> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [LNG][PATCH 5/9] ltp-networking/tcp_cmds/tcpdump: 1. RHOST IP won't appear in network interfaces. It should be LHOST. 2. Host commad can't fetch IP in no DNS enviroment. use ping intead of it
  2013-10-29 22:20 ` [LTP] [LNG][PATCH 5/9] ltp-networking/tcp_cmds/tcpdump: 1. RHOST IP won't appear in network interfaces. It should be LHOST. 2. Host commad can't fetch IP in no DNS enviroment. use ping intead of it Vincent Hsu
  2013-11-07 13:25   ` chrubis
  2013-11-07 13:27   ` chrubis
@ 2013-11-08  2:32   ` Simon Xu
  2 siblings, 0 replies; 26+ messages in thread
From: Simon Xu @ 2013-11-08  2:32 UTC (permalink / raw)
  To: Vincent Hsu, ltp-list; +Cc: linaro-networking

Hi,

Please see 
https://github.com/linux-test-project/ltp/commit/87f593c16f80c3f204c87de276c426aeb65c3527

Thanks
Simon

On 2013/10/30 6:20, Vincent Hsu wrote:
> ---
>   testcases/network/tcp_cmds/tcpdump/tcpdump01 |    4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/testcases/network/tcp_cmds/tcpdump/tcpdump01 b/testcases/network/tcp_cmds/tcpdump/tcpdump01
> index 4866720..6d99398 100755
> --- a/testcases/network/tcp_cmds/tcpdump/tcpdump01
> +++ b/testcases/network/tcp_cmds/tcpdump/tcpdump01
> @@ -47,8 +47,8 @@ do_setup()
>       tst_setup
>
>       exists awk grep host hostname ifconfig netstat ping tail tcpdump
> -    RHOST=${RHOST:-`hostname`}
> -    IP=`host ${RHOST} 2>/dev/null | awk '{print $4}'`
> +    LHOST=${LHOST:-`hostname`}
> +    IP=`ping ${LHOST} -c 1 | awk '{print $3}' | head -n1 | cut -f2 -d'(' | cut -f1 -d')'`
>       IFNUMS=`netstat -i|wc -l`
>       IFNUMS=$(( $IFNUMS - 2 ))
>       IFNAME=${IFNAME:-$(netstat -i | awk '{print $1}' | tail -n ${IFNUMS})}
> --
> 1.7.9.5
>
>
> ------------------------------------------------------------------------------
> Android is increasing in popularity, but the open development platform that
> developers love is also attractive to malware creators. Download this white
> paper to learn more about secure code signing practices that can help keep
> Android apps secure.
> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [LNG][PATCH 3/9] ltp-networking/tcp_cmds/finger: finger an unknown host test will return 1 even if execution success on Ubuntu 12.04
       [not found]     ` <CAARHBVsQQEdYjY59Wa80ZO6TiVvb5gfWRA4vigMPmy-+tyH0jA@mail.gmail.com>
@ 2013-11-11 13:14       ` chrubis
  0 siblings, 0 replies; 26+ messages in thread
From: chrubis @ 2013-11-11 13:14 UTC (permalink / raw)
  To: Vincent Hsu; +Cc: ltp-list, Linaro Networking

Hi!
> > > for example:
> > >     $ finger @xxxx || echo "test fail"
> > >     finger: unknown host: xxxx
> > >     getaddrinfo: No address associated with hostname
> > >     test fail
> >
> > Hmm, at my computers (SUSE, Gentoo) it works as:
> >
> > $ finger @xxxx || echo "test fail"
> > finger: unknown host: xxxx
> >
> > Are you sure that finger returns nonzero? From what package and what
> > version does your finger come from?
> >
> Yes, it returns nonzero in ubuntu. I have tested it in centos before, it
> returned zero same as your enviroment. I thinks it doen't relative to the
> package version, because it also happened in netstat test. I considerd that
> the default shell in ubuntu is dash not bash before, but it doesn't help
> even I forced to use bash. Maybe it cause by the bash version or something
> else, I could find the root cause yet. If you have time can you test it in
> debian based distribution?
> 
> However, I gave by finger and bash package version below, it seems applying
> some patch not pure packages.
> 
> apt-get source finger
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Picking 'bsd-finger' as source package instead of 'finger'
> Need to get 37.6 kB of source archives.
> Get:1 http://ubuntu.cs.nctu.edu.tw/ubuntu/ precise/main bsd-finger 0.17-14
> (dsc) [1,653 B]
> Get:2 http://ubuntu.cs.nctu.edu.tw/ubuntu/ precise/main bsd-finger 0.17-14
> (tar) [25.5 kB]
> Get:3 http://ubuntu.cs.nctu.edu.tw/ubuntu/ precise/main bsd-finger 0.17-14
> (diff) [10.4 kB]
> Fetched 37.6 kB in 0s (168 kB/s)
> gpgv: Signature made Fri 12 Feb 2010 02:03:58 PM CST using RSA key ID
> 947897D8
> gpgv: Can't check signature: public key not found
> dpkg-source: warning: failed to verify signature on ./bsd-finger_0.17-14.dsc
> dpkg-source: info: extracting bsd-finger in bsd-finger-0.17
> dpkg-source: info: unpacking bsd-finger_0.17.orig.tar.gz
> dpkg-source: info: unpacking bsd-finger_0.17-14.debian.tar.bz2
> dpkg-source: info: applying 01-legacy.patch
> dpkg-source: info: applying 02-518559-nsswitch-sources.patch
> dpkg-source: info: applying 03-468454-fingerd-ipv6.patch
> dpkg-source: info: applying 04-468454-finger-ipv6.patch
> dpkg-source: info: applying 05-547014-netgroup.patch

Looks like this is caused by the 01-legacy.patch that is part of the
debian package and gets picked up by ubuntu as well.

> > Btw what is wrong at the code bellow is the redirection, which does not
> > work, the >/dev/null should be before the 2>&1. Even if your finger
> > really returns nonzero the code bellow is quite cryptic as it looks like
> > it redirects all output from the finger into the /dev/null but it really
> > just redirects stderr into stdout which goes to the grep...
> >
> Yes, I thinks the redirection sequence is weird, I just don't want to do
> many modifications of the  original code. Can you help to improve it?

Just send fixes for the redirection in separate patch first and then
patch that fixes the finger return value.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [LNG][PATCH 1/9] ltp-networking/nfs: Setting the NFS to version 3 by default. NFSv3 is more compatibled with recent linux distributions.
       [not found]       ` <CAARHBVuOoFVrr7L_f=sMKykjYsawvuzG+wYWOrZDsLTBxpEcGQ@mail.gmail.com>
@ 2013-11-11 13:32         ` chrubis
  0 siblings, 0 replies; 26+ messages in thread
From: chrubis @ 2013-11-11 13:32 UTC (permalink / raw)
  To: Vincent Hsu; +Cc: ltp-list, Linaro Networking

Hi!
> I forget to remark something about this patch.
> 
> Many linux distributions (ubuntu, centos) doesn't enable nfsv2 client
> support in default kernel config (CONFIG_NFS_V2=y). ref.
> http://kernel.ubuntu.com/~kernel-ppa/configs/natty/amd64-config.flavour.generic
> 
> Although Ubuntu disabled nfsv3 in nfsd initial script
> (/etc/init.d/nfs-kernel-server). I think configuring scripts is better than
> recompling kernel. So I suggest to set this test to nfsv3+. Maybe nfsv4 is
> the best option, it work fine in both client and server side in ubuntu. But
> I saw another test named nfsv4 test, it may confict. How do you think?

Making it nfsv3+ seems like safe default to me.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [LNG][PATCH 4/9] ltp-networking/tcp_cmds/netstat: netstat cmds will return 1 even if no output in stderr on Ubuntu 12.04
       [not found]     ` <CAARHBVvTzEtp=ycDaiTwEwYFRR_DpVu=og-A7TWcOA7gPtwQeQ@mail.gmail.com>
@ 2013-11-11 13:49       ` chrubis
  0 siblings, 0 replies; 26+ messages in thread
From: chrubis @ 2013-11-11 13:49 UTC (permalink / raw)
  To: Vincent Hsu; +Cc: ltp-list, Linaro Networking

Hi!
> > > for example:
> > >     $ netstat -s 1>netstat/dev/null 2>&1 ; echo $?
> > >     1
> >
> > This is completly bogus code, it returns nonzero because the file
> > 'netstat/dev/null' cannot be found. It works for me if I remove the
> > 'netstat' from the line.
> >
> Sorry, it a typo.

Ok.

> it will returns nonzero in ubuntu 12.04. it's a similar case to finger test.
> 
> for example:
>     $ netstat -s 1>/dev/null 2>&1 ; echo $?
>     1

Ah, so the -s is correct netstat switch and the 1 is invalid parameter
(which gets ignored here) but apparently debian base distros are patched
to return non-zero.

So resend the patch with correct description (i.e. that this fixes the
test on debian based distributions).

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

end of thread, other threads:[~2013-11-11 13:50 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-29 22:20 [LTP] [LNG][PATCH 0/9] ltp-networking on ubuntu Vincent Hsu
2013-10-29 22:20 ` [LTP] [LNG][PATCH 1/9] ltp-networking/nfs: Setting the NFS to version 3 by default. NFSv3 is more compatibled with recent linux distributions Vincent Hsu
2013-11-07 13:29   ` chrubis
     [not found]     ` <CAARHBVvTfK3B6dMPXvwd0dajfFWv_cNX-DkV_fHUnZjuB04u+A@mail.gmail.com>
     [not found]       ` <CAARHBVuOoFVrr7L_f=sMKykjYsawvuzG+wYWOrZDsLTBxpEcGQ@mail.gmail.com>
2013-11-11 13:32         ` chrubis
2013-10-29 22:20 ` [LTP] [LNG][PATCH 2/9] ltp-networking/nfs: don't use absolute path for showmount. showmount does not locate at /user/sbin/showmount on Ubuntu 12.04 Vincent Hsu
2013-11-07 13:29   ` chrubis
2013-10-29 22:20 ` [LTP] [LNG][PATCH 3/9] ltp-networking/tcp_cmds/finger: finger an unknown host test will return 1 even if execution success " Vincent Hsu
2013-11-07 13:12   ` chrubis
     [not found]     ` <CAARHBVsQQEdYjY59Wa80ZO6TiVvb5gfWRA4vigMPmy-+tyH0jA@mail.gmail.com>
2013-11-11 13:14       ` chrubis
2013-10-29 22:20 ` [LTP] [LNG][PATCH 4/9] ltp-networking/tcp_cmds/netstat: netstat cmds will return 1 even if no output in stderr " Vincent Hsu
2013-11-07 13:14   ` chrubis
     [not found]     ` <CAARHBVvTzEtp=ycDaiTwEwYFRR_DpVu=og-A7TWcOA7gPtwQeQ@mail.gmail.com>
2013-11-11 13:49       ` chrubis
2013-10-29 22:20 ` [LTP] [LNG][PATCH 5/9] ltp-networking/tcp_cmds/tcpdump: 1. RHOST IP won't appear in network interfaces. It should be LHOST. 2. Host commad can't fetch IP in no DNS enviroment. use ping intead of it Vincent Hsu
2013-11-07 13:25   ` chrubis
2013-11-07 14:03     ` chrubis
2013-11-07 13:27   ` chrubis
2013-11-08  2:32   ` Simon Xu
2013-10-29 22:20 ` [LTP] [LNG][PATCH 6/9] ltp-networking/iproute: ip02: set original mtu size back. this test will set mtu to 300. ip05: if there is nott only one route using "head" command will get wrong result Vincent Hsu
2013-11-07 13:52   ` chrubis
2013-10-29 22:20 ` [LTP] [LNG][PATCH 7/9] ltp-networking/iptables: "iptables -L -t nat" lists 4 chains not 3 chains on Ubuntu 12.04 Vincent Hsu
2013-11-07 13:31   ` chrubis
2013-11-08  2:30   ` Simon Xu
2013-10-29 22:20 ` [LTP] [LNG][PATCH 8/9] ltp-networking: standardize test result message Vincent Hsu
2013-11-07 13:43   ` chrubis
2013-10-29 22:20 ` [LTP] [LNG][PATCH 9/9] ltp-networking/rpc: gave precise test name Vincent Hsu
2013-11-07 13:45   ` chrubis

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.