public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] testscripts: make redirects happen in correct order
@ 2015-09-21  9:33 Wei Jiangang
  0 siblings, 0 replies; 9+ messages in thread
From: Wei Jiangang @ 2015-09-21  9:33 UTC (permalink / raw)
  To: ltp

It should redirect stdout to /dev/null firstly,
then redirect stderr to whatever stdout currently points at.

Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
---
 testscripts/ltpstress.sh   |  4 ++--
 testscripts/runEALtests.sh | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/testscripts/ltpstress.sh b/testscripts/ltpstress.sh
index 39a5caf..1a16779 100755
--- a/testscripts/ltpstress.sh
+++ b/testscripts/ltpstress.sh
@@ -265,10 +265,10 @@ fi
 ulimit -u unlimited
 
 if [ $PROC_NUM -gt 0 ];then
-  genload --vm $PROC_NUM --vm-bytes 1073741824 2>&1 1>/dev/null &
+  genload --vm $PROC_NUM --vm-bytes 1073741824 1>/dev/null 2>&1 &
 fi
 if [ $leftover_memsize -gt 0 ];then
-  genload --vm 1 --vm-bytes $(($leftover_memsize * 1024)) 2>&1 1>/dev/null &
+  genload --vm 1 --vm-bytes $(($leftover_memsize * 1024)) 1>/dev/null 2>&1 &
 fi
 
 if [ $NO_NETWORK -eq 0 ];then
diff --git a/testscripts/runEALtests.sh b/testscripts/runEALtests.sh
index bcd3f29..577be28 100755
--- a/testscripts/runEALtests.sh
+++ b/testscripts/runEALtests.sh
@@ -84,7 +84,7 @@ fi
 while getopts cd:f:hi:l:m:Nnpqr:t:x arg
 do  case $arg in
     c)
-            $LTPROOT/../testcases/bin/genload --cpu 1 2>&1 1>/dev/null &
+            $LTPROOT/../testcases/bin/genload --cpu 1 1>/dev/null 2>&1 &
 	    GenLoad=1 ;;
 
     d)      # append $$ to TMP, as it is recursively
@@ -97,9 +97,9 @@ do  case $arg in
 
     i)
             bytesize=$(($OPTARG * 1024 * 1024))
-            $LTPROOT/../testcases/bin/genload --io 1 2>&1 1>/dev/null &
+            $LTPROOT/../testcases/bin/genload --io 1 1>/dev/null 2>&1 &
             $LTPROOT/../testcases/bin/genload --hdd 0 --hdd-bytes $bytesize \
-            2>&1 1>/dev/null &
+            1>/dev/null 2>&1 &
 	    GenLoad=1 ;;
 
     l)
@@ -125,7 +125,7 @@ do  case $arg in
     m)
             memsize=$(($OPTARG * 1024 * 1024))
 	    $LTPROOT/../testcases/bin/genload  --vm 0 --vm-bytes $memsize\
-            2>&1 1>/dev/null &
+            1>/dev/null 2>&1 &
 	    GenLoad=1;;
 
     N)	    run_netest=1;;
@@ -217,7 +217,7 @@ fi
 
 if [ $GenLoad -eq 1 ]
 then
-	killall -9 genload
+	killall -9 genload >/dev/null 2>&1
 fi
 
 if [ $NetPipe -eq 1 ]
-- 
1.9.3


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

