public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH 2/3] btrfs/173: Adjust compress file check
Date: Mon, 17 Aug 2020 13:37:17 +0300	[thread overview]
Message-ID: <20200817103718.10239-2-nborisov@suse.com> (raw)
In-Reply-To: <20200817103718.10239-1-nborisov@suse.com>

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 <nborisov@suse.com>
---
 tests/btrfs/173     | 4 +---
 tests/btrfs/173.out | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/tests/btrfs/173 b/tests/btrfs/173
index 515d8cfa0994..c427320ad664 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 6d7856bf9e02..2920384045ad 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
-- 
2.17.1


  reply	other threads:[~2020-08-17 10:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-17 10:37 [PATCH 1/3] btrfs/024: Remove no longer valid test Nikolay Borisov
2020-08-17 10:37 ` Nikolay Borisov [this message]
2020-08-17 10:47   ` [PATCH 2/3] btrfs/173: Adjust compress file check Anand Jain
2020-08-17 10:37 ` [PATCH 3/3] btrfs/174: Adjust error message when setting compressed flag Nikolay Borisov
2020-08-17 10:49   ` Anand Jain
2020-08-17 14:24   ` Marcos Paulo de Souza
2020-08-17 12:20 ` [PATCH 1/3] btrfs/024: Remove no longer valid test Nikolay Borisov
2020-08-17 13:40 ` [PATCH v2] " Nikolay Borisov
2020-08-17 14:17   ` Marcos Paulo de Souza
2020-08-30 16:08   ` Eryu Guan
2020-08-30 19:30     ` Nikolay Borisov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200817103718.10239-2-nborisov@suse.com \
    --to=nborisov@suse.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox