From patchwork Fri Aug 25 17:56:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 13366185 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 C24CCEE49A6 for ; Fri, 25 Aug 2023 17:57:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232315AbjHYR5L (ORCPT ); Fri, 25 Aug 2023 13:57:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232120AbjHYR5I (ORCPT ); Fri, 25 Aug 2023 13:57:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67B87128; Fri, 25 Aug 2023 10:57:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F261A62CB5; Fri, 25 Aug 2023 17:57:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF2ECC433C9; Fri, 25 Aug 2023 17:57:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692986225; bh=+EGk3NTklNsc2mqEzAy8hcuNClQWSDUYGoK8D+J3qxI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=nB5DRLhskOL1exhTojx8NKkLNBfkEyEtLwE8jt51STWfGiYCKWyN9OycWLgE1x/7o VMINBdDMQIIw9wGVJ1d42FjqTD0TNvPNb/yNnMsQveCexORhy4I6B7+/rhgYN1dpXk 8F2lERfHgjkUPLGxgl6jSPaE84wg5GPGrEISnBZeQRuGwSvaEZwK588ssgzJXSSfIT ETG0fhpgJlFGIHC1wUXPujiYyQmUQxszR4I5Pczh0ey2qAc5ujV8YKizExooQZ6pVc M1KGmMB/5dQvv+FcTvOfpRInO1EPi09sFcbTj/ap78jXn6k6DH1ivjBN0UzIKsOzsx EpRRPkbC62MgQ== From: Jeff Layton Date: Fri, 25 Aug 2023 13:56:54 -0400 Subject: [PATCH fstests v3 1/2] common/attr: fix the _require_acl test MIME-Version: 1.0 Message-Id: <20230825-fixes-v3-1-6484c098f8e8@kernel.org> References: <20230825-fixes-v3-0-6484c098f8e8@kernel.org> In-Reply-To: <20230825-fixes-v3-0-6484c098f8e8@kernel.org> To: fstests@vger.kernel.org Cc: linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, Darrick Wong , Zorro Lang , Jeff Layton X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1618; i=jlayton@kernel.org; h=from:subject:message-id; bh=+EGk3NTklNsc2mqEzAy8hcuNClQWSDUYGoK8D+J3qxI=; b=owEBbQKS/ZANAwAIAQAOaEEZVoIVAcsmYgBk6OtvgraKz1sQ55kr+e1bkH/jXKby65uFw3W1H 41t2e7hHnaJAjMEAAEIAB0WIQRLwNeyRHGyoYTq9dMADmhBGVaCFQUCZOjrbwAKCRAADmhBGVaC FeH2EADNQ5eryxky0WlL9uZE9W3ZuD/OsKLJo5MlwwSKdsQfb/glRxvtInPQ/foeW48ByRz2FiH D8N3f22F2xko3bxjIwn2mG67RYp1ozJvXuNBhoJFnjTR8B1Sb7JSYdfTbdMmGlNNjxJLYNEN52g HBmwQjrYSRyBQzId59waC0aLMb0j8gJri1RoNibcd67bHuao/IAQxKVrowLTShOEieYrzrI9gVS i+qQE3IGoLx/8qZrHy1AdHopdWBOv3gJs7FZRmdrTQH2kJW8B3366Q8hrlF2ZinKnrxt5J6/ITP 1+sRTwIYIe9uh0g5ymXA3c4h/ePqAPeG1f9XhSdoDko4+ZhNWjPzCI2Eum6Bstz7NO5lVZ2n+DA XNbNrBjP/WtC6372c+jBfsqB4c9gp9fracjkmMADhA4bQcH+jzKll98BM+wpDFY9o3eYCUWgMFE akq/qxsG7ZQy5oG3qjfq+nKU0lUxgdx9XTADZkNvgFH2lpg3muqsFDGGAlrTKcxcdn1MIKikYqs HW0N0+am9TxSXO9i6N1rYwUDcukQYgo7eGdb+FTFfwMiZ+oCesYndsD/kTssZ/H5S2T+dJZb0H5 jTx093tNzvK7/u/UsH2yoXXuCVhnhlkNWcTbsYrAnlix9U/ZGRh6KJu4ficfXcpdVDbeIizeGpf GAolJ4ChkSVylAg== X-Developer-Key: i=jlayton@kernel.org; a=openpgp; fpr=4BC0D7B24471B2A184EAF5D3000E684119568215 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org _require_acl tests whether you're able to fetch the ACL from a file using chacl, and then tests for an -EOPNOTSUPP error return. Unfortunately, filesystems that don't support them (like NFSv4) just return -ENODATA when someone calls getxattr for the POSIX ACL, so the test doesn't work. Fix the test to have chacl set an ACL on the file instead, which should reliably fail on filesystems that don't support them. Signed-off-by: Jeff Layton --- common/attr | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/common/attr b/common/attr index cce4d1b201b2..3ebba682c894 100644 --- a/common/attr +++ b/common/attr @@ -163,13 +163,12 @@ _require_acls() [ -n "$CHACL_PROG" ] || _notrun "chacl command not found" # - # Test if chacl is able to list ACLs on the target filesystems. On really - # old kernels the system calls might not be implemented at all, but the - # more common case is that the tested filesystem simply doesn't support - # ACLs. + # Test if chacl is able to set an ACL on a file. On really old kernels + # the system calls might not be implemented at all, but the more common + # case is that the tested filesystem simply doesn't support ACLs. # touch $TEST_DIR/syscalltest - chacl -l $TEST_DIR/syscalltest > $TEST_DIR/syscalltest.out 2>&1 + chacl 'u::rw-,g::---,o::---' $TEST_DIR/syscalltest > $TEST_DIR/syscalltest.out 2>&1 cat $TEST_DIR/syscalltest.out >> $seqres.full if grep -q 'Function not implemented' $TEST_DIR/syscalltest.out; then From patchwork Fri Aug 25 17:56:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 13366186 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 F192AEE49AB for ; Fri, 25 Aug 2023 17:57:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232747AbjHYR5M (ORCPT ); Fri, 25 Aug 2023 13:57:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232125AbjHYR5I (ORCPT ); Fri, 25 Aug 2023 13:57:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A3D3128; Fri, 25 Aug 2023 10:57:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B507063110; Fri, 25 Aug 2023 17:57:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0DCFC433CB; Fri, 25 Aug 2023 17:57:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692986226; bh=Z+sH4YtcXtJl1iB0CzUJffwIgkuuQjmeTsMDGAxYurQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=IagMv31i1KZM4mBwoC250VwUdGvVQeJNRKmNL9sPV0M0um3eIWRU/RHLKULu1q8+v lvVzj5MTCE4scWanO0fNQo6EfuSfYUnoFJUFuXLiHHgIbUh3r/ScZmZkAeZ2oKwTYK udx8CqvHJORTDzngmqQhqsKzxgra12lFlYM3IuxKoNamvXjDmDyqHewRRfS06HDttD MB0UMttDXmsd25ca0eiPhBNWDBr4GdhIwidMCd9l+zAzzprDPdCTQgu9Zjn/EbETOy 7oU1TIegPZRdkPu3iRmHftYPeV59NpJcz7F1PQuv2MUfrU8NqIKmtFu8GSuFAuSlZM IePt+9M93vg7w== From: Jeff Layton Date: Fri, 25 Aug 2023 13:56:55 -0400 Subject: [PATCH fstests v3 2/2] generic/578: add a check to ensure that fiemap is supported MIME-Version: 1.0 Message-Id: <20230825-fixes-v3-2-6484c098f8e8@kernel.org> References: <20230825-fixes-v3-0-6484c098f8e8@kernel.org> In-Reply-To: <20230825-fixes-v3-0-6484c098f8e8@kernel.org> To: fstests@vger.kernel.org Cc: linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, Darrick Wong , Zorro Lang , Jeff Layton X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=587; i=jlayton@kernel.org; h=from:subject:message-id; bh=Z+sH4YtcXtJl1iB0CzUJffwIgkuuQjmeTsMDGAxYurQ=; b=owEBbQKS/ZANAwAIAQAOaEEZVoIVAcsmYgBk6Otv7Jc0esHnmgbNsPkYzQrwmUOPYqcqdnKoX PrPqj6ulVWJAjMEAAEIAB0WIQRLwNeyRHGyoYTq9dMADmhBGVaCFQUCZOjrbwAKCRAADmhBGVaC FbT4D/oC/1l4b0pW1ns+mBe8zfPUaxuEa8ERdKDm+K/SMnPdjM2cmiWzuBczNA00YNDB2rMC2mi psfuj5p5N0DmN4Y9XjEDs8pN92tzlvD8q1KgQS+0Lc8C2blx6jRAiTqvyT6rJTfqLn4BXaAQvg7 hFy32HH3ifF8e7wVmFcPutEm3qMIe9sr7zCIHQOc1mWnsSEbCWkBESQ0RfV4yekRuApdsIz5mt8 DAWT3RSB9YF3D+erLfNaGA7GVQN6NcBsfpi+cp5XcQjVRYHfck/oSEhBtI9OqRAVFIAcT53n7aM XlamnFP85H0undLWkMRHedcyIaGrCX0UC66AM6/+9iJlzfXL4/YQ5PZ2ybFnNA6tJgL5BPcStRa ij9Ymem8bjGYIX3vztCte/1MZ/jN7rkwrBmw5d6NunDo6rRPjJw/LZ24ZHMd4ucW3luZ5tLr081 wkPnc9o3arpI9LsOzAl2je3vyXBQrhIfKhuz3PqCqJbvsD0Sndf413HjgKh2X61XaJ/AOjZ88Ae zodDSGenOicCevZydORxxCc/XRq7HKwekF+LO7j9qtWSHXE3B7MG3HKP4j8OryM5uvtlnN2P6AU QCGb3aYDq9J5WQ6anFV7SQUS/Sb/nee+RcMt7v2VpQVvQZedAqFeU7kuUBn8nE5CntIhx9LVrcu QL26vjq51gri2oA== X-Developer-Key: i=jlayton@kernel.org; a=openpgp; fpr=4BC0D7B24471B2A184EAF5D3000E684119568215 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org This test requires FIEMAP support. Suggested-by: Zorro Lang Signed-off-by: Jeff Layton --- tests/generic/578 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/generic/578 b/tests/generic/578 index b024f6ff90b4..e8bb97f7b96c 100755 --- a/tests/generic/578 +++ b/tests/generic/578 @@ -24,6 +24,7 @@ _cleanup() _supported_fs generic _require_test_program "mmap-write-concurrent" _require_command "$FILEFRAG_PROG" filefrag +_require_xfs_io_command "fiemap" _require_test_reflink _require_cp_reflink