From patchwork Sat Jan 21 08:11:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 9530127 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 09FE2600CA for ; Sat, 21 Jan 2017 08:13:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA564285A7 for ; Sat, 21 Jan 2017 08:13:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDE4B28698; Sat, 21 Jan 2017 08:13:46 +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=-6.9 required=2.0 tests=BAYES_00, 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 5D5C0285A7 for ; Sat, 21 Jan 2017 08:13:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751001AbdAUINq (ORCPT ); Sat, 21 Jan 2017 03:13:46 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:20852 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750717AbdAUINp (ORCPT ); Sat, 21 Jan 2017 03:13:45 -0500 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v0L8BJfa018880 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 21 Jan 2017 08:11:20 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v0L8BJ9d004175 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 21 Jan 2017 08:11:19 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id v0L8BGx0004596; Sat, 21 Jan 2017 08:11:17 GMT Received: from localhost (/24.21.211.40) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 21 Jan 2017 00:11:16 -0800 Subject: [PATCH 8/9] common/populate: create attrs in different namespaces From: "Darrick J. Wong" To: eguan@redhat.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Sat, 21 Jan 2017 00:11:11 -0800 Message-ID: <148498627121.17109.8806204856360094221.stgit@birch.djwong.org> In-Reply-To: <148498621936.17109.4249711513404036449.stgit@birch.djwong.org> References: <148498621936.17109.4249711513404036449.stgit@birch.djwong.org> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Darrick J. Wong --- common/populate | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/common/populate b/common/populate index 8602f8a..e99ce68 100644 --- a/common/populate +++ b/common/populate @@ -166,6 +166,9 @@ _scratch_xfs_populate() { mknod "${SCRATCH_MNT}/S_IFCHR" c 1 1 mknod "${SCRATCH_MNT}/S_IFBLK" c 1 1 + # special file with an xattr + setfacl -P -m u:nobody:r ${SCRATCH_MNT}/S_IFCHR + # Attribute formats # LOCAL echo "+ local attr" @@ -183,6 +186,18 @@ _scratch_xfs_populate() { echo "+ btree attr" __populate_create_attr "${SCRATCH_MNT}/ATTR.FMT_BTREE" "$((64 * blksz / 40))" true + # trusted namespace + touch ${SCRATCH_MNT}/ATTR.TRUSTED + setfattr -n trusted.moo -v urk ${SCRATCH_MNT}/ATTR.TRUSTED + + # security namespace + touch ${SCRATCH_MNT}/ATTR.SECURITY + setfattr -n security.foo -v bar ${SCRATCH_MNT}/ATTR.SECURITY + + # system namespace + touch ${SCRATCH_MNT}/ATTR.SYSTEM + setfacl -m u:root:r ${SCRATCH_MNT}/ATTR.SYSTEM + # FMT_EXTENTS with a remote less-than-a-block value echo "+ attr extents with a remote less-than-a-block value" touch "${SCRATCH_MNT}/ATTR.FMT_EXTENTS_REMOTE3K" @@ -305,6 +320,9 @@ _scratch_ext4_populate() { mknod "${SCRATCH_MNT}/S_IFCHR" c 1 1 mknod "${SCRATCH_MNT}/S_IFBLK" c 1 1 + # special file with an xattr + setfacl -P -m u:nobody:r ${SCRATCH_MNT}/S_IFCHR + # Attribute formats # LOCAL echo "+ local attr" @@ -314,6 +332,18 @@ _scratch_ext4_populate() { echo "+ block attr" __populate_create_attr "${SCRATCH_MNT}/ATTR.FMT_BLOCK" "$((blksz / 40))" + # trusted namespace + touch ${SCRATCH_MNT}/ATTR.TRUSTED + setfattr -n trusted.moo -v urk ${SCRATCH_MNT}/ATTR.TRUSTED + + # security namespace + touch ${SCRATCH_MNT}/ATTR.SECURITY + setfattr -n security.foo -v bar ${SCRATCH_MNT}/ATTR.SECURITY + + # system namespace + touch ${SCRATCH_MNT}/ATTR.SYSTEM + setfacl -m u:root:r ${SCRATCH_MNT}/ATTR.SYSTEM + # Make an unused inode echo "+ empty file" touch "${SCRATCH_MNT}/unused"