From patchwork Thu Jun 9 21:42:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 12876006 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 C3038CCA47F for ; Thu, 9 Jun 2022 21:42:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229813AbiFIVmk (ORCPT ); Thu, 9 Jun 2022 17:42:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236561AbiFIVmi (ORCPT ); Thu, 9 Jun 2022 17:42:38 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C206B66AEE for ; Thu, 9 Jun 2022 14:42:33 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 6F11222090; Thu, 9 Jun 2022 21:42:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1654810952; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=K+4tIzneSRbXDM3XWl74zqNPPnbr/cbhyDXTom6R6N0=; b=PpoWsU0EZiOXdsvjzNaAyJo3Jd+xt+eqFNyhKXsPIXPHxgUiPJanWO/413ibxGWs/GGpZk EWCQvv+PYo9qALto9V/Wh3Lgt0xmOWTzxZu/l0ch2rEib22b59OMKtoHQ31evoLsACmuaa suwyRx9zgmKeX+uwBhtIegv1+p29SSE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1654810952; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=K+4tIzneSRbXDM3XWl74zqNPPnbr/cbhyDXTom6R6N0=; b=3SX7rRT5VMOHkTxEegGUO59CLRfnqshwRCUYrH1WAAkKcjVHXxJkY/LjHqa9Qv1RSKlxKP a0o+wcRhxuqkTdCg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3F5D513A8C; Thu, 9 Jun 2022 21:42:32 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id IF9BDUhpomIQDgAAMHmgww (envelope-from ); Thu, 09 Jun 2022 21:42:32 +0000 From: Petr Vorel To: ltp@lists.linux.it Cc: Petr Vorel , linux-nfs@vger.kernel.org Subject: [PATCH v2 3/9] tst_test.sh: allow ' in pattern for allowed variables Date: Thu, 9 Jun 2022 23:42:17 +0200 Message-Id: <20220609214223.4608-4-pvorel@suse.cz> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220609214223.4608-1-pvorel@suse.cz> References: <20220609214223.4608-1-pvorel@suse.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org to allow using '... $TST_FOO' i.e. without filtering ' EXPECT_PASS "grep '$TST_MNTPOINT $TST_FS_TYPE' /proc/mounts" would produce warning: tst_mount_device 1 TWARN: Reserved variable TST_FS_TYPE' used! because sed filters it as: FS_TYPE' Will be needed for next commit. Signed-off-by: Petr Vorel Reviewed-by: Cyril Hrubis --- testcases/lib/tst_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh index 740115385..f9ff9bcb4 100644 --- a/testcases/lib/tst_test.sh +++ b/testcases/lib/tst_test.sh @@ -621,7 +621,7 @@ tst_run() local _tst_name if [ -n "$TST_TEST_PATH" ]; then - for _tst_i in $(grep '^[^#]*\bTST_' "$TST_TEST_PATH" | sed 's/.*TST_//; s/[="} \t\/:`].*//'); do + for _tst_i in $(grep '^[^#]*\bTST_' "$TST_TEST_PATH" | sed 's/.*TST_//; s/[='\''"} \t\/:`].*//'); do case "$_tst_i" in DISABLE_APPARMOR|DISABLE_SELINUX);; SETUP|CLEANUP|TESTFUNC|ID|CNT|MIN_KVER);;