From patchwork Thu Jun 9 21:42:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 12876009 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 CBC87C43334 for ; Thu, 9 Jun 2022 21:42:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234022AbiFIVml (ORCPT ); Thu, 9 Jun 2022 17:42:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239775AbiFIVmi (ORCPT ); Thu, 9 Jun 2022 17:42:38 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8643C66CB1 for ; Thu, 9 Jun 2022 14:42:35 -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-out2.suse.de (Postfix) with ESMTPS id 26BC61FEC9; Thu, 9 Jun 2022 21:42:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1654810954; 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=iRYXycbQVHb8+YRDCK3WyfDOxADDfcwyvcEPl1e9rpM=; b=2J8rrVyUu77q0YnOYu6IeZ9sqXYr8Ir8fBejjzVWAQWSGamlyqvN+7+MTPiqa6jkKTyOtB nXCuS1gs2NU1c2FAK0U2nxHXa857SdSoQUdPCcRDDGBoynxJn3SC/S7/2mXtm0bE78Eud3 R6QBdEA7pBm/kYhu58F3pQoASH1UzF8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1654810954; 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=iRYXycbQVHb8+YRDCK3WyfDOxADDfcwyvcEPl1e9rpM=; b=lefvLvPxfH7CyZh7D012fa0YLaE9oIKx5z5uRdrJtVtBMtQqGuTqvWbxzuPBSPYARlm7Kf Ve9aGYBSpgj1lpBg== 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 E3F9313A8C; Thu, 9 Jun 2022 21:42:33 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id wC+UNUlpomIQDgAAMHmgww (envelope-from ); Thu, 09 Jun 2022 21:42:33 +0000 From: Petr Vorel To: ltp@lists.linux.it Cc: Petr Vorel , linux-nfs@vger.kernel.org, Cyril Hrubis Subject: [PATCH v2 8/9] shell: Add test for TST_ALL_FILESYSTEMS=1 Date: Thu, 9 Jun 2022 23:42:22 +0200 Message-Id: <20220609214223.4608-9-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 Unfortunately GitHub Actions don't have loop devices, thus cannot be run in CI: tst_format_device 1 TINFO: timeout per run is 0h 5m 0s /__w/ltp/ltp/lib/tst_device.c:139: TINFO: No free devices found Reviewed-by: Cyril Hrubis Signed-off-by: Petr Vorel --- lib/newlib_tests/shell/tst_all_filesystems.sh | 27 +++++++++++++++++++ testcases/lib/tst_test.sh | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100755 lib/newlib_tests/shell/tst_all_filesystems.sh diff --git a/lib/newlib_tests/shell/tst_all_filesystems.sh b/lib/newlib_tests/shell/tst_all_filesystems.sh new file mode 100755 index 000000000..8509a7481 --- /dev/null +++ b/lib/newlib_tests/shell/tst_all_filesystems.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2022 Petr Vorel + +TST_ALL_FILESYSTEMS=1 +TST_TESTFUNC=test +TST_CNT=2 + +test1() +{ + tst_res TPASS "device using filesystem" +} + +test2() +{ + local pattern + + + if [ "$TST_FS_TYPE" = "exfat" -o "$TST_FS_TYPE" = "ntfs" ]; then + pattern="|fuseblk" + fi + + EXPECT_PASS "grep -E '$TST_MNTPOINT ($TST_FS_TYPE${pattern})' /proc/mounts" +} + +. tst_test.sh +tst_run diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh index d96ce3448..27f698dab 100644 --- a/testcases/lib/tst_test.sh +++ b/testcases/lib/tst_test.sh @@ -603,7 +603,7 @@ _tst_init_checkpoints() _prepare_device() { if [ "$TST_FORMAT_DEVICE" = 1 ]; then - tst_clear_device $TST_DEVICE + tst_device clear "$TST_DEVICE" tst_mkfs $TST_FS_TYPE $TST_DEV_FS_OPTS $TST_DEVICE $TST_DEV_EXTRA_OPTS fi