From patchwork Mon Aug 26 17:50:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Theodore Ts'o X-Patchwork-Id: 11115169 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 D540D13B1 for ; Mon, 26 Aug 2019 17:50:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B251A21881 for ; Mon, 26 Aug 2019 17:50:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733076AbfHZRuu (ORCPT ); Mon, 26 Aug 2019 13:50:50 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:53910 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728280AbfHZRuu (ORCPT ); Mon, 26 Aug 2019 13:50:50 -0400 Received: from callcc.thunk.org (guestnat-104-133-0-111.corp.google.com [104.133.0.111] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x7QHojWV016340 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Aug 2019 13:50:47 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 7A10142049E; Mon, 26 Aug 2019 13:50:40 -0400 (EDT) From: "Theodore Ts'o" To: fstests@vger.kernel.org Cc: "Theodore Ts'o" Subject: [PATCH] common/casefold: only check for the Casefold flag Date: Mon, 26 Aug 2019 13:50:20 -0400 Message-Id: <20190826175020.28959-1-tytso@mit.edu> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org The _casefold_lsattr_dir function lists all of the file attributes. As result, tests/generic/556.out has an ext4-specific assumption that files will have the Extents attribute. That won't be true for all file systems, and it won't even be true for ext4 file systems that do not have the extents feature enabled. Signed-off-by: Theodore Ts'o Reviewed-by: Gabriel Krisman Bertazi --- common/casefold | 6 +++++- tests/generic/556.out | 10 +++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/common/casefold b/common/casefold index 051fd1d1..2a7ab3eb 100644 --- a/common/casefold +++ b/common/casefold @@ -86,5 +86,9 @@ _casefold_unset_attr() _casefold_lsattr_dir() { - $LSATTR_PROG -ld "${1}" | _filter_spaces + if $LSATTR_PROG -ld "${1}" | grep -q Casefold ; then + echo "${1} Casefold" + else + echo "${1}" + fi } diff --git a/tests/generic/556.out b/tests/generic/556.out index 1573c8b1..47656065 100644 --- a/tests/generic/556.out +++ b/tests/generic/556.out @@ -1,9 +1,9 @@ QA output created by 556 -SCRATCH_MNT/basic Extents, Casefold -SCRATCH_MNT/basic Extents -SCRATCH_MNT/casefold_flag_removal Extents, Casefold -SCRATCH_MNT/casefold_flag_removal Extents, Casefold -SCRATCH_MNT/flag_inheritance/d1/d2/d3 Extents, Casefold +SCRATCH_MNT/basic Casefold +SCRATCH_MNT/basic +SCRATCH_MNT/casefold_flag_removal Casefold +SCRATCH_MNT/casefold_flag_removal Casefold +SCRATCH_MNT/flag_inheritance/d1/d2/d3 Casefold SCRATCH_MNT/symlink/ind1/TARGET mv: cannot stat 'SCRATCH_MNT/rename/rename': No such file or directory # file: SCRATCH_MNT/xattrs/x