From patchwork Tue May 7 09:19:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Yang X-Patchwork-Id: 10932671 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0D28314B6 for ; Tue, 7 May 2019 09:20:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EAFAE28749 for ; Tue, 7 May 2019 09:20:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D9CF7287DE; Tue, 7 May 2019 09:20:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 82E8828749 for ; Tue, 7 May 2019 09:20:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726286AbfEGJUC (ORCPT ); Tue, 7 May 2019 05:20:02 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:21148 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726063AbfEGJUC (ORCPT ); Tue, 7 May 2019 05:20:02 -0400 X-IronPort-AV: E=Sophos;i="5.60,441,1549900800"; d="scan'208";a="61973464" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 07 May 2019 17:19:59 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (unknown [10.167.33.80]) by cn.fujitsu.com (Postfix) with ESMTP id A710A4CD7BBD for ; Tue, 7 May 2019 17:19:59 +0800 (CST) Received: from localhost.localdomain.localdomain (10.167.215.39) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 7 May 2019 17:20:10 +0800 From: Xiao Yang To: CC: Xiao Yang Subject: [PATCH] ext4/018: Match the value of File ACL accurately Date: Tue, 7 May 2019 17:19:51 +0800 Message-ID: <1557220791-30347-1-git-send-email-yangx.jy@cn.fujitsu.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.167.215.39] X-yoursite-MailScanner-ID: A710A4CD7BBD.ABC9A X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: yangx.jy@cn.fujitsu.com Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since e2fsprogs v1.44.0, debugfs with stat command shows the output: --------------------------------------------------------------------- debugfs -R 'stat /attrfile' /dev/sda11 2> /dev/null | grep 'File ACL:' File ACL: 9258 --------------------------------------------------------------------- Before e2fsprogs v1.44.0, debugfs with stat command shows the output: ---------------------------------------------------------------------- debugfs -R 'stat /attrfile' /dev/sda11 2> /dev/null | grep 'File ACL:' File ACL: 9258 Directory ACL: 0 ---------------------------------------------------------------------- "Directory ACL: XXXX" was removed by commit 578fcbf so running ext4/018 with older e2fsprogs(i.e. before v1.44.0) got the following error: -------------------------------------------------------------------------- +./tests/ext4/018: line 59: 9258 Directory ACL: 0: syntax error in expression (error token is "Directory ACL: 0") -------------------------------------------------------------------------- we match the value of File ACL accurately to fix it. Signed-off-by: Xiao Yang --- tests/ext4/018 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ext4/018 b/tests/ext4/018 index eb6d827..fed5a8e 100755 --- a/tests/ext4/018 +++ b/tests/ext4/018 @@ -55,7 +55,7 @@ echo "+ check fs" e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail" echo "+ corrupt image" -blk="$(debugfs -R 'stat /attrfile' "${SCRATCH_DEV}" 2> /dev/null | grep 'File ACL:' | sed -e 's/^.*File ACL: \([0-9]*\)/\1/g')" +blk="$(debugfs -R 'stat /attrfile' "${SCRATCH_DEV}" 2> /dev/null | grep 'File ACL:' | sed -e 's/^.*File ACL: \([0-9]*\).*/\1/g')" $XFS_IO_PROG -f -c "pwrite -S 0x62 $((blk * blksz + 20)) 8" "${SCRATCH_DEV}" >> $seqres.full echo "+ mount image"