btrfs/205: Ignore output of chattr command
authorNikolay Borisov <nborisov@suse.com>
Thu, 20 Aug 2020 09:30:06 +0000 (12:30 +0300)
committerEryu Guan <guaneryu@gmail.com>
Sun, 30 Aug 2020 16:16:28 +0000 (00:16 +0800)
With newer kernels, containing upstream commit f37c563bab42 ("btrfs:
add missing check for nocow and compression inode flags") chattr would
produce an error :

  /usr/bin/chattr: Invalid argument while setting flags on /media/scratch/foo1

That's due to the aforementioned commit making the checks stricter. This
is not critical for the purpose of the test so it can be safely
ignored.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/btrfs/205

index 66355678f7d29b9d7b486a9de7d27387b3fd6fcd..ab4261488ebe24b1ada7219870d6fd096f387203 100755 (executable)
@@ -48,7 +48,7 @@ run_tests()
     # extent. It has a file size of 128K.
     echo "Creating file foo1"
     touch $SCRATCH_MNT/foo1
-    $CHATTR_PROG +c $SCRATCH_MNT/foo1
+    $CHATTR_PROG +c $SCRATCH_MNT/foo1 > /dev/null 2>&1
     $XFS_IO_PROG -c "pwrite -S 0xab 0 4K" \
                 -c "fsync" \
                 -c "pwrite -S 0xab 4K 124K" \