* [LTP] [PATCH 1/2] testscripts: make redirects happen in correct order
@ 2015-09-30  3:25 Wei Jiangang
  2015-09-30  3:25 ` [LTP] [PATCH 2/2] cpuhotplug_hotplug.sh: do/done should be left-aligned Wei Jiangang
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Wei Jiangang @ 2015-09-30  3:25 UTC (permalink / raw)
  To: ltp

It should redirect stdout to /dev/null firstly,
then redirect stderr to whatever stdout currently points at.

Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
---
 testscripts/ltpstress.sh   |  4 ++--
 testscripts/runEALtests.sh | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/testscripts/ltpstress.sh b/testscripts/ltpstress.sh
index 39a5caf..1a16779 100755
--- a/testscripts/ltpstress.sh
+++ b/testscripts/ltpstress.sh
@@ -265,10 +265,10 @@ fi
 ulimit -u unlimited
 
 if [ $PROC_NUM -gt 0 ];then
-  genload --vm $PROC_NUM --vm-bytes 1073741824 2>&1 1>/dev/null &
+  genload --vm $PROC_NUM --vm-bytes 1073741824 1>/dev/null 2>&1 &
 fi
 if [ $leftover_memsize -gt 0 ];then
-  genload --vm 1 --vm-bytes $(($leftover_memsize * 1024)) 2>&1 1>/dev/null &
+  genload --vm 1 --vm-bytes $(($leftover_memsize * 1024)) 1>/dev/null 2>&1 &
 fi
 
 if [ $NO_NETWORK -eq 0 ];then
diff --git a/testscripts/runEALtests.sh b/testscripts/runEALtests.sh
index bcd3f29..577be28 100755
--- a/testscripts/runEALtests.sh
+++ b/testscripts/runEALtests.sh
@@ -84,7 +84,7 @@ fi
 while getopts cd:f:hi:l:m:Nnpqr:t:x arg
 do  case $arg in
     c)
-            $LTPROOT/../testcases/bin/genload --cpu 1 2>&1 1>/dev/null &
+            $LTPROOT/../testcases/bin/genload --cpu 1 1>/dev/null 2>&1 &
 	    GenLoad=1 ;;
 
     d)      # append $$ to TMP, as it is recursively
@@ -97,9 +97,9 @@ do  case $arg in
 
     i)
             bytesize=$(($OPTARG * 1024 * 1024))
-            $LTPROOT/../testcases/bin/genload --io 1 2>&1 1>/dev/null &
+            $LTPROOT/../testcases/bin/genload --io 1 1>/dev/null 2>&1 &
             $LTPROOT/../testcases/bin/genload --hdd 0 --hdd-bytes $bytesize \
-            2>&1 1>/dev/null &
+            1>/dev/null 2>&1 &
 	    GenLoad=1 ;;
 
     l)
@@ -125,7 +125,7 @@ do  case $arg in
     m)
             memsize=$(($OPTARG * 1024 * 1024))
 	    $LTPROOT/../testcases/bin/genload  --vm 0 --vm-bytes $memsize\
-            2>&1 1>/dev/null &
+            1>/dev/null 2>&1 &
 	    GenLoad=1;;
 
     N)	    run_netest=1;;
@@ -217,7 +217,7 @@ fi
 
 if [ $GenLoad -eq 1 ]
 then
-	killall -9 genload
+	killall -9 genload >/dev/null 2>&1
 fi
 
 if [ $NetPipe -eq 1 ]
-- 
1.9.3


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

* [LTP] [PATCH 2/2] cpuhotplug_hotplug.sh: do/done should be left-aligned
  2015-09-30  3:25 [LTP] [PATCH 1/2] testscripts: make redirects happen in correct order Wei Jiangang
@ 2015-09-30  3:25 ` Wei Jiangang
  2015-09-30 12:18   ` Cyril Hrubis
  2015-09-30  4:20 ` [LTP] [PATCH 1/2] testscripts: make redirects happen in correct order Wei, Jiangang
  2015-09-30 12:16 ` Cyril Hrubis
  2 siblings, 1 reply; 9+ messages in thread
From: Wei Jiangang @ 2015-09-30  3:25 UTC (permalink / raw)
  To: ltp

Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
---
 testcases/kernel/hotplug/cpu_hotplug/include/cpuhotplug_hotplug.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/hotplug/cpu_hotplug/include/cpuhotplug_hotplug.sh b/testcases/kernel/hotplug/cpu_hotplug/include/cpuhotplug_hotplug.sh
index d9cf965..ad8675a 100644
--- a/testcases/kernel/hotplug/cpu_hotplug/include/cpuhotplug_hotplug.sh
+++ b/testcases/kernel/hotplug/cpu_hotplug/include/cpuhotplug_hotplug.sh
@@ -28,7 +28,7 @@ migrate_irq()
     MASK=$((1<<${CPU}))
     IRQS=$2
     for irq in ${IRQS}
-      do
+    do
       echo $MASK > /proc/irq/${irq}/smp_affinity || \
         tst_resm TINFO "It is NOT permitted to change the IRQ $irq smp_affinity"
     done
-- 
1.9.3


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

* [LTP] [PATCH 1/2] testscripts: make redirects happen in correct order
  2015-09-30  3:25 [LTP] [PATCH 1/2] testscripts: make redirects happen in correct order Wei Jiangang
  2015-09-30  3:25 ` [LTP] [PATCH 2/2] cpuhotplug_hotplug.sh: do/done should be left-aligned Wei Jiangang
