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

Yixin Zhang yixin.zhang@intel.com
Fri Apr 20 05:18:50 CEST 2018


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



More information about the ltp mailing list