Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp507126rwr; Thu, 4 May 2023 06:16:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4NhMoqf9SVj5IhIN45mA7X4+uANjZIe4fi2KfWzXYWGomCt682IVFlxmZPGRjVh2JmEGqS X-Received: by 2002:a17:903:32cc:b0:1a2:3108:5cc9 with SMTP id i12-20020a17090332cc00b001a231085cc9mr4714004plr.40.1683206214273; Thu, 04 May 2023 06:16:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683206214; cv=none; d=google.com; s=arc-20160816; b=bFJCi7HM5iw8SImz03WcoE14IIxBRNops19gLd/3yn4FjBGkvPaIf1TVDHxwRfM3ge fnd6Dr7nCLIaJWkW3QKCUQ1En5TZoM1bN3EqWqxVBODkAXUJVmM5qEu8fL1ABMxrITFp TROjUaBIgFhfJTRCLLRp1M9ikgJ99JVEfg4gwPtCYrpK/T4L0/bJDhITV5eaKhvRZYUe jbff5mLPKomd/6kV9z7YRQAg6AwQV8e43HMAZ1VRO0xy5epM2cc4ZxO/79i8YFaglvB4 JdMEzg/uXznI1VM71HnKnFGioyOsrxz0/TzI65FkMdAniA7l8XKPbHVf1WOHI++w6ImB uxKg== 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=/iyzeLzCsMCdsmJwHyVbIHUwIBHNpy11fYoEtMxyvpk=; b=sBDq9SJMn5tmsvnA0KJuA39BV6NvLLiIKnrRHWUE7VWOuNsRXkKbzg8tikzW7g4evs 3IfHHtmIxLvxGT+TKpXWjSuFEQC0zYr0Kr+62EtPW/7CaB/EtlGknFnGLFjySASqsy15 HWYMjRXy5KY3iuAbSUsslYXIWwFuuffUnTOgpuoZNLpv6M70fkGN8lU+z1ge/5lgm5TR v1Di22bvSnbLhhq+eWKrUXYkvQ+yKJKrWmqgSqyyk/P+MFxZLtaXq/EJtoYv/fsBas/u eqOivdfJqhMBsARCfNGhYsFSBOw0adaS5mR/x3sMocrtLcnReEyHcxlx38LS4wgwuGws kXfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=MrqPBCr5; 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 l7-20020a17090270c700b001aaf5dcd774si3190865plt.173.2023.05.04.06.16.27; Thu, 04 May 2023 06:16:54 -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=MrqPBCr5; 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 S230030AbjEDNOI (ORCPT + 99 others); Thu, 4 May 2023 09:14:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229925AbjEDNOH (ORCPT ); Thu, 4 May 2023 09:14:07 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41E817289 for ; Thu, 4 May 2023 06:14:06 -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 EC7131FEAE; Thu, 4 May 2023 13:14:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1683206044; 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=/iyzeLzCsMCdsmJwHyVbIHUwIBHNpy11fYoEtMxyvpk=; b=MrqPBCr5EfDFZVab1pxQk0gOd64vBZVkRx7JlLS/d6Ka6wVU5Dg9r0H0kYKKngtJZtyjaP o+L8bmavB3xdAR+szk0AEVfBsHbxP5mDlCG3O7QNZGCBmnjRkBB3r58LIpLeeQxjriTMm3 SPEeJ8K7sXpKcDV5ls1oztZKW2BY7Cs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1683206044; 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=/iyzeLzCsMCdsmJwHyVbIHUwIBHNpy11fYoEtMxyvpk=; b=Dw/Ow6bW49kqOGHzAv27rgCkvZ7IIZg+496bKYPP54N1gDq4GahFpRDdfMMdgYWaXda5bD BzKj5Q2fLm6O4bBw== 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 7F83113444; Thu, 4 May 2023 13:14:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4MwUG5yvU2TXVgAAMHmgww (envelope-from ); Thu, 04 May 2023 13:14:04 +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 2/5] nfs_lib.sh: Unexport on proper side on netns Date: Thu, 4 May 2023 15:14:11 +0200 Message-Id: <20230504131414.3826283-3-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=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,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 f6b267055 changed exportfs run locally on netns, therefore unexporting should be also run at the same namespace. This is not problematic now, but will be a problem with TST_ALL_FILESYSTEMS=1, which is sensitive for timing. Fixes: f6b267055 ("nfs_lib.sh: run exportfs at "server side" in LTP_NETNS case") Signed-off-by: Petr Vorel --- testcases/network/nfs/nfs_stress/nfs_lib.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/testcases/network/nfs/nfs_stress/nfs_lib.sh b/testcases/network/nfs/nfs_stress/nfs_lib.sh index 1b5604ab5..042fea5e4 100644 --- a/testcases/network/nfs/nfs_stress/nfs_lib.sh +++ b/testcases/network/nfs/nfs_stress/nfs_lib.sh @@ -215,8 +215,16 @@ nfs_cleanup() for i in $VERSION; do type=$(get_socket_type $n) remote_dir="$(get_remote_dir $i $type)" - tst_rhost_run -c "test -d $remote_dir && exportfs -u *:$remote_dir" - tst_rhost_run -c "test -d $remote_dir && rm -rf $remote_dir" + + if tst_net_use_netns; then + if test -d $remote_dir; then + exportfs -u *:$remote_dir + rm -rf $remote_dir + fi + else + tst_rhost_run -c "test -d $remote_dir && exportfs -u *:$remote_dir" + tst_rhost_run -c "test -d $remote_dir && rm -rf $remote_dir" + fi n=$(( n + 1 )) done } -- 2.40.0