@ 2015-09-30  4:20 ` Wei, Jiangang
  2015-09-30 12:16 ` Cyril Hrubis
  2 siblings, 0 replies; 9+ messages in thread
From: Wei, Jiangang @ 2015-09-30  4:20 UTC (permalink / raw)
  To: ltp

The patch set had been sent at 2015/09/21.
But  no feedback received.
I'm afraid of them was flooded.
so send again.
 
On Wed, 2015-09-30 at 11:25 +0800, Wei Jiangang wrote:
> It should redirect stdout to /dev/null firstly,
> then redirect stderr to whatever stdout currently points at.
> 
> Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
> ---
>  testscripts/ltpstress.sh   |  4 ++--
>  testscripts/runEALtests.sh | 10 +++++-----
>  2 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/testscripts/ltpstress.sh b/testscripts/ltpstress.sh
> index 39a5caf..1a16779 100755
> --- a/testscripts/ltpstress.sh
> +++ b/testscripts/ltpstress.sh
> @@ -265,10 +265,10 @@ fi
>  ulimit -u unlimited
>  
>  if [ $PROC_NUM -gt 0 ];then
> -  genload --vm $PROC_NUM --vm-bytes 1073741824 2>&1 1>/dev/null &
> +  genload --vm $PROC_NUM --vm-bytes 1073741824 1>/dev/null 2>&1 &
>  fi
>  if [ $leftover_memsize -gt 0 ];then
> -  genload --vm 1 --vm-bytes $(($leftover_memsize * 1024)) 2>&1 1>/dev/null &
> +  genload --vm 1 --vm-bytes $(($leftover_memsize * 1024)) 1>/dev/null 2>&1 &
>  fi
>  
>  if [ $NO_NETWORK -eq 0 ];then
> diff --git a/testscripts/runEALtests.sh b/testscripts/runEALtests.sh
> index bcd3f29..577be28 100755
> --- a/testscripts/runEALtests.sh
> +++ b/testscripts/runEALtests.sh
> @@ -84,7 +84,7 @@ fi
>  while getopts cd:f:hi:l:m:Nnpqr:t:x arg
>  do  case $arg in
>      c)
> -            $LTPROOT/../testcases/bin/genload --cpu 1 2>&1 1>/dev/null &
> +            $LTPROOT/../testcases/bin/genload --cpu 1 1>/dev/null 2>&1 &
>  	    GenLoad=1 ;;
>  
>      d)      # append $$ to TMP, as it is recursively
> @@ -97,9 +97,9 @@ do  case $arg in
>  
>      i)
>              bytesize=$(($OPTARG * 1024 * 1024))
> -            $LTPROOT/../testcases/bin/genload --io 1 2>&1 1>/dev/null &
> +            $LTPROOT/../testcases/bin/genload --io 1 1>/dev/null 2>&1 &
>              $LTPROOT/../testcases/bin/genload --hdd 0 --hdd-bytes $bytesize \
> -            2>&1 1>/dev/null &
> +            1>/dev/null 2>&1 &
>  	    GenLoad=1 ;;
>  
>      l)
> @@ -125,7 +125,7 @@ do  case $arg in
>      m)
>              memsize=$(($OPTARG * 1024 * 1024))
>  	    $LTPROOT/../testcases/bin/genload  --vm 0 --vm-bytes $memsize\
> -            2>&1 1>/dev/null &
> +            1>/dev/null 2>&1 &
>  	    GenLoad=1;;
>  
>      N)	    run_netest=1;;
> @@ -217,7 +217,7 @@ fi
>  
>  if [ $GenLoad -eq 1 ]
>  then
> -	killall -9 genload
> +	killall -9 genload >/dev/null 2>&1
>  fi
>  
>  if [ $NetPipe -eq 1 ]


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

* [LTP] [PATCH 1/2] testscripts: make redirects happen in correct order
  2015-09-30  3:25 [LTP] [PATCH 1/2] testscripts: make redirects happen in correct order Wei Jiangang
  2015-09-30  3:25 ` [LTP] [PATCH 2/2] cpuhotplug_hotplug.sh: do/done should be left-aligned Wei Jiangang
  2015-09-30  4:20 ` [LTP] [PATCH 1/2] testscripts: make redirects happen in correct order Wei, Jiangang
