diff mbox series

[3/3] btrfs/174: Adjust error message when setting compressed flag

Message ID 20200817103718.10239-3-nborisov@suse.com (mailing list archive)
State New, archived
Headers show
Series [1/3] btrfs/024: Remove no longer valid test | expand

Commit Message

Nikolay Borisov Aug. 17, 2020, 10:37 a.m. UTC
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>
---
 tests/btrfs/174     | 2 +-
 tests/btrfs/174.out | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Anand Jain Aug. 17, 2020, 10:49 a.m. UTC | #1
On 17/8/20 6:37 pm, Nikolay Borisov wrote:
> Following kernel commit "btrfs: add missing check for nocow and
> compression inode flags"

  Here too, can you pls add this to the test case header.

  Otherwise looks good.

Reviewed-by: Anand Jain <anand.jain@oracle.com>


> 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>
> ---
>   tests/btrfs/174     | 2 +-
>   tests/btrfs/174.out | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/btrfs/174 b/tests/btrfs/174
> index af3352212170..bca1dc5c0b3b 100755
> --- a/tests/btrfs/174
> +++ b/tests/btrfs/174
> @@ -47,7 +47,7 @@ $LSATTR_PROG -l "$swapfile" | _filter_scratch | _filter_spaces
>   
>   # 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"
> diff --git a/tests/btrfs/174.out b/tests/btrfs/174.out
> index bc24f1fb8be3..15bdf79e7bfb 100644
> --- a/tests/btrfs/174.out
> +++ b/tests/btrfs/174.out
> @@ -2,7 +2,7 @@ QA output created by 174
>   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
>
Marcos Paulo de Souza Aug. 17, 2020, 2:24 p.m. UTC | #2
On Mon, 2020-08-17 at 13:37 +0300, Nikolay Borisov wrote:
> 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.

LGTM, so

Reviewed-by: Marcos Paulo de Souza <mpdesouza@suse.com>

> 
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>
> ---
>  tests/btrfs/174     | 2 +-
>  tests/btrfs/174.out | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/btrfs/174 b/tests/btrfs/174
> index af3352212170..bca1dc5c0b3b 100755
> --- a/tests/btrfs/174
> +++ b/tests/btrfs/174
> @@ -47,7 +47,7 @@ $LSATTR_PROG -l "$swapfile" | _filter_scratch |
> _filter_spaces
>  
>  # 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"
> diff --git a/tests/btrfs/174.out b/tests/btrfs/174.out
> index bc24f1fb8be3..15bdf79e7bfb 100644
> --- a/tests/btrfs/174.out
> +++ b/tests/btrfs/174.out
> @@ -2,7 +2,7 @@ QA output created by 174
>  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
diff mbox series

Patch

diff --git a/tests/btrfs/174 b/tests/btrfs/174
index af3352212170..bca1dc5c0b3b 100755
--- a/tests/btrfs/174
+++ b/tests/btrfs/174
@@ -47,7 +47,7 @@  $LSATTR_PROG -l "$swapfile" | _filter_scratch | _filter_spaces
 
 # 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"
diff --git a/tests/btrfs/174.out b/tests/btrfs/174.out
index bc24f1fb8be3..15bdf79e7bfb 100644
--- a/tests/btrfs/174.out
+++ b/tests/btrfs/174.out
@@ -2,7 +2,7 @@  QA output created by 174
 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