public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [LNG][PATCH V2 0/2] fixing over 80 chars
@ 2013-11-27  6:37 Vincent Hsu
  2013-11-27  6:37 ` [LTP] [LNG][PATCH V2 1/2] ltp-networking/tcp_cmds/finger: fix finger test Vincent Hsu
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Vincent Hsu @ 2013-11-27  6:37 UTC (permalink / raw)
  To: ltp-list; +Cc: linaro-networking

Hi,
I've fixed the over 80 characters lines that my patches adds,
but there are other lines over 80 chars in the same file.
eg.
    checkpatch.pl -f testcases/network/iproute/ip_tests.sh
    ....
    WARNING: line over 80 characters
    #575: FILE: network/iproute/ip_tests.sh:575:
    +                       ip maddr show | grep "66:66:00:00:00:66" &>$LTPTMP/tst_ip.err \
    total: 0 errors, 22 warnings, 611 lines checked

BTW, some test files combine spaces and tabs for indentation, and also have
over 80 chars lines.
eg.
    testcases/network/multicast/*
    testcases/network/nfs/*

Maybe you could clean up them when you have time :)

Vincent Hsu (2):
  ltp-networking/tcp_cmds/finger: fix finger test
  ltp-networking/iproute: fix iproute test

 testcases/network/iproute/ip_tests.sh      |    7 ++++++-
 testcases/network/tcp_cmds/finger/finger01 |    9 ++++++---
 2 files changed, 12 insertions(+), 4 deletions(-)

--
1.7.9.5


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&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] 5+ messages in thread

* [LTP] [LNG][PATCH V2 1/2] ltp-networking/tcp_cmds/finger: fix finger test
  2013-11-27  6:37 [LTP] [LNG][PATCH V2 0/2] fixing over 80 chars Vincent Hsu
@ 2013-11-27  6:37 ` Vincent Hsu
  2013-11-27  6:37 ` [LTP] [LNG][PATCH V2 2/2] ltp-networking/iproute: fix iproute test Vincent Hsu
  2013-12-10 13:57 ` [LTP] [LNG][PATCH V2 0/2] fixing over 80 chars chrubis
  2 siblings, 0 replies; 5+ messages in thread
From: Vincent Hsu @ 2013-11-27  6:37 UTC (permalink / raw)
  To: ltp-list; +Cc: linaro-networking

Ubuntu use modified finger command. finger an unknown host test will
return nonzero on Ubuntu 12.04 even if successful execution.

for example:
on Ubuntu
    finger @xxx 2>&1 1>/dev/null ; echo $?
will return
    finger: unknown host: xxx
    getaddrinfo: No address associated with hostname
    1
on CentOS
    finger @xxx 2>&1 1>/dev/null ; echo $?
will return
    finger: xxx: nodename nor servname provided, or not known
    0

Signed-off-by: Vincent Hsu <vincent.hsu@linaro.org>
---
 testcases/network/tcp_cmds/finger/finger01 |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/testcases/network/tcp_cmds/finger/finger01 b/testcases/network/tcp_cmds/finger/finger01
index 6a72c8f..81da3e0 100755
--- a/testcases/network/tcp_cmds/finger/finger01
+++ b/testcases/network/tcp_cmds/finger/finger01
@@ -116,8 +116,10 @@ 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
 }
@@ -158,7 +160,8 @@ do_test3()
         end_testcase "finger -m $RUSER@$RHOST"
     fi

-    tst_resm TINFO "finger -p : suppresses printing of .plan files on long and brief long formats"
+    tst_resm TINFO "finger -p : suppresses printing of .plan files on long and \
+        brief long formats"
     finger -p  2>&1 1>/dev/null || end_testcase "finger -p"
     finger -p $LUSER  2>&1 1>/dev/null || end_testcase "finger -p $LUSER"
     finger -p @$LHOST  2>&1 1>/dev/null || end_testcase "finger -p @$LHOST"
--
1.7.9.5


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&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] 5+ messages in thread

* [LTP] [LNG][PATCH V2 2/2] ltp-networking/iproute: fix iproute test
  2013-11-27  6:37 [LTP] [LNG][PATCH V2 0/2] fixing over 80 chars Vincent Hsu
  2013-11-27  6:37 ` [LTP] [LNG][PATCH V2 1/2] ltp-networking/tcp_cmds/finger: fix finger test Vincent Hsu
@ 2013-11-27  6:37 ` Vincent Hsu
  2013-12-10 15:29   ` chrubis
  2013-12-10 13:57 ` [LTP] [LNG][PATCH V2 0/2] fixing over 80 chars chrubis
  2 siblings, 1 reply; 5+ messages in thread
From: Vincent Hsu @ 2013-11-27  6:37 UTC (permalink / raw)
  To: ltp-list; +Cc: linaro-networking

ip02: set original mtu size back. this test will modify mtu to 300.
ip05: if there is not only one route, using "head" command will get
      wrong result.

Signed-off-by: Vincent Hsu <vincent.hsu@linaro.org>
---
 testcases/network/iproute/ip_tests.sh |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/testcases/network/iproute/ip_tests.sh b/testcases/network/iproute/ip_tests.sh
index ce4cabc..0416300 100755
--- a/testcases/network/iproute/ip_tests.sh
+++ b/testcases/network/iproute/ip_tests.sh
@@ -187,6 +187,8 @@ 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 +200,8 @@ 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 +457,8 @@ 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 | grep "10.6.6.6 via 127.0.0.1 dev lo" \
+			>$LTPTMP/tst_ip.out 2>&1 || RC=$?
 		if [ $RC -ne 0 ]
 		then
 			tst_res TFAIL $LTPTMP/tst_ip.err \
--
1.7.9.5


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&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] 5+ messages in thread

* Re: [LTP] [LNG][PATCH V2 0/2] fixing over 80 chars
  2013-11-27  6:37 [LTP] [LNG][PATCH V2 0/2] fixing over 80 chars Vincent Hsu
  2013-11-27  6:37 ` [LTP] [LNG][PATCH V2 1/2] ltp-networking/tcp_cmds/finger: fix finger test Vincent Hsu
  2013-11-27  6:37 ` [LTP] [LNG][PATCH V2 2/2] ltp-networking/iproute: fix iproute test Vincent Hsu
@ 2013-12-10 13:57 ` chrubis
  2 siblings, 0 replies; 5+ messages in thread
From: chrubis @ 2013-12-10 13:57 UTC (permalink / raw)
  To: Vincent Hsu; +Cc: ltp-list, linaro-networking

Hi!
> I've fixed the over 80 characters lines that my patches adds,
> but there are other lines over 80 chars in the same file.
> eg.
>     checkpatch.pl -f testcases/network/iproute/ip_tests.sh
>     ....
>     WARNING: line over 80 characters
>     #575: FILE: network/iproute/ip_tests.sh:575:
>     +                       ip maddr show | grep "66:66:00:00:00:66" &>$LTPTMP/tst_ip.err \
>     total: 0 errors, 22 warnings, 611 lines checked
> 
> BTW, some test files combine spaces and tabs for indentation, and also have
> over 80 chars lines.
> eg.
>     testcases/network/multicast/*
>     testcases/network/nfs/*
> 
> Maybe you could clean up them when you have time :)

There is a lot of legacy and messed up code and we are fixing it as fast
as we can...

But in order to get somewhere newly added code should be clean,
otherwise we will never get to a clean codebase.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&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] 5+ messages in thread

* Re: [LTP] [LNG][PATCH V2 2/2] ltp-networking/iproute: fix iproute test
  2013-11-27  6:37 ` [LTP] [LNG][PATCH V2 2/2] ltp-networking/iproute: fix iproute test Vincent Hsu
@ 2013-12-10 15:29   ` chrubis
  0 siblings, 0 replies; 5+ messages in thread
From: chrubis @ 2013-12-10 15:29 UTC (permalink / raw)
  To: Vincent Hsu; +Cc: ltp-list, linaro-networking

Hi!
> ip02: set original mtu size back. this test will modify mtu to 300.
> ip05: if there is not only one route, using "head" command will get
>       wrong result.
> 
> Signed-off-by: Vincent Hsu <vincent.hsu@linaro.org>

Both pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&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] 5+ messages in thread

end of thread, other threads:[~2013-12-10 15:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-27  6:37 [LTP] [LNG][PATCH V2 0/2] fixing over 80 chars Vincent Hsu
2013-11-27  6:37 ` [LTP] [LNG][PATCH V2 1/2] ltp-networking/tcp_cmds/finger: fix finger test Vincent Hsu
2013-11-27  6:37 ` [LTP] [LNG][PATCH V2 2/2] ltp-networking/iproute: fix iproute test Vincent Hsu
2013-12-10 15:29   ` chrubis
2013-12-10 13:57 ` [LTP] [LNG][PATCH V2 0/2] fixing over 80 chars chrubis

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