]> granicus.if.org Git - zfs/commitdiff
Fix chattr_001_pos
authorLOLi <loli10K@users.noreply.github.com>
Fri, 7 Jul 2017 22:45:29 +0000 (00:45 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 7 Jul 2017 22:45:29 +0000 (15:45 -0700)
Commands should be eval()ed if they involve a shell redirection,
otherwise we end up writing log_* functions messages to the output.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #6300
Closes #6323

tests/zfs-tests/tests/functional/chattr/chattr_001_pos.ksh

index 73e4e2e5a36d54b235f8dad534af72c3c58ecf4f..4d66146d705855442f4e567b5a2b7bfab74e95b7 100755 (executable)
@@ -65,11 +65,11 @@ log_must chattr -i $TESTDIR/writable
 log_must chattr +i $TESTDIR/immutable
 log_must chattr +a $TESTDIR/append
 
-log_must echo test > $TESTDIR/writable
-log_must echo test >> $TESTDIR/writable
-log_mustnot echo test > $TESTDIR/immutable
-log_mustnot echo test >> $TESTDIR/immutable
-log_mustnot echo test > $TESTDIR/append
-log_must echo test >> $TESTDIR/append
+log_must eval "echo test > $TESTDIR/writable"
+log_must eval "echo test >> $TESTDIR/writable"
+log_mustnot eval "echo test > $TESTDIR/immutable"
+log_mustnot eval "echo test >> $TESTDIR/immutable"
+log_mustnot eval "echo test > $TESTDIR/append"
+log_must eval "echo test >> $TESTDIR/append"
 
 log_pass "chattr works as expected"