From patchwork Mon Sep 18 07:21:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 9955593 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 985EC60385 for ; Mon, 18 Sep 2017 07:22:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8726E28A50 for ; Mon, 18 Sep 2017 07:22:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7C47128A52; Mon, 18 Sep 2017 07:22:10 +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.4 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM 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 EA7EA28AF5 for ; Mon, 18 Sep 2017 07:22:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752435AbdIRHWA (ORCPT ); Mon, 18 Sep 2017 03:22:00 -0400 Received: from mout.gmx.net ([212.227.17.22]:61117 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751906AbdIRHV6 (ORCPT ); Mon, 18 Sep 2017 03:21:58 -0400 Received: from localhost.localdomain ([45.32.39.184]) by mail.gmx.com (mrgmx102 [212.227.17.174]) with ESMTPSA (Nemesis) id 0LswqM-1dQk3C0DmM-012XcS; Mon, 18 Sep 2017 09:21:56 +0200 From: Qu Wenruo To: linux-btrfs@vger.kernel.org Cc: dsterba@suse.cz Subject: [PATCH v3 08/14] btrfs-progs: tests/common: Split user xattr into its own branch for generate_dataset Date: Mon, 18 Sep 2017 16:21:33 +0900 Message-Id: <20170918072139.6300-9-quwenruo.btrfs@gmx.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170918072139.6300-1-quwenruo.btrfs@gmx.com> References: <20170918072139.6300-1-quwenruo.btrfs@gmx.com> X-Provags-ID: V03:K0:pM81Y4XZM3Um/vvFOBxHm1Lb6qF+1nUz6b4x9MwxjPCR8ATd8ig 8qDxCL36d2emf63N9qy8vE9ymTTI0Bie+v4GSHtwFHMNZXGlspJkO8W8nG1lYzdfqZzUmn6 q33Uc1QQvsS3Wa+2Vgcu78uAKvZVQJKodGRjAo6y5v5lYVekgxAqSjnY4A7+sFo0mWakUDF w7JZOAIGgO/AybHex//pA== X-UI-Out-Filterresults: notjunk:1; V01:K0:lXd2jIUzHj8=:pCoySQ683SnoyaZaM0IjKM 3l8L2PX1c3bVp3UmhK4uqUTA49B8RVdtDH+yF80rzR1Ypcrv2SVzaAu8KjeMR89Std2kAP+Pd OoSuwqorT5o3JNUQABBWWqyjCRVpbufq8gaiNogso4xZxTKLkrp/TSWQ753NIKnoFq0I8cIUM zqwqtdm2M2Ans2RVXpzFalYeBJAMTS2AHIrc6/OMGLp0xukE5Do+mmBM6d6QCg/aa+/l9TAPv S2LIRHV+R/dcg6yxWjYdLCuOqjRK2yBMnjpXPP3GA0FrH/2esigAAQ4GIOiIABAUBHLLcv4Tz vxDtzvV1g1sKXXrWFx/Dz/A2wfgxm7Jrh+1d4EhR1NAuHdT/6W/YOU9iLa3vhX5zs5Gu+s0Do T0yVE0nkAtD3tk859ec8v6MBs+78pE6qCMKMwEXPFrjZf9wQPXxSN7ohhFJ7gIIIf6dJfZkBM 9AYExvbNbqfruJkb1rAluJD0QSRA7eMICBDb1DB0nlE7kahKNjkTiuUT/NmhWsVIQng6rcrxY 9aia9j9tU/CETx6BoNg6H2fazQgkhMOouZXa2Xu0E4uWqigHrFrVhEghPzNf51AYsr0QE0aKr wMbSGWIe2eTA7K8Ck36sbX/c8WCdCW7/YmKgZBjgy1mEWh09dPwsSMf64lei/PcyY2SubOJFi dLPRM2jDjakjaD8RJ7PwhXJGVqzT4klpIk8X1XroyNiMedkWKLBO1ReZ/k0kmfJJnC06jCCDw HLIYJKKo/JFkHisHJhCLQZe6SYcinPt6TCGrBhNW6TwGmP2MegMBrKB3jaPVcR8+jUZhKsdXr al7u8cshzco7IuCX/9ysdNp8vXV3g== Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP generate_dataset() combines file acl and file xattr into "acls" type, since both of them are implemented by using file xattr. However sometimes we don't want user file attr under certain case, for example to populate files on tmpfs, which doesn't support user file xattr. So this patch split original "acls" type into "user_xattr" and "acls", make it easier for us to use it on tmpfs. Signed-off-by: Qu Wenruo --- tests/common | 6 +++++- tests/common.convert | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/common b/tests/common index 08a25918..9aebe3e7 100644 --- a/tests/common +++ b/tests/common @@ -498,10 +498,14 @@ generate_dataset() { for num in $(seq 1 "$DATASET_SIZE"); do run_check $SUDO_HELPER touch "$dirpath/$dataset_type.$num" run_check $SUDO_HELPER setfacl -m "u:root:x" "$dirpath/$dataset_type.$num" + done + ;; + user_xattr) + for num in $(seq 1 "$DATASET_SIZE"); do + run_check $SUDO_HELPER touch "$dirpath/$dataset_type.$num" run_check $SUDO_HELPER setfattr -n user.foo -v "bar$num" "$dirpath/$dataset_type.$num" done ;; - fifo) for num in $(seq 1 "$DATASET_SIZE"); do run_check $SUDO_HELPER mkfifo "$dirpath/$dataset_type.$num" diff --git a/tests/common.convert b/tests/common.convert index 1be804cf..45174b7e 100644 --- a/tests/common.convert +++ b/tests/common.convert @@ -36,7 +36,7 @@ run_check_mount_convert_dev() populate_fs() { - for dataset_type in 'small' 'hardlink' 'fast_symlink' 'brokenlink' 'perm' 'sparse' 'acls' 'fifo' 'slow_symlink'; do + for dataset_type in 'small' 'hardlink' 'fast_symlink' 'brokenlink' 'perm' 'sparse' 'acls' 'user_xattr' 'fifo' 'slow_symlink'; do generate_dataset "$dataset_type" done }