Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp715172rdf; Tue, 21 Nov 2023 14:39:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IE2zQRGsY0191On9pcs4dUGpCqXib4cyH5iZnnLvRBZgyJVMay8hslT2jrLC1QtW00R9/OY X-Received: by 2002:a05:6a20:2443:b0:135:1af6:9a01 with SMTP id t3-20020a056a20244300b001351af69a01mr520085pzc.8.1700606399689; Tue, 21 Nov 2023 14:39:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700606399; cv=none; d=google.com; s=arc-20160816; b=sQQQsrlt1vN9hbNwg1mrQRMpY7b/eRj9x17Y2+yuKGZ2lxbeZTcNNGR1RL/KQzlbSU mrh3NJ9oUk5ifOzc/UzGwrl9SNeb60QDPfvokfaSTE86shOfK7M6bAC7SMVABPw7b8uh ErEfzZyGewtUVLx+QWdpbv+QFu3tNs7aYj02ilzXETfRxjhFGhI3JaMcB24SrTBY+zH0 YxuL7FAMFEdZFLotu4DaIqehxwenbFpqmw/H7uf4jwU7mlDpltfdQjPKU4AXlv2k45Zy pMQqQ+rjY4tiEQyjrRWp1eu7s02VWwebPc5qwSaFZIk+AEIpxJHL44prSXQ1F0nZEZAl asFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=54qNRG1MA7StMTbbY3j7i2EWu4W3pJYuYtzAhwJgf2k=; fh=gvial6qLvcAsOAQbq5rZqsZzavosyo15VQ19VqtaZLk=; b=qK/VzY0eAx2cNCWUCF0UeKPeD0MFU79KMd6/e6wsJ8k27aKdOnsImH+QUHUKaGJ+nt FOsu94BiMDjk5qOnoJfBAivkJMkGOUtZ3PZasGFI/wL/K79ED7zqVm0adLNGwJw2qrR9 JXa71lDLHy72YSsPVrNP0FAibUwgaeOUQSknmF1bSmEJnn38ZvzXf9s/eRB1Z2KBxo4d X+1iQKW9ZADBcJ1ZPTu4PJC86bcCi2DH6VWLSYg1z3VFdjJ2wpUNQyAaUjTKiigJ0Vqt geghltKlnQShoJboBl2yhS0HPgHgXITWrzufPzpfS8H6em1nNBmeWWu95JeKqQFEKIAn Hunw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pm0hdeER; spf=pass (google.com: domain of linux-ext4+bounces-71-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-ext4+bounces-71-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id y73-20020a638a4c000000b00577448019b5si7824869pgd.276.2023.11.21.14.39.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:39:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-71-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pm0hdeER; spf=pass (google.com: domain of linux-ext4+bounces-71-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-ext4+bounces-71-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 58B1BB21AA3 for ; Tue, 21 Nov 2023 22:39:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2F5FD13FED; Tue, 21 Nov 2023 22:39:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Pm0hdeER" X-Original-To: linux-ext4@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83E854207D; Tue, 21 Nov 2023 22:39:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 372DCC433CA; Tue, 21 Nov 2023 22:39:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700606376; bh=KtsSq5LYvPatFAAXEjl+Y4OaaAiq0o6mzQHlHZHSUC4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pm0hdeERQdM86iFIoenPcFcCHMgeHmJ5ufw1PyLPxu3eurY+ylVFB3V7VF6CUIe3o dgBuXop3SNQ7eSXkgyl33LvcRTmsosZqpfm1Oq071kcquPsWmQ2VSLbpdXT9HCATOt IFqRGJlQQXjS0XvHw50LI+HZ70xqaZ7O4zcv/EutWn2keDZMoIh7H2iU37x8Bvb9PW 7mTg2WJEV0zRMbi5JcNw4ThThFDf0lMsYfOFHb/11z6QlZf+QSQQ1eikoIprv/YFbQ iJn8DNQXc8vygVj+20jAfHjkR1i1ybaM8X1ZA5H2ec/A+opn7I/hb0Qe30/5iKYmuD 13RLPhNS+yflg== From: Eric Biggers To: fstests@vger.kernel.org Cc: linux-fscrypt@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Daniel Rosenberg Subject: [PATCH v2 2/4] common/rc: fix _require_xfs_io_command with digits in argument Date: Tue, 21 Nov 2023 14:39:07 -0800 Message-ID: <20231121223909.4617-3-ebiggers@kernel.org> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231121223909.4617-1-ebiggers@kernel.org> References: <20231121223909.4617-1-ebiggers@kernel.org> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Eric Biggers '_require_xfs_io_command set_encpolicy -s' does not work as expected because the following in the output of 'xfs_io -c "help set_encpolicy"': -s LOG2_DUSIZE -- log2 of data unit size ... does not match the regex: "^ -s ([a-zA-Z_]+ )?--" ... because the 2 in the argument name LOG2_DUSIZE is not matched. Fix the regex to support digits in the argument name. Signed-off-by: Eric Biggers --- common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/rc b/common/rc index cc92fe06..dab672d8 100644 --- a/common/rc +++ b/common/rc @@ -2719,21 +2719,21 @@ _require_xfs_io_command() echo $testio | grep -q "foreign file active" && \ _notrun "xfs_io $command $param_checked not supported on $FSTYP" echo $testio | grep -q "Function not implemented" && \ _notrun "xfs_io $command $param_checked support is missing (missing syscall?)" echo $testio | grep -q "unknown flag" && \ _notrun "xfs_io $command $param_checked support is missing (unknown flag)" [ -n "$param" ] || return if [ -z "$param_checked" ]; then - $XFS_IO_PROG -c "help $command" | grep -E -q "^ $param ([a-zA-Z_]+ )?--" || \ + $XFS_IO_PROG -c "help $command" | grep -E -q "^ $param ([a-zA-Z0-9_]+ )?--" || \ _notrun "xfs_io $command doesn't support $param" else # xfs_io could result in "command %c not supported" if it was # built on kernels not supporting pwritev2() calls echo $testio | grep -q "\(invalid option\|not supported\)" && \ _notrun "xfs_io $command doesn't support $param" fi # On XFS, ioctl(FSSETXATTR)(called by xfs_io -c "chattr") maskes off unsupported # or invalid flags silently so need to check these flags by extra ioctl(FSGETXATTR) -- 2.42.1