From: Nikolay Borisov Date: Mon, 17 Aug 2020 10:37:17 +0000 (+0300) Subject: btrfs/173: Adjust compress file check X-Git-Tag: v2022.05.01~712 X-Git-Url: http://git.apps.os.sepia.ceph.com/?p=xfstests-dev.git;a=commitdiff_plain;h=f8b84ddfa5af52d495df65104324c314df4a6873 btrfs/173: Adjust compress file check Following kernel commit "btrfs: add missing check for nocow and compression inode flags" the enforcement of "can't set +c on a +C" file has been moved to the ioctl code. Modify the test to account for this. Signed-off-by: Nikolay Borisov Reviewed-by: Anand Jain Signed-off-by: Eryu Guan --- diff --git a/tests/btrfs/173 b/tests/btrfs/173 index 515d8cfa..c427320a 100755 --- a/tests/btrfs/173 +++ b/tests/btrfs/173 @@ -48,9 +48,7 @@ swapoff "$SCRATCH_MNT/swap" >/dev/null 2>&1 echo "Compressed file" rm -f "$SCRATCH_MNT/swap" _format_swapfile "$SCRATCH_MNT/swap" $(($(get_page_size) * 10)) -$CHATTR_PROG +c "$SCRATCH_MNT/swap" -swapon "$SCRATCH_MNT/swap" 2>&1 | _filter_scratch -swapoff "$SCRATCH_MNT/swap" >/dev/null 2>&1 +$CHATTR_PROG +c "$SCRATCH_MNT/swap" 2>&1 | grep -o "Invalid argument while setting flags" status=0 exit diff --git a/tests/btrfs/173.out b/tests/btrfs/173.out index 6d7856bf..29203840 100644 --- a/tests/btrfs/173.out +++ b/tests/btrfs/173.out @@ -2,4 +2,4 @@ QA output created by 173 COW file swapon: SCRATCH_MNT/swap: swapon failed: Invalid argument Compressed file -swapon: SCRATCH_MNT/swap: swapon failed: Invalid argument +Invalid argument while setting flags