From patchwork Thu Jun 22 08:18:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13288405 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97FE7EB64D8 for ; Thu, 22 Jun 2023 08:19:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229513AbjFVITR (ORCPT ); Thu, 22 Jun 2023 04:19:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230039AbjFVITN (ORCPT ); Thu, 22 Jun 2023 04:19:13 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4CDF1BEA for ; Thu, 22 Jun 2023 01:19:12 -0700 (PDT) Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35M7pkkp015212 for ; Thu, 22 Jun 2023 08:19:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=UrW6AznctKDU7dzwOVFXnUUfwFtS5laqLNZtttQsbCE=; b=UXTpQUad7j2mj5H3hnB+hRSjwvBfVTL65jTVHUNnovSeKdoCIHyCnrVzFOsRh1OMq1L4 SB9dN18Rj1V4wVvrwL6AcqCgRaiP1eAb7MO0wDoQDsU/CyYsWxZOZ2qC9cvkLmEJePw3 TmXUkCFVb26ojLTL0MXcDxpcKMmdLR4mAhUWN3SrsONe/BkSoBywsfWGvvj+f6C2Q6hd PqCP0P7uVl1qLFHF0jud6R8gOJxP4Y7ng/IKwYw1OpdVXjQ04ijO9qwAjlrT9so18qMT REs475tpRN+82gCCY4/z4bfzfD5tBv4Vkg8Z8ZDLFY8bDnpXiEAtvKFVQriVbwNgmEp8 xw== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3r93rbsabd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 22 Jun 2023 08:19:11 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 35M7FcFh028877 for ; Thu, 22 Jun 2023 08:19:10 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2173.outbound.protection.outlook.com [104.47.56.173]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3r939d724x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 22 Jun 2023 08:19:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X/gxTJfdW6OnzRxLy45HQLhmDCy6eRiLVw4KNhAZMYhPPGImKvGtYL45zGT2FrINziB1PqheD7DaAMj5gZgCPBhsx2T95WJWR2FIW9uAX4nRux8uudMV2qow+9lde0Ecz7Bi85XDR9Srm2oxL1dEn99RqMg2/ZQrY5NN2v/8D6CcJaezFRkj8rnNMScOHLQUXbrocQPVTSIOGAjm0mvstpTGfenOG4exBM3Rda/n+WWDJcXHCN8Xrp+zmk6LxVNo4Mdy9X4e7WkvJOwKRzjmiQWgUnVrqOa3y3DIlU79sfYHrnskcihMiFWe7Gm1X7wbdVZdjiXNXW86Hgr5X5Qsfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UrW6AznctKDU7dzwOVFXnUUfwFtS5laqLNZtttQsbCE=; b=SZDYcSohOPAnC/PV3U9UaBdfCfUTnmQiJYGcpLBdAXfjOOxlqsocHvqxQBgnlRFVDDqtwbBV1EDoos1jdaziJjXYqNV0vdJwHcAMPXlvlDCp8ZfhyMWGmcuzSljWySqBROgMOLTTA8F+3xI45YL681U7Gx8NPrkfRz7wkfRbCy91SdEkfq/ny22c1lew259J3NJeUDCdz+wRTGSGF3QNCpiziiyjP3nAUzShdzCoqorcOoU7pa54HGX8HFJTUIJIqPzbK9BBMZIwdB+Z1+uFDNkRhQDfe3+bkjSHgIshIvpZ4DV8lvKAketsKmL6htVt4Ws0FXoQjswvMl2SN8T6ow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UrW6AznctKDU7dzwOVFXnUUfwFtS5laqLNZtttQsbCE=; b=trohC6w3wRU3cJO7tvEDSYL3iKcHcmjNU8cmChNP+6rdgl7WiUupjTU71a1jWSpv2RTNNG/bmJmLiyzk1m2L/f/4tPGMdyNmv3SiJucvKmtnwbkp8kojpzE9ayTwamga1PChRDQaDW0RkG1+Tv4LQsxUDODb48jwMRUSaZPoVEk= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by CYYPR10MB7652.namprd10.prod.outlook.com (2603:10b6:930:bd::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24; Thu, 22 Jun 2023 08:18:35 +0000 Received: from PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e]) by PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e%7]) with mapi id 15.20.6500.036; Thu, 22 Jun 2023 08:18:35 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Subject: [PATCH 1/2 v2] btrfs-progs: tests: add helper check_kernel_support_acl Date: Thu, 22 Jun 2023 16:18:11 +0800 Message-Id: <1a79c0a998966f42f6fd561d38801a6c4d309dcc.1687419918.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: X-ClientProxiedBy: SG2PR02CA0017.apcprd02.prod.outlook.com (2603:1096:3:17::29) To PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR10MB5706:EE_|CYYPR10MB7652:EE_ X-MS-Office365-Filtering-Correlation-Id: 19cd06fd-ef70-4a12-2355-08db72f945fc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aIJ+LfXWhJnYAiGFBkAwvlQwpH8K/Xvxvg64ptFR2PiguBQ24PFnJCp50Wysc3YsOSsdctB2UA6s3OUfiPnMS0fNP7LNuAlXQY+em5rsWlgCtPHb0tN6+gFitPneV1I/KeBAI6LKLvPARXiJbU/pVTHPclwdxluX2SqYy8GtXU+1rS5OPJ8JFG1ZBYIwUYpdktCKP2p0e+dXEMZBYF47dbYaBJHLVZstINBC0puG5mh8zcjqbvq5rLtSC5z5fkz77M7Z7C410UmO6QsBnMAazqvo0IkFSEJMhKUDYa5U88k+FSA5GnPp3/BgdADClYwCJB21MqH07153oXP8skoPSRzeWorWzlMUhp5gWTH+koX22zBY70+k8hq5Zxv/86V4/T/u0KOnYgU/URLSALayQP+H9ZcXJCxxC76/sQqjQKyJtuZ28gNcH0cIYo6d2EyChmszz7ibd7WdltKekAC+G+ipOoqsvKxOHLVts8+pTR4FSGAlgnKvW9yNFPNoZFZjALnKglKaOeLMv5m0Hfz0ejBQUt7BCzItq954Bk1AMkvu4I/jLYao2LgQBpvyHsMb X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR10MB5706.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(366004)(136003)(39860400002)(376002)(346002)(396003)(451199021)(36756003)(86362001)(38100700002)(2616005)(83380400001)(6506007)(186003)(26005)(6512007)(8676002)(478600001)(44832011)(6666004)(6486002)(316002)(66476007)(6916009)(66946007)(66556008)(5660300002)(41300700001)(8936002)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: cfTguEz3Skzhk9Mp5Uq6LKYQQeXQY8NR36lpWDnkwY2I5MDvRTH33LuMAqS0/mNOrxyz+SurvrsTkuX1ZbfTpY6gh+nvmNaoWG9hOpDOrmlDDmbnK3MlrFyxI+iHiAGAW2OlIQuursUtYNyoOA3PsqAsj/WTrOXzjxRVlMVuEJPgVSxHF8/NnJHxl+JzD1KbA3GU8UmW+/U/yq55KB3bCJsGEKf+tbkBgHxyoTQW3E2EDtjJN1RB4h+4Z7xm/VRsiyyvVkoayml+i2orLR+o0LINKOn3VMjhIqUPrR1clcavm+KV/E/chdpDWVyF1gC/odSYHwSmi3L7pNIhpXEVpRN9N6Ktjw5I0Yt2HoGBVR6UqpUZaM5Je5pJ7XLeBcsqy3te62wCLflVZazHag04/2hoi+qRwXsIHB1qHo88Ny+gCx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qsCDOqZz847o99IOjaMGm95KlcOv+tVHyTKEwHJFVvs4YfL4bvY2754Ie8sYKW2rBfPAyVI1ZIl7Mk1jtjEwKP X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: r/7r/9RUnycpdjE/4C2LkPMCL9P/fXNm4BBTr6I4hrZ3p1lpgCQg0Lxc7JZ4bnowBd6fD0ieeBNYCBY+TGydv7AsTuMTDrSpvHFvsA7nCy6N2Kchdzn9tx3LZK6/4tF2UJFeZUpXZPWy9SsuknewCoHQOyTLrAvfAr3itgDqc0c69CwInxzGWN6MJ6PGHat5uT88aeYqQ+OqMGvQ65QdX1k+6BHvA2kTfDtGcayQXGH6UyuiK5IJRb2GgB0yrDaJ47Z7R1Xt4HgNr9HOxOVH1C4bonOg5rM4utDmNxUTkaocv4Vv26DLmgilvZ5Jmtu+xcH5gpRA3Ao2MTkQVmKvfc1LGmRYWFWxKbppQCqLSAuDvNDybF81clA4UKg+94T2B50Qq8D8SaAk9xFgKyw55ldUFGR5UZ0MIuFJ+DTfXqw/9zsqHTPxrJ/Ejxnv8lg4JFIgvDdpjplNYL9VYgR3zu+e27YIe39nS+IeMI9z0F03iJ/nsTofsc9E0mDi8P1FUfw2GdPTdIVZQbCuadfrt2LAttOV51FpBFp1YyDJw5N79HPtGX9yAMGl1wAiwmgLr5O/JVMiumNxOaOD4b/xz9fKrprWTZ2hMMwIbflp9x0PXxAGlZfx+t7IZBhj2mE75whDFK6imMXleyZa5vaF3SItp06s0adS/6PlNQmB0bJuWLWTu8KusYLIVVJ/fFspVgJtIwihgafR8dEe6p67OO4U/iDV6v/wQJTn9I5C1HM3WqUizNH2b0zo0jd6ghQ/eLjdGzOvVyNyg/W0tRcYWw== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 19cd06fd-ef70-4a12-2355-08db72f945fc X-MS-Exchange-CrossTenant-AuthSource: PH0PR10MB5706.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2023 08:18:35.0565 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: JeDKBjcHud+6K9ZuNyXMKcdsEkuEPd+rsAC0xya2z9EODsozf+eD6oEFH/Njg0rxPu7lVmDOgSWuvQs+zbO14w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR10MB7652 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-06-22_05,2023-06-16_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0 mlxlogscore=999 suspectscore=0 spamscore=0 adultscore=0 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306220068 X-Proofpoint-ORIG-GUID: t5jYRBAKX_qXyJ1duiZ1Eg5Gt0jBRblb X-Proofpoint-GUID: t5jYRBAKX_qXyJ1duiZ1Eg5Gt0jBRblb Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Some test cases are failing because ACL is not compiled on the system. Instead, they should be marked as 'not_run'. Signed-off-by: Anand Jain --- v2: Work on David's comments regarding function names. Also use /proc/config.gz to verify ACL support. tests/common | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/common b/tests/common index d985ef72a4f1..37473bc8080e 100644 --- a/tests/common +++ b/tests/common @@ -575,6 +575,24 @@ setup_root_helper() SUDO_HELPER=root_helper } +# Check if btrfs is compiled with CONFIG_BTRFS_FS_POSIX_ACL, may need TEST_DEV. +check_kernel_support_acl() +{ + if [ -f /proc/config.gz ] && \ + ! zgrep -q "^CONFIG_BTRFS_FS_POSIX_ACL=y" /proc/config.gz; then + _not_run "ACL is not compiled" + fi + + run_check_mkfs_test_dev + run_check_mount_test_dev + + if grep "$TEST_MNT" /proc/self/mounts | grep -q noacl; then + run_check_umount_test_dev + _not_run "ACL is not compiled" + fi + run_check_umount_test_dev +} + prepare_test_dev() { # num[K/M/G/T...] From patchwork Thu Jun 22 08:18:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13288407 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4722EEB64D8 for ; Thu, 22 Jun 2023 08:19:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229966AbjFVIT2 (ORCPT ); Thu, 22 Jun 2023 04:19:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229866AbjFVITZ (ORCPT ); Thu, 22 Jun 2023 04:19:25 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73BD31FDF for ; Thu, 22 Jun 2023 01:19:20 -0700 (PDT) Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35M7pTYP025387 for ; Thu, 22 Jun 2023 08:19:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=S3KxECa01pqcqHiyGakrWwEeHodue4ns7EIBhkYJEKs=; b=FF7AYmnLomLrmAnGhUbZ2rYLjoBYRUJAEwjTB+BMS2XiZGe3d8oXMm1fSkRK1E/Qo8NM NTfnN/dpOB//gNNPnCBMu/UHzpplrX/8USh3UgmIvm+ElCZXWP5tgZrFczVjl6lYV2D4 eq3ISp4TrP8yh/h9EEUwgEZ3p5ktM+2go2E4mDZTxV39Cws6AzBR+eJjchHcf1NL8IJE 1jtg+mc3a1gMzof3Fcrhk0L6YdU7efKdcU/7V4EpHw6ZBkfs4O2Yq1N8C72pHp1t2nv+ eZbGlDAWYpR7MF7tDeLOYjgYXjqy1N5Jja1iJ9w5K5BUTLnm8JQU9dFCd53d/twS17B2 ZQ== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3r95cu17gd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 22 Jun 2023 08:19:19 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 35M7fLZW038670 for ; Thu, 22 Jun 2023 08:19:18 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2175.outbound.protection.outlook.com [104.47.56.175]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3r93976n92-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 22 Jun 2023 08:19:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bayzeKrUvrU/NyZor9j7JeCy8W0xjLkhOOHYjvMo/P6yOC82rtdW6dRkRu9ctuLFHAAZMzEgpsWKn1OFrnGzYARuyZMvzg3UDKcz3c27e254pCVaVTFZ/n2WvzI0up4CtBM77NdsClqmy/lpE2JoebbQZ6UnFv88KZinQwgwsWrcAultVQtt1pdbyJsTfzQDdw3jKpLmT7yOi3B5ZlOO3bySyOLPxnCdrLsJRgD4jsYeDbWksCK2RqT39uC8Dtmoa56TcsH/eYBaC3OMo7R9qCVEbX+c+Uv43Z/etAW6KIkaBJHvs510MnIPrv6xXGNWN2G536CsTRNmj0BSdjxVkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=S3KxECa01pqcqHiyGakrWwEeHodue4ns7EIBhkYJEKs=; b=kadyxua+U5z587CPtl926dyL079M1xHrq+NgAR9um6o/GaezSnySbxoCRM42Xu6wcEKB0aEYSmBvD5onazoLvalu/rYEnuZxvJR8dyYBPl2GlxvyIg8QrXYzJ85q1/C5E1+cdXbR08OCTIUWy3zK9iaCrN8xN7GgnBzFIYkvft+0uT3hkfO9RUOki+TWUpgiIUVHOqEmSryHsLc0rUT0hof8ORjFjTa0czH0nMXJVR52H85NKR2q9HIbZkKX6z8zkkxDgoVlgiKhl0CxYNdWI5hERercblSXQVdr7cmvsHHJ67dmbPNbtzJmzkplFfs+NvYfP0dZvz910uL3zN76CA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=S3KxECa01pqcqHiyGakrWwEeHodue4ns7EIBhkYJEKs=; b=rqgWyG5u40viVOoeKI/fll/frzqBJrz3AJW/o5tcWmPQ5NXOQjmXN4FdOfmD/9kX31Gb+/mSQZ4JbVRtS95KiX2J57A40r5KbEVZgUGg0cPRrt6OYpptmrbVGZXa9t/bfMh46N3j05wmEmDFXGDUszJ6c2LyyytNOaJCQXgFwcQ= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by CYYPR10MB7652.namprd10.prod.outlook.com (2603:10b6:930:bd::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24; Thu, 22 Jun 2023 08:18:42 +0000 Received: from PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e]) by PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e%7]) with mapi id 15.20.6500.036; Thu, 22 Jun 2023 08:18:42 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Subject: [PATCH 2/2 v2] btrfs-progs: tests: check for btrfs ACL support Date: Thu, 22 Jun 2023 16:18:12 +0800 Message-Id: <7e35dc221bee1810d2a549edb7420378d866ff52.1687419918.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: X-ClientProxiedBy: SG3P274CA0010.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:be::22) To PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR10MB5706:EE_|CYYPR10MB7652:EE_ X-MS-Office365-Filtering-Correlation-Id: 095ddc55-c98f-4f7f-2fb7-08db72f94a2f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: M+whQ41apwUKH5hbawP5Amj6MGLWzDVZBv+fqcYGd3KzXirrGZDhOA2zms0e10PniheYxMcwm7xaTnSqw101m8CWJUUS0STrROtO0Y4PI+EC2JF3XZ4srHbeNwtm4oqqihDAF+s3bZWcEp+4HV47g+WYY6rl0imy7ih1N5GgCDbXYUjK7U6m06/Ad6o3n29iolZHNLD4aL+1IsqwrG9HMzn6iQH2sLj423vYOHEF09TYDs4WcfbqATsR6ZkW/qJ1q9wPBdbz4PrPaZilBVLBzpJHY2O5hthF6YepODJnQsqWCzH6GlIrBh1lqZXpKIgp43XLFJPd6Dcsz8mIp83067VWsHUftJrB11oFGV57F0QollWUsmf9ImFMcUnTyrvVaYetuuNDH49dm3KD0mPaTYIGyVktnJIb7Uxn0nieQwuGjBY4xyNzzYlj77uU88Du+UgfTv48eccjJt2WLapDluGoiKLShCdgbtoGaDHRIH7k8V0HkppWD9cAHKEm6FNUIRmu82h/YI6wmNHEbcVGGR+W/LWtYlovS38FQJ4W4HRj7vInPLRmR6wwGyPTE/4Y X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR10MB5706.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(366004)(136003)(39860400002)(376002)(346002)(396003)(451199021)(36756003)(86362001)(38100700002)(2616005)(83380400001)(6506007)(186003)(26005)(6512007)(8676002)(478600001)(44832011)(6666004)(6486002)(316002)(66476007)(6916009)(66946007)(66556008)(5660300002)(41300700001)(8936002)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LmsDqCDiB0zUs+ou3NrL/zS3993lkDwWLR/PSm4jkHAPIn+Zsv/1R4BuBtdBWxua+wEWJfBoPYbYIhsxDt30t8rLAyti0BLETH23w2J9pMlrVimXecc3txGjpR7qSPQGVa5GfvP3QIkdScFYObxAGopnhCgKR6umI//6E4+dexGiLBziUys+xkHTp3AvOV5cANmoSggeVSPfGbVyNeAKW7qRA+1tVsZBiuC7jRohHzuc+IxNwpECeuf6aVEvAvCX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tfnLbRH3S1GaLVKP1mkoQremcOOzX4c2jRgk5uqia99sslmWhgUIfiTIqwoEwDO5YSwhvwO4gxMoG/FemdfxAhV2x7fTqyLrmiiJlXsKSVIX4XDbUEeDD4n2el4ofwOOZ/bfa+lhkqDzYl3Pnqm/yPA4olVinu8HVLxXQazpqU3f3tyIYFKE4fdGVtSZSgsqHzk/YQ0+aoSUyd1UtsR/oMQyWiV1qhMw29wC9cgetU3sUTkgv+7L74pzt9YtZ33P7qHFHxC0MVf3mSt63ooubuul X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: iD7O/qV61Cq0LhKtOJhbmsLGVj9/+XMCpkoXywzrki4kgbg0spJtjaEyoMlxlehaAgvYGrbmraosr0DOv+camSQIRzW96Mtif7WgMPItkaQbyQBjG/xWSaCYOpU/c163njqhxZMFL8UIDf4bvRFZJlVvI61LPRPPuw3K+4k362LMphttkqXHalze/rDUzzmzEnILmU/mdhNheQptJODyeQIyanfrvUcT3MsqOMiwtIE+683EjhWRc8OJV+g9iiVwLQZkcbDKV0WpxzlxZggcLQpR+eYXcDMdOSpZ9r3gXwJBbx3iqbpqP7sRJVIiLBYUAbla+rE/fpK9Aq9rGph5Eg7e7XRJradPD6dMQPVEgbk/hV27EIan9NIuQu2TYOBWqkXnJfVnYtyyGN57En/uwY/j9X5k/7YKI7emzJH3t9rY8lgG/DxrCd3jIKn3E+M+D1EtGB8S3esKu9qPu5MlTmObDzuT8/hGe3rBXV3DIBhRiug0owQsQBlWDnxqcVh55rsjVOOfxWKMZTLBoDxaXo8ftzIO5s793H2moQx9VNW31n2Ax6l/a6/QyWKwt9+fcjBUj9ffOZL5jj5VrWSdPGqSMGumILPk5EWJUMZqGtfBWLasEuleZfIzemT+Dz/dna1+Ef80Cy/ilOzdpC8x6jeRiAK41Bp/3scNQAjBW2C8SxHscyCf8JYlHVP4FGkIwVoKca0QdDnRDc1Eac97sixJ21asUwq/hHY5v+AqvasqNfI9BQhWfdOfHUEgH7bJ9CI+M3YdC0jLtRiOl4tI7w== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 095ddc55-c98f-4f7f-2fb7-08db72f94a2f X-MS-Exchange-CrossTenant-AuthSource: PH0PR10MB5706.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2023 08:18:42.1754 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: x2MBWCUGCV51/2ZhRGjfdQ65WMptKxWmB6qlrWHeqNMZ6ZcuJDE4e8J7cY3x3o3MSd+qQp7ZyQFW8zfbMzt0Vw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR10MB7652 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-06-22_05,2023-06-16_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 suspectscore=0 adultscore=0 mlxscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306220068 X-Proofpoint-GUID: bQcP--MbXGxL-1hI77RFpv3PoLaobjTK X-Proofpoint-ORIG-GUID: bQcP--MbXGxL-1hI77RFpv3PoLaobjTK Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Fix failures caused by the lack of ACL support in btrfs. For example: $ make test :: [TEST/misc] 057-btrfstune-free-space-tree failed: setfacl -m u:root:x /Volumes/ws/btrfs-progs/tests/mnt/acls/acls.1 test failed for case 057-btrfstune-free-space-tree make: *** [Makefile:493: test-misc] Error 1 Similar failures occurred in the test cases convert/001-ext2-basic, convert/003-ext4-basic, convert/005-delete-all-rollback, and convert/006-large-hole-extent. Resolve it by adding a check for ACL support using the check_kernel_support_acl() helper function. It gracefully handles the case when ACL support is not compiled by calling _not_run(). Signed-off-by: Anand Jain --- v2: Merge individual test case fixes into a single patch. tests/convert-tests/001-ext2-basic/test.sh | 1 + tests/convert-tests/003-ext4-basic/test.sh | 1 + tests/convert-tests/005-delete-all-rollback/test.sh | 1 + tests/convert-tests/006-large-hole-extent/test.sh | 1 + tests/misc-tests/057-btrfstune-free-space-tree/test.sh | 1 + 5 files changed, 5 insertions(+) diff --git a/tests/convert-tests/001-ext2-basic/test.sh b/tests/convert-tests/001-ext2-basic/test.sh index 4e8aaecb2f55..3ed3ed0b82c9 100755 --- a/tests/convert-tests/001-ext2-basic/test.sh +++ b/tests/convert-tests/001-ext2-basic/test.sh @@ -8,6 +8,7 @@ check_global_prereq mke2fs setup_root_helper prepare_test_dev +check_kernel_support_acl # Iterate over defaults and options that are not tied to hardware capabilities # or number of devices diff --git a/tests/convert-tests/003-ext4-basic/test.sh b/tests/convert-tests/003-ext4-basic/test.sh index 8a0b2e333554..dd7bb59181b0 100755 --- a/tests/convert-tests/003-ext4-basic/test.sh +++ b/tests/convert-tests/003-ext4-basic/test.sh @@ -8,6 +8,7 @@ check_global_prereq mke2fs setup_root_helper prepare_test_dev +check_kernel_support_acl # Iterate over defaults and options that are not tied to hardware capabilities # or number of devices diff --git a/tests/convert-tests/005-delete-all-rollback/test.sh b/tests/convert-tests/005-delete-all-rollback/test.sh index 0b668a6fc1de..17bf8a379b6b 100755 --- a/tests/convert-tests/005-delete-all-rollback/test.sh +++ b/tests/convert-tests/005-delete-all-rollback/test.sh @@ -10,6 +10,7 @@ check_global_prereq mke2fs setup_root_helper prepare_test_dev +check_kernel_support_acl # simple wrapper for a convert test # $1: btrfs features, argument to -O diff --git a/tests/convert-tests/006-large-hole-extent/test.sh b/tests/convert-tests/006-large-hole-extent/test.sh index 872b4a6f6175..7d92eb463af8 100755 --- a/tests/convert-tests/006-large-hole-extent/test.sh +++ b/tests/convert-tests/006-large-hole-extent/test.sh @@ -13,6 +13,7 @@ check_global_prereq mke2fs setup_root_helper prepare_test_dev +check_kernel_support_acl default_mke2fs="mke2fs -t ext4 -b 4096" convert_test_preamble '' 'large hole extent test' 16k "$default_mke2fs" diff --git a/tests/misc-tests/057-btrfstune-free-space-tree/test.sh b/tests/misc-tests/057-btrfstune-free-space-tree/test.sh index 93ff4307fca9..8d9a858ddc2f 100755 --- a/tests/misc-tests/057-btrfstune-free-space-tree/test.sh +++ b/tests/misc-tests/057-btrfstune-free-space-tree/test.sh @@ -10,6 +10,7 @@ check_prereq btrfs setup_root_helper prepare_test_dev +check_kernel_support_acl run_check_mkfs_test_dev -O ^free-space-tree run_check_mount_test_dev