From patchwork Mon Aug 17 10:37:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 11717929 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8046313B1 for ; Mon, 17 Aug 2020 10:37:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 71C50206FA for ; Mon, 17 Aug 2020 10:37:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726830AbgHQKhW (ORCPT ); Mon, 17 Aug 2020 06:37:22 -0400 Received: from mx2.suse.de ([195.135.220.15]:39392 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726151AbgHQKhV (ORCPT ); Mon, 17 Aug 2020 06:37:21 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 6B0FDADD5; Mon, 17 Aug 2020 10:37:45 +0000 (UTC) From: Nikolay Borisov To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov Subject: [PATCH 1/3] btrfs/024: Remove no longer valid test Date: Mon, 17 Aug 2020 13:37:16 +0300 Message-Id: <20200817103718.10239-1-nborisov@suse.com> X-Mailer: git-send-email 2.17.1 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Kernel commit "btrfs: add missing check for nocow and compression inode flags" invalidates the "file compressed, fs mounted with nodatacow" mode due to doing more rigorous flags validation, just remove the test. Signed-off-by: Nikolay Borisov --- tests/btrfs/024 | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tests/btrfs/024 b/tests/btrfs/024 index 0c2ffd7389ab..bcb9048da636 100755 --- a/tests/btrfs/024 +++ b/tests/btrfs/024 @@ -42,13 +42,6 @@ __workout() $XFS_IO_PROG -f -c "pwrite 0 1M" -c "fsync" $work_file | _filter_xfs_io } -echo "*** test nodatacow" -_scratch_mkfs > /dev/null 2>&1 -_scratch_mount "-o nodatacow" -__workout -_scratch_unmount -_check_scratch_fs - echo "*** test compress=no" _scratch_mkfs > /dev/null 2>&1 _scratch_mount "-o compress=no" From patchwork Mon Aug 17 10:37:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 11717939 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1B0791744 for ; Mon, 17 Aug 2020 10:37:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0C81920786 for ; Mon, 17 Aug 2020 10:37:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726949AbgHQKhW (ORCPT ); Mon, 17 Aug 2020 06:37:22 -0400 Received: from mx2.suse.de ([195.135.220.15]:39402 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726685AbgHQKhW (ORCPT ); Mon, 17 Aug 2020 06:37:22 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id AB76AB6B5; Mon, 17 Aug 2020 10:37:45 +0000 (UTC) From: Nikolay Borisov To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov Subject: [PATCH 2/3] btrfs/173: Adjust compress file check Date: Mon, 17 Aug 2020 13:37:17 +0300 Message-Id: <20200817103718.10239-2-nborisov@suse.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817103718.10239-1-nborisov@suse.com> References: <20200817103718.10239-1-nborisov@suse.com> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org 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 --- 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 From patchwork Mon Aug 17 10:37:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 11717935 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AFF4315E4 for ; Mon, 17 Aug 2020 10:37:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A1694206FA for ; Mon, 17 Aug 2020 10:37:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726685AbgHQKhX (ORCPT ); Mon, 17 Aug 2020 06:37:23 -0400 Received: from mx2.suse.de ([195.135.220.15]:39410 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726746AbgHQKhW (ORCPT ); Mon, 17 Aug 2020 06:37:22 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id EBACFB6B7; Mon, 17 Aug 2020 10:37:45 +0000 (UTC) From: Nikolay Borisov To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov Subject: [PATCH 3/3] btrfs/174: Adjust error message when setting compressed flag Date: Mon, 17 Aug 2020 13:37:18 +0300 Message-Id: <20200817103718.10239-3-nborisov@suse.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817103718.10239-1-nborisov@suse.com> References: <20200817103718.10239-1-nborisov@suse.com> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org 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 Reviewed-by: Anand Jain Reviewed-by: Marcos Paulo de Souza --- 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