btrfs/174: Adjust error message when setting compressed flag
authorNikolay Borisov <nborisov@suse.com>
Mon, 17 Aug 2020 10:37:18 +0000 (13:37 +0300)
committerEryu Guan <guaneryu@gmail.com>
Wed, 2 Sep 2020 15:37:56 +0000 (23:37 +0800)
Following kernel commit "btrfs: add missing check for nocow and
compression inode flags" btrfs refuses setting +c on +C files during
validation of the args. Account for this by adjusting the expected
error message.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/btrfs/174
tests/btrfs/174.out

index af33522121702c1c439986182521d8ca225b1f40..bca1dc5c0b3be2258263583fbf7e4eb97d865d63 100755 (executable)
@@ -47,7 +47,7 @@ $LSATTR_PROG -l "$swapfile" | _filter_scratch | _filter_spaces
 
 # Compression we reject outright.
 echo "Enable compression"
 
 # Compression we reject outright.
 echo "Enable compression"
-$CHATTR_PROG +c "$swapfile" 2>&1 | grep -o "Text file busy"
+$CHATTR_PROG +c "$swapfile" 2>&1 | grep -o "Invalid argument while setting flags"
 $LSATTR_PROG -l "$swapfile" | _filter_scratch | _filter_spaces
 
 echo "Snapshot"
 $LSATTR_PROG -l "$swapfile" | _filter_scratch | _filter_spaces
 
 echo "Snapshot"
index bc24f1fb8be359386b39da2de4566f4fdae374d5..15bdf79e7bfb40414f9400a72d9e53137abf941a 100644 (file)
@@ -2,7 +2,7 @@ QA output created by 174
 Disable nocow
 SCRATCH_MNT/swapvol/swap No_COW
 Enable compression
 Disable nocow
 SCRATCH_MNT/swapvol/swap No_COW
 Enable compression
-Text file busy
+Invalid argument while setting flags
 SCRATCH_MNT/swapvol/swap No_COW
 Snapshot
 Text file busy
 SCRATCH_MNT/swapvol/swap No_COW
 Snapshot
 Text file busy