diff mbox series

[1/6] fs/acls/acl_test01: Fix shellcheck issue SC2069

Message ID 20180420031855.22657-1-yixin.zhang@intel.com
State Accepted
Delegated to: Petr Vorel
Headers show
Series [1/6] fs/acls/acl_test01: Fix shellcheck issue SC2069 | expand

Commit Message

Yixin Zhang April 20, 2018, 3:18 a.m. UTC
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(-)

Comments

Petr Vorel April 20, 2018, 8:26 a.m. UTC | #1
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
Cyril Hrubis April 20, 2018, 8:28 a.m. UTC | #2
Hi!
> thanks for fixes, obviously correct whole patchset.

Looks correct to me as well, peter go ahead and apply this
please.
Petr Vorel April 20, 2018, 9:08 a.m. UTC | #3
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
diff mbox series

Patch

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