From patchwork Fri Jan 4 21:23:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10748837 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 D2B60746 for ; Fri, 4 Jan 2019 21:23:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C083A287A6 for ; Fri, 4 Jan 2019 21:23:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B2BD8287AD; Fri, 4 Jan 2019 21:23:45 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY 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 52981287A6 for ; Fri, 4 Jan 2019 21:23:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726084AbfADVXp (ORCPT ); Fri, 4 Jan 2019 16:23:45 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:38812 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726015AbfADVXo (ORCPT ); Fri, 4 Jan 2019 16:23:44 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id x04LJinr070542; Fri, 4 Jan 2019 21:23:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2018-07-02; bh=iUADCydXIDaccscphFBe+q1cjG5HeqfYOGx+gUci40E=; b=5qGWQNO9iUYBQb8u9D/tlS1cqrk++tbvLt8UyAlGRg0MOm0STdibHAW9z27P3EsNl/qF 845ea/ndV6HpbUIgDISW4+WJ+/bINckl3RaHUAtqxG4y+nk+bASfZbPHurzy89zBKpY6 7Uqux3NAm2p2OGX6oSiI6vyUloyN4Frh4Pl9CQPHsdWY3s/7D3dacSgmqRkMSltJFCsS QDhgtlS2cOq+lXOYHxySXyAevzupFQHeSHpNrt2055mNxGKZgbMnUdSMumAwpXIwVtv2 Mg9ZGj2TkI+ST16L3+/V/6fV3ZO1HYA7XyxPZ1WPvE6IonjL2FqJHg3oH5O8pgehWu5Y 2Q== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2pp0bu63dr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 04 Jan 2019 21:23:40 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x04LNdoL025448 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 4 Jan 2019 21:23:40 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x04LNdou020410; Fri, 4 Jan 2019 21:23:39 GMT Received: from localhost (/10.145.178.58) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 04 Jan 2019 13:23:38 -0800 Date: Fri, 4 Jan 2019 13:23:36 -0800 From: "Darrick J. Wong" To: Eryu Guan Cc: xfs , fstests , Eric Sandeen Subject: [PATCH] generic: test that xattrs can have slashes in their names Message-ID: <20190104212336.GC12689@magnolia> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9126 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901040179 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Eric Sandeen recently found a bug in xfs_repair that flagged extended attribute names containing "/" as corrupt and purged them. There's nothing in the IRIX or Linux manuals that say anything about slashes not being allowed (and Linux certainly allows this) so let's make sure this continues to work. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen --- tests/generic/708 | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/generic/708.out | 6 ++++++ tests/generic/group | 1 + 3 files changed, 55 insertions(+) create mode 100755 tests/generic/708 create mode 100644 tests/generic/708.out diff --git a/tests/generic/708 b/tests/generic/708 new file mode 100755 index 00000000..ee63ba79 --- /dev/null +++ b/tests/generic/708 @@ -0,0 +1,48 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (c) 2019 Oracle, Inc. All Rights Reserved. +# +# FS QA Test No. 708 +# +# Check that xattrs can have slashes in their name. +# +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -f $tmp.* +} + +# get standard environment, filters and checks +. ./common/rc +. ./common/attr +. ./common/filter + +# real QA test starts here +_supported_fs generic +_supported_os Linux +_require_scratch +_require_attrs + +rm -f $seqres.full + +_scratch_mkfs >> $seqres.full 2>&1 +_scratch_mount + +echo "set attr" +file=$SCRATCH_MNT/moofile +touch $file +setfattr -n "user.boo/hoo" -v "woof" $file + +echo "check attr" +getfattr -d --absolute-names $file | _filter_scratch + +# success, all done(?) +status=0 +exit diff --git a/tests/generic/708.out b/tests/generic/708.out new file mode 100644 index 00000000..6978532e --- /dev/null +++ b/tests/generic/708.out @@ -0,0 +1,6 @@ +QA output created by 708 +set attr +check attr +# file: SCRATCH_MNT/moofile +user.boo/hoo="woof" + diff --git a/tests/generic/group b/tests/generic/group index ea5aa7aa..f88125b4 100644 --- a/tests/generic/group +++ b/tests/generic/group @@ -525,3 +525,4 @@ 520 auto quick log 521 soak long_rw 522 soak long_rw +708 auto quick attr