@ 2015-09-30 12:16 ` Cyril Hrubis
  2015-10-07  1:45   ` [LTP] [PATCH v2 " Wei Jiangang
  2 siblings, 1 reply; 9+ messages in thread
From: Cyril Hrubis @ 2015-09-30 12:16 UTC (permalink / raw)
  To: ltp

Hi!
>  if [ $PROC_NUM -gt 0 ];then
> -  genload --vm $PROC_NUM --vm-bytes 1073741824 2>&1 1>/dev/null &
> +  genload --vm $PROC_NUM --vm-bytes 1073741824 1>/dev/null 2>&1 &

Can we also change the redirect to canonical form (>/dev/null 2>&1)?

Otherwise it looks fine to me.

-- 
Cyril Hrubis
chrubis@suse.cz

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

* [LTP] [PATCH 2/2] cpuhotplug_hotplug.sh: do/done should be left-aligned
  2015-09-30  3:25 ` [LTP] [PATCH 2/2] cpuhotplug_hotplug.sh: do/done should be left-aligned Wei Jiangang
@ 2015-09-30 12:18   ` Cyril Hrubis
  0 siblings, 0 replies; 9+ messages in thread
From: Cyril Hrubis @ 2015-09-30 12:18 UTC (permalink / raw)
  To: ltp

Hi!
> diff --git a/testcases/kernel/hotplug/cpu_hotplug/include/cpuhotplug_hotplug.sh b/testcases/kernel/hotplug/cpu_hotplug/include/cpuhotplug_hotplug.sh
> index d9cf965..ad8675a 100644
> --- a/testcases/kernel/hotplug/cpu_hotplug/include/cpuhotplug_hotplug.sh
> +++ b/testcases/kernel/hotplug/cpu_hotplug/include/cpuhotplug_hotplug.sh
> @@ -28,7 +28,7 @@ migrate_irq()
>      MASK=$((1<<${CPU}))
>      IRQS=$2
>      for irq in ${IRQS}
> -      do
> +    do

The rest of the file has for cycles with semicolon and do on the same
line. Let's be consistent and change this one to the same style as well.

-- 
Cyril Hrubis
chrubis@suse.cz

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

* [LTP] [PATCH v2 1/2] testscripts: make redirects happen in correct order
  2015-09-30 12:16 ` Cyril Hrubis
@ 2015-10-07  1:45   ` Wei Jiangang
  2015-10-07  1:45     ` [LTP] [PATCH v2 2/2] cpuhotplug_hotplug.sh: change the style of for-loop Wei Jiangang
  0 siblings, 1 reply; 9+ messages in thread
From: Wei Jiangang @ 2015-10-07  1:45 UTC (permalink / raw)
  To: ltp

It should redirect stdout to /dev/null firstly,
then redirect stderr to whatever stdout currently points at.

Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
---
 testscripts/ltpstress.sh   |  4 ++--
 testscripts/runEALtests.sh | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/testscripts/ltpstress.sh b/testscripts/ltpstress.sh
index 39a5caf..651d3da 100755
--- a/testscripts/ltpstress.sh
+++ b/testscripts/ltpstress.sh
@@ -265,10 +265,10 @@ fi
 ulimit -u unlimited
 
 if [ $PROC_NUM -gt 0 ];then
-  genload --vm $PROC_NUM --vm-bytes 1073741824 2>&1 1>/dev/null &
+  genload --vm $PROC_NUM --vm-bytes 1073741824 >/dev/null 2>&1 &
 fi
 if [ $leftover_memsize -gt 0 ];then
-  genload --vm 1 --vm-bytes $(($leftover_memsize * 1024)) 2>&1 1>/dev/null &
+  genload --vm 1 --vm-bytes $(($leftover_memsize * 1024)) >/dev/null 2>&1 &
 fi
 
 if [ $NO_NETWORK -eq 0 ];then
diff --git a/testscripts/runEALtests.sh b/testscripts/runEALtests.sh
index bcd3f29..a70bfad 100755
--- a/testscripts/runEALtests.sh
+++ b/testscripts/runEALtests.sh
@@ -84,7 +84,7 @@ fi
 while getopts cd:f:hi:l:m:Nnpqr:t:x arg
 do  case $arg in
     c)
-            $LTPROOT/../testcases/bin/genload --cpu 1 2>&1 1>/dev/null &
+            $LTPROOT/../testcases/bin/genload --cpu 1 >/dev/null 2>&1 &
 	    GenLoad=1 ;;
 
     d)      # append $$ to TMP, as it is recursively
@@ -97,9 +97,9 @@ do  case $arg in
 
     i)
             bytesize=$(($OPTARG * 1024 * 1024))
-            $LTPROOT/../testcases/bin/genload --io 1 2>&1 1>/dev/null &
+            $LTPROOT/../testcases/bin/genload --io 1 >/dev/null 2>&1 &
             $LTPROOT/../testcases/bin/genload --hdd 0 --hdd-bytes $bytesize \
-            2>&1 1>/dev/null &
+            >/dev/null 2>&1 &
 	    GenLoad=1 ;;
 
     l)
@@ -125,7 +125,7 @@ do  case $arg in
     m)
             memsize=$(($OPTARG * 1024 * 1024))
 	    $LTPROOT/../testcases/bin/genload  --vm 0 --vm-bytes $memsize\
-            2>&1 1>/dev/null &
+            >/dev/null 2>&1 &
 	    GenLoad=1;;
 
     N)	    run_netest=1;;
@@ -217,7 +217,7 @@ fi
 
 if [ $GenLoad -eq 1 ]
 then
-	killall -9 genload
+	killall -9 genload >/dev/null 2>&1
 fi
 
 if [ $NetPipe -eq 1 ]
-- 
1.9.3


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

* [LTP] [PATCH v2 2/2] cpuhotplug_hotplug.sh: change the style of for-loop
  2015-10-07  1:45   ` [LTP] [PATCH v2 " Wei Jiangang
@ 2015-10-07  1:45     ` Wei Jiangang
  2015-10-07 12:29       ` Cyril Hrubis
  0 siblings, 1 reply; 9+ messages in thread
From: Wei Jiangang @ 2015-10-07  1:45 UTC (permalink / raw)
  To: ltp

Let do and for cycles on same line by using semicolon.

Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
---
 testcases/kernel/hotplug/cpu_hotplug/include/cpuhotplug_hotplug.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/testcases/kernel/hotplug/cpu_hotplug/include/cpuhotplug_hotplug.sh b/testcases/kernel/hotplug/cpu_hotplug/include/cpuhotplug_hotplug.sh
index d9cf965..f23463b 100644
--- a/testcases/kernel/hotplug/cpu_hotplug/include/cpuhotplug_hotplug.sh
+++ b/testcases/kernel/hotplug/cpu_hotplug/include/cpuhotplug_hotplug.sh
@@ -27,8 +27,7 @@ migrate_irq()
     CPU=${1#cpu}
     MASK=$((1<<${CPU}))
     IRQS=$2
-    for irq in ${IRQS}
-      do
+    for irq in ${IRQS}; do
       echo $MASK > /proc/irq/${irq}/smp_affinity || \
         tst_resm TINFO "It is NOT permitted to change the IRQ $irq smp_affinity"
     done
-- 
1.9.3


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

* [LTP] [PATCH v2 2/2] cpuhotplug_hotplug.sh: change the style of for-loop
  2015-10-07  1:45     ` [LTP] [PATCH v2 2/2] cpuhotplug_hotplug.sh: change the style of for-loop Wei Jiangang
@ 2015-10-07 12:29       ` Cyril Hrubis
  0 siblings, 0 replies; 9+ messages in thread
From: Cyril Hrubis @ 2015-10-07 12:29 UTC (permalink / raw)
  To: ltp

Hi!
Both pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

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

end of thread, other threads:[~2015-10-07 12:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-30  3:25 [LTP] [PATCH 1/2] testscripts: make redirects happen in correct order Wei Jiangang
2015-09-30  3:25 ` [LTP] [PATCH 2/2] cpuhotplug_hotplug.sh: do/done should be left-aligned Wei Jiangang
2015-09-30 12:18   ` Cyril Hrubis
2015-09-30  4:20 ` [LTP] [PATCH 1/2] testscripts: make redirects happen in correct order Wei, Jiangang
2015-09-30 12:16 ` Cyril Hrubis
2015-10-07  1:45   ` [LTP] [PATCH v2 " Wei Jiangang
2015-10-07  1:45     ` [LTP] [PATCH v2 2/2] cpuhotplug_hotplug.sh: change the style of for-loop Wei Jiangang
2015-10-07 12:29       ` Cyril Hrubis
  -- strict thread matches above, loose matches on Subject: below --
2015-09-21  9:33 [LTP] [PATCH 1/2] testscripts: make redirects happen in correct order Wei Jiangang

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