Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp507637rwr; Thu, 4 May 2023 06:17:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5GGjsR0bope7+u01ULvip0lgsCE76cueSsj8dXeI61bvia1Raw+MFfyNJGL8jKNrcM5AIJ X-Received: by 2002:a05:6a20:43a0:b0:f5:40dd:4c55 with SMTP id i32-20020a056a2043a000b000f540dd4c55mr1922590pzl.60.1683206236249; Thu, 04 May 2023 06:17:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683206236; cv=none; d=google.com; s=arc-20160816; b=s3YxHBSR/meqx3p3qK+X7X6FxKy2UslnuJ1l0S6dm4nmBSd8+anqTUNdqrFDCDYu0s 8XtdF614Vv6d0hKzoq63CWHpSmYvKjm6aa6g5NZQLtx5+TeobMA35luJJz2uF3jfHYg4 kGNdmrAiLlLj0UK/FJ2PXvw0R25JyDance66scNu6IlfSFB8kG5ChzFLBiA1PHWbFoaF Y3fy2sdAX2/H5/xSG+h1WtIlx5jLZejp4+tBax8L1lb86u+Eo1GoHH/u/jLhSjnLMA4X 59JZD034lDzlWAr2ehew0W/r1PDTeVzmmBjZik/k+XHRrp0icrWo/mqC5q3WCJDBQ9HC NhCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=akIoO/Oc1cHzyjDxWGHLqsPOi6W/co79Mdb3DCW+ZE0=; b=QzyXpS/ahYk0efIrOLDfO70xyGmUAGujdq5AZr4VNuZtCu70HCPskM/0aDP44LOC9y w2rYg2gZhdSSj8WmSpcuqvR3GYcXhd3iz638k9VOnpxdJNPMRe75hvwSdu2CeEYYg6KM QmJAnvRR6pK0QVKYra7v/rKs7Um32j+Pujn85Tv8Drsxb2mXXVZaIgzRcMmKdRQ12ilV ndyDLZGv1G3dDu8PJcj/De4XnfYUbOIFZykdrNKjt5oIIHi5fY0dOfWp3X5BkberT9Is Q5854A1MELXh9e0iaZu5JziCS2Hw9aKBjCV9JzMCiNz7+cKn2ukMRNxYtMmieak2SbTP ni6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=toujx3QU; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s206-20020a632cd7000000b0051389efe297si16136547pgs.265.2023.05.04.06.16.35; Thu, 04 May 2023 06:17:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=toujx3QU; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229993AbjEDNOK (ORCPT + 99 others); Thu, 4 May 2023 09:14:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230183AbjEDNOJ (ORCPT ); Thu, 4 May 2023 09:14:09 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD0286EA2 for ; Thu, 4 May 2023 06:14:07 -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 3F26E1FF73; Thu, 4 May 2023 13:14:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1683206046; 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=akIoO/Oc1cHzyjDxWGHLqsPOi6W/co79Mdb3DCW+ZE0=; b=toujx3QUynVly1TxHkF2wc25tiQYgJ82ucdSDpMZJqJ3DbSZcChJptO6LQGZJAIMoGubvy xwp6lucR4YzYV9UcyEB6DPOet7Q2ZHkVgR3RCDmMQjTyCFH1JQ+r7fubryucDF8N3niKK/ bRBY1A3NvcOc6BzuUaPtXLWoMgTpiWM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1683206046; 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=akIoO/Oc1cHzyjDxWGHLqsPOi6W/co79Mdb3DCW+ZE0=; b=rXxfh9TujK2VZ8n+y8Q5Ib1tD1VTcnMtibg9lOSsJpEXcbbpF1/25Z3RY1aNdE/zWVs6BU RE3SltDt1gNrB7BA== 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 E0E9F13444; Thu, 4 May 2023 13:14:05 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id OKyCNJ2vU2TXVgAAMHmgww (envelope-from ); Thu, 04 May 2023 13:14:05 +0000 From: Petr Vorel To: ltp@lists.linux.it Cc: Petr Vorel , NeilBrown , Cyril Hrubis , linux-nfs@vger.kernel.org, Jeff Layton Subject: [PATCH v5 5/5] nfs: Run on btrfs, ext4, xfs Date: Thu, 4 May 2023 15:14:14 +0200 Message-Id: <20230504131414.3826283-6-pvorel@suse.cz> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230504131414.3826283-1-pvorel@suse.cz> References: <20230504131414.3826283-1-pvorel@suse.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org because there are some problems with at least vfat, exfat and tmpfs (on nfs-utils < 2) instead of testing on all available filesystems, test just on modern Linux filesystems btrfs, ext4, xfs. Use variables: * TST_ALL_FILESYSTEMS=1 to run on all filesystems * TST_FORMAT_DEVICE=1 to get loop device formatted * TST_MOUNT_DEVICE=1 to get it mounted Filesystems (tested the usual LTP way on loop device) are used for server side (exportfs), client side (NFS mount) is kept outside of it. For some reason umounting needs some time before NFS server stops using underlying loop device. Also exportfs needs time before files can be removed. Otherwise second umounting fails: nfs07 4 TINFO: Cleaning up testcase umount: /var/tmp/LTP_nfs07.FNZ7yCbqZe/mntpoint: target is busy. nfs07 4 TINFO: umount(/var/tmp/LTP_nfs07.FNZ7yCbqZe/mntpoint) failed, try 1 ... nfs07 4 TINFO: Likely gvfsd-trash is probing newly mounted fs, kill it to speed up tests. umount: /var/tmp/LTP_nfs07.FNZ7yCbqZe/mntpoint: target is busy. Solved with adding sleep for 2 sec after first umount and sleeps for 1 sec after exportfs. Second umount of the loop device in tst_test.sh works without any extra sleep. Signed-off-by: Petr Vorel --- testcases/network/nfs/nfs_stress/nfs_lib.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/testcases/network/nfs/nfs_stress/nfs_lib.sh b/testcases/network/nfs/nfs_stress/nfs_lib.sh index 042fea5e4..abf7ba5a2 100644 --- a/testcases/network/nfs/nfs_stress/nfs_lib.sh +++ b/testcases/network/nfs/nfs_stress/nfs_lib.sh @@ -28,7 +28,10 @@ NFS_PARSE_ARGS_CALLER="$TST_PARSE_ARGS" TST_OPTS="v:t:$TST_OPTS" TST_PARSE_ARGS=nfs_parse_args TST_USAGE=nfs_usage -TST_NEEDS_TMPDIR=1 +TST_ALL_FILESYSTEMS=1 +TST_SKIP_FILESYSTEMS="exfat,ext2,ext3,fuse,ntfs,vfat,tmpfs" +TST_MOUNT_DEVICE=1 +TST_FORMAT_DEVICE=1 TST_NEEDS_ROOT=1 TST_NEEDS_CMDS="$TST_NEEDS_CMDS mount exportfs mount.nfs" TST_SETUP="${TST_SETUP:-nfs_setup}" @@ -68,7 +71,7 @@ get_remote_dir() local v="$1" local n="$2" - echo "$TST_TMPDIR/$v/$n" + echo "$TST_MNTPOINT/$v/$n" } nfs_get_remote_path() @@ -210,6 +213,7 @@ nfs_cleanup() grep -q "$local_dir" /proc/mounts && umount $local_dir n=$(( n + 1 )) done + sleep 2 n=0 for i in $VERSION; do @@ -219,12 +223,15 @@ nfs_cleanup() if tst_net_use_netns; then if test -d $remote_dir; then exportfs -u *:$remote_dir + sleep 1 rm -rf $remote_dir fi else tst_rhost_run -c "test -d $remote_dir && exportfs -u *:$remote_dir" + sleep 1 tst_rhost_run -c "test -d $remote_dir && rm -rf $remote_dir" fi + n=$(( n + 1 )) done } -- 2.40.0