* [LTP] [PATCH ltp 1/6] fs/acls/acl_test01: Fix shellcheck issue SC2069
@ 2018-04-20 3:18 Yixin Zhang
2018-04-20 3:18 ` [LTP] [PATCH ltp 2/6] io/stress_floppy/stress_floppy: " Yixin Zhang
` (6 more replies)
0 siblings, 7 replies; 9+ messages in thread
From: Yixin Zhang @ 2018-04-20 3:18 UTC (permalink / raw)
To: ltp
error: The order of the 2>&1 and the redirect matters. The 2>&1 has to
be last. [SC2069]
Signed-off-by: Yixin Zhang <yixin.zhang@intel.com>
---
testcases/kernel/fs/acls/acl_test01 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/kernel/fs/acls/acl_test01 b/testcases/kernel/fs/acls/acl_test01
index 63683e707..c91eb5686 100755
--- a/testcases/kernel/fs/acls/acl_test01
+++ b/testcases/kernel/fs/acls/acl_test01
@@ -78,7 +78,7 @@ do_setup()
tst_brkm TCONF "[ losetup.1 ] Failed to find an available loopback device -- is the required support compiled in your kernel?"
fi
- if ! losetup $LOOP_DEV $TMP/tacl/blkext3 2>&1 > /dev/null; then
+ if ! losetup $LOOP_DEV $TMP/tacl/blkext3 > /dev/null 2>&1; then
echo ""
tst_brkm TCONF "[ losetup.2 ] Failed to setup the device."
fi
--
2.14.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [LTP] [PATCH ltp 2/6] io/stress_floppy/stress_floppy: Fix shellcheck issue SC2069
2018-04-20 3:18 [LTP] [PATCH ltp 1/6] fs/acls/acl_test01: Fix shellcheck issue SC2069 Yixin Zhang
@ 2018-04-20 3:18 ` Yixin Zhang
2018-04-20 3:18 ` [LTP] [PATCH ltp 3/6] numa/numa01.sh: " Yixin Zhang
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Yixin Zhang @ 2018-04-20 3:18 UTC (permalink / raw)
To: ltp
error: The order of the 2>&1 and the redirect matters. The 2>&1 has to
be last. [SC2069]
Signed-off-by: Yixin Zhang <yixin.zhang@intel.com>
---
testcases/kernel/io/stress_floppy/stress_floppy | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/testcases/kernel/io/stress_floppy/stress_floppy b/testcases/kernel/io/stress_floppy/stress_floppy
index b269f5ffe..ff327dffb 100755
--- a/testcases/kernel/io/stress_floppy/stress_floppy
+++ b/testcases/kernel/io/stress_floppy/stress_floppy
@@ -96,7 +96,7 @@ test_tar()
else
tst_resm TINFO "$the_file Tar read passed."
fi
- diff $TCdat/dumpdir/$the_file $the_file 2>&1 >/dev/null
+ diff $TCdat/dumpdir/$the_file $the_file >/dev/null 2>&1
if [ $? -ne 0 ]; then
tst_resm TFAIL "Diff of the $the_file tar files failed!"
return
@@ -140,7 +140,7 @@ test_dump()
for the_file in 1K_file 10K_file 100K_file
do
- diff dumpdir/$the_file /$TCdat/dumpdir/$the_file 2>&1 >/dev/null
+ diff dumpdir/$the_file /$TCdat/dumpdir/$the_file >/dev/null 2>&1
if [ $? -ne 0 ]; then
tst_resm TFAIL \
"Diff of the $the_file backup files failed!"
@@ -180,7 +180,7 @@ test_cpio()
else
tst_resm TINFO "$the_file cpio read passed."
fi
- diff $TCdat/dumpdir/$the_file $the_file 2>&1 >/dev/null
+ diff $TCdat/dumpdir/$the_file $the_file >/dev/null 2>&1
if [ $? -ne 0 ]; then
tst_resm TFAIL \
"Diff of the $the_file cpio files failed!"
@@ -213,7 +213,7 @@ test_dd()
else
tst_resm TINFO "$the_file dd read passed."
fi
- diff $TCdat/$the_file $the_file 2>&1 >/dev/null
+ diff $TCdat/$the_file $the_file >/dev/null 2>&1
if [ $? -ne 0 ]; then
tst_resm TFAIL "Diff of the $the_file dd files failed!"
return
--
2.14.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [LTP] [PATCH ltp 3/6] numa/numa01.sh: Fix shellcheck issue SC2069
2018-04-20 3:18 [LTP] [PATCH ltp 1/6] fs/acls/acl_test01: Fix shellcheck issue SC2069 Yixin Zhang
2018-04-20 3:18 ` [LTP] [PATCH ltp 2/6] io/stress_floppy/stress_floppy: " Yixin Zhang
@ 2018-04-20 3:18 ` Yixin Zhang
2018-04-20 3:18 ` [LTP] [PATCH ltp 4/6] network/nfs/fsx-linux/fsx.sh: " Yixin Zhang
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Yixin Zhang @ 2018-04-20 3:18 UTC (permalink / raw)
To: ltp
error: The order of the 2>&1 and the redirect matters. The 2>&1 has to
be last. [SC2069]
Signed-off-by: Yixin Zhang <yixin.zhang@intel.com>
---
testcases/kernel/numa/numa01.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/kernel/numa/numa01.sh b/testcases/kernel/numa/numa01.sh
index fd3b4be64..27a2f2f7c 100755
--- a/testcases/kernel/numa/numa01.sh
+++ b/testcases/kernel/numa/numa01.sh
@@ -315,7 +315,7 @@ test8()
# Memory will be allocated using round robin on nodes.
Exp_incr=$(echo "$MB / $total_nodes" |bc)
- numactl --interleave=all memhog -r1000000 1MB 2>&1 >ltp_numa_test8.log &
+ numactl --interleave=all memhog -r1000000 1MB >ltp_numa_test8.log 2>&1 &
pid=$!
local retries=20
--
2.14.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [LTP] [PATCH ltp 4/6] network/nfs/fsx-linux/fsx.sh: Fix shellcheck issue SC2069
2018-04-20 3:18 [LTP] [PATCH ltp 1/6] fs/acls/acl_test01: Fix shellcheck issue SC2069 Yixin Zhang
2018-04-20 3:18 ` [LTP] [PATCH ltp 2/6] io/stress_floppy/stress_floppy: " Yixin Zhang
2018-04-20 3:18 ` [LTP] [PATCH ltp 3/6] numa/numa01.sh: " Yixin Zhang
@ 2018-04-20 3:18 ` Yixin Zhang
2018-04-20 3:18 ` [LTP] [PATCH ltp 5/6] network/tcp_cmds/host/host01: " Yixin Zhang
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Yixin Zhang @ 2018-04-20 3:18 UTC (permalink / raw)
To: ltp
error: The order of the 2>&1 and the redirect matters. The 2>&1 has to
be last. [SC2069]
Signed-off-by: Yixin Zhang <yixin.zhang@intel.com>
---
testcases/network/nfs/fsx-linux/fsx.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/network/nfs/fsx-linux/fsx.sh b/testcases/network/nfs/fsx-linux/fsx.sh
index 473ecb2da..84ad0e204 100755
--- a/testcases/network/nfs/fsx-linux/fsx.sh
+++ b/testcases/network/nfs/fsx-linux/fsx.sh
@@ -33,7 +33,7 @@ do_test()
{
ITERATIONS=${ITERATIONS:=50000}
tst_resm TINFO "starting fsx-linux -N $ITERATIONS..."
- fsx-linux -N $ITERATIONS testfile 2>&1 > fsx-out.log
+ fsx-linux -N $ITERATIONS testfile > fsx-out.log 2>&1
if [ "$?" -ne 0 ]; then
tst_resm TFAIL "Errors have resulted from this test"
cat fsx-out.log
--
2.14.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [LTP] [PATCH ltp 5/6] network/tcp_cmds/host/host01: Fix shellcheck issue SC2069
2018-04-20 3:18 [LTP] [PATCH ltp 1/6] fs/acls/acl_test01: Fix shellcheck issue SC2069 Yixin Zhang
` (2 preceding siblings ...)
2018-04-20 3:18 ` [LTP] [PATCH ltp 4/6] network/nfs/fsx-linux/fsx.sh: " Yixin Zhang
@ 2018-04-20 3:18 ` Yixin Zhang
2018-04-20 3:18 ` [LTP] [PATCH ltp 6/6] network/tcp_cmds/rcp/rcp01: Fix shellcheck issue SC2157/SC2069 Yixin Zhang
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Yixin Zhang @ 2018-04-20 3:18 UTC (permalink / raw)
To: ltp
error: The order of the 2>&1 and the redirect matters. The 2>&1 has to
be last. [SC2069]
Signed-off-by: Yixin Zhang <yixin.zhang@intel.com>
---
testcases/network/tcp_cmds/host/host01 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/testcases/network/tcp_cmds/host/host01 b/testcases/network/tcp_cmds/host/host01
index fb59e35fa..1308870f7 100755
--- a/testcases/network/tcp_cmds/host/host01
+++ b/testcases/network/tcp_cmds/host/host01
@@ -60,8 +60,8 @@ do_test()
while [ $TST_COUNT -lt $NUMLOOPS ]; do
if rhost_addr=$(host $RHOST); then
- rhost_addr=$(echo "$rhost_addr" | awk -F, '{print $NF}') 2>&1 >/dev/null
- if ! host $rhost_addr 2>&1 >/dev/null; then
+ rhost_addr=$(echo "$rhost_addr" | awk -F, '{print $NF}') >/dev/null 2>&1
+ if ! host $rhost_addr >/dev/null 2>&1; then
end_testcase "reverse lookup with host failed"
fi
--
2.14.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [LTP] [PATCH ltp 6/6] network/tcp_cmds/rcp/rcp01: Fix shellcheck issue SC2157/SC2069
2018-04-20 3:18 [LTP] [PATCH ltp 1/6] fs/acls/acl_test01: Fix shellcheck issue SC2069 Yixin Zhang
` (3 preceding siblings ...)
2018-04-20 3:18 ` [LTP] [PATCH ltp 5/6] network/tcp_cmds/host/host01: " Yixin Zhang
@ 2018-04-20 3:18 ` Yixin Zhang
2018-04-20 8:26 ` [LTP] [PATCH ltp 1/6] fs/acls/acl_test01: Fix shellcheck issue SC2069 Petr Vorel
2018-04-20 9:08 ` Petr Vorel
6 siblings, 0 replies; 9+ messages in thread
From: Yixin Zhang @ 2018-04-20 3:18 UTC (permalink / raw)
To: ltp
error: Argument to implicit -n is always true due to literal strings. [SC2157]
error: The order of the 2>&1 and the redirect matters. The 2>&1 has to be last. [SC2069]
Signed-off-by: Yixin Zhang <yixin.zhang@intel.com>
---
testcases/network/tcp_cmds/rcp/rcp01 | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/testcases/network/tcp_cmds/rcp/rcp01 b/testcases/network/tcp_cmds/rcp/rcp01
index 1f54471cd..4eaeca175 100755
--- a/testcases/network/tcp_cmds/rcp/rcp01
+++ b/testcases/network/tcp_cmds/rcp/rcp01
@@ -55,7 +55,7 @@ do_setup()
exists awk rcp rsh sum
- if ! rsh -n -l root $RHOST mkdir -p $TCtmp 2>&1 1>/dev/null; then
+ if ! rsh -n -l root $RHOST mkdir -p $TCtmp >/dev/null 2>&1; then
end_testcase "Remote mkdir failed"
fi
@@ -83,7 +83,7 @@ do_test()
rsh -n -l root $RHOST "rm -f $TCtmp/$j"
sleep $SLEEPTIME
- if [ "$SUM1 = $SUM2" ]; then
+ if [ "$SUM1" = "$SUM2" ]; then
tst_resm TINFO "rcp $TCdat/$j $RHOST:$TCtmp/$j successful"
else
end_testcase "FAILED: wrong sum in transfer to $RHOST"
@@ -96,7 +96,7 @@ do_test()
for j in $FILES; do
tst_resm TINFO "remote copying $RHOST:$TCdat/$j to $TCtmp/$j"
- if ! rcp $RHOST:$TCdat/$j $TCtmp/$j 2>&1 1>/dev/null; then
+ if ! rcp $RHOST:$TCdat/$j $TCtmp/$j >/dev/null 2>&1; then
tst_resm TFAIL "Failed to rcp file."; continue
fi
--
2.14.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [LTP] [PATCH ltp 1/6] fs/acls/acl_test01: Fix shellcheck issue SC2069
2018-04-20 3:18 [LTP] [PATCH ltp 1/6] fs/acls/acl_test01: Fix shellcheck issue SC2069 Yixin Zhang
` (4 preceding siblings ...)
2018-04-20 3:18 ` [LTP] [PATCH ltp 6/6] network/tcp_cmds/rcp/rcp01: Fix shellcheck issue SC2157/SC2069 Yixin Zhang
@ 2018-04-20 8:26 ` Petr Vorel
2018-04-20 8:28 ` Cyril Hrubis
2018-04-20 9:08 ` Petr Vorel
6 siblings, 1 reply; 9+ messages in thread
From: Petr Vorel @ 2018-04-20 8:26 UTC (permalink / raw)
To: ltp
Hi Yixin,
thanks for fixes, obviously correct whole patchset.
Acked-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
> error: The order of the 2>&1 and the redirect matters. The 2>&1 has to
> be last. [SC2069]
> Signed-off-by: Yixin Zhang <yixin.zhang@intel.com>
> ---
> testcases/kernel/fs/acls/acl_test01 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/testcases/kernel/fs/acls/acl_test01 b/testcases/kernel/fs/acls/acl_test01
> index 63683e707..c91eb5686 100755
> --- a/testcases/kernel/fs/acls/acl_test01
> +++ b/testcases/kernel/fs/acls/acl_test01
> @@ -78,7 +78,7 @@ do_setup()
> tst_brkm TCONF "[ losetup.1 ] Failed to find an available loopback device -- is the required support compiled in your kernel?"
> fi
> - if ! losetup $LOOP_DEV $TMP/tacl/blkext3 2>&1 > /dev/null; then
> + if ! losetup $LOOP_DEV $TMP/tacl/blkext3 > /dev/null 2>&1; then
> echo ""
> tst_brkm TCONF "[ losetup.2 ] Failed to setup the device."
> fi
^ permalink raw reply [flat|nested] 9+ messages in thread
* [LTP] [PATCH ltp 1/6] fs/acls/acl_test01: Fix shellcheck issue SC2069
2018-04-20 8:26 ` [LTP] [PATCH ltp 1/6] fs/acls/acl_test01: Fix shellcheck issue SC2069 Petr Vorel
@ 2018-04-20 8:28 ` Cyril Hrubis
0 siblings, 0 replies; 9+ messages in thread
From: Cyril Hrubis @ 2018-04-20 8:28 UTC (permalink / raw)
To: ltp
Hi!
> thanks for fixes, obviously correct whole patchset.
Looks correct to me as well, peter go ahead and apply this
please.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 9+ messages in thread
* [LTP] [PATCH ltp 1/6] fs/acls/acl_test01: Fix shellcheck issue SC2069
2018-04-20 3:18 [LTP] [PATCH ltp 1/6] fs/acls/acl_test01: Fix shellcheck issue SC2069 Yixin Zhang
` (5 preceding siblings ...)
2018-04-20 8:26 ` [LTP] [PATCH ltp 1/6] fs/acls/acl_test01: Fix shellcheck issue SC2069 Petr Vorel
@ 2018-04-20 9:08 ` Petr Vorel
6 siblings, 0 replies; 9+ messages in thread
From: Petr Vorel @ 2018-04-20 9:08 UTC (permalink / raw)
To: ltp
Hi Yixin,
> error: The order of the 2>&1 and the redirect matters. The 2>&1 has to
> be last. [SC2069]
> Signed-off-by: Yixin Zhang <yixin.zhang@intel.com>
> ---
Pushed whole patchset.
Thanks!
Kind regards,
Petr
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-04-20 9:08 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-20 3:18 [LTP] [PATCH ltp 1/6] fs/acls/acl_test01: Fix shellcheck issue SC2069 Yixin Zhang
2018-04-20 3:18 ` [LTP] [PATCH ltp 2/6] io/stress_floppy/stress_floppy: " Yixin Zhang
2018-04-20 3:18 ` [LTP] [PATCH ltp 3/6] numa/numa01.sh: " Yixin Zhang
2018-04-20 3:18 ` [LTP] [PATCH ltp 4/6] network/nfs/fsx-linux/fsx.sh: " Yixin Zhang
2018-04-20 3:18 ` [LTP] [PATCH ltp 5/6] network/tcp_cmds/host/host01: " Yixin Zhang
2018-04-20 3:18 ` [LTP] [PATCH ltp 6/6] network/tcp_cmds/rcp/rcp01: Fix shellcheck issue SC2157/SC2069 Yixin Zhang
2018-04-20 8:26 ` [LTP] [PATCH ltp 1/6] fs/acls/acl_test01: Fix shellcheck issue SC2069 Petr Vorel
2018-04-20 8:28 ` Cyril Hrubis
2018-04-20 9:08 ` Petr Vorel
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.