Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2341149rwr; Fri, 28 Apr 2023 09:05:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6xDYq/BZcXXYCm0tK430XzLM9QT36Fxek55jxF/bPCV17qryVDm+XL21QyFbtLYv4idC3/ X-Received: by 2002:a17:90b:1649:b0:24c:5e6:7035 with SMTP id il9-20020a17090b164900b0024c05e67035mr5946919pjb.30.1682697938291; Fri, 28 Apr 2023 09:05:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682697938; cv=none; d=google.com; s=arc-20160816; b=SCQAYiCK25I2qKdW0WrC+YUVktI0CtW+w3cVhPxvWn9e5PrWCr3N+X6c8otLbqFLea lW7d9MmNlCDxX8jgIBI8PTV+GmZptnnJmW/YDE6+OVL2KixCxMe/0dVGVoIXo3tDNqpO B8RIIuHFPGCO4WS8nBgjwPBE3CaNh8kJnUl/kPO2UJbgMYdiDqaD19XtgXccBQ2HMn+7 sdxxeMGSXvaCY2GlsS4xB95i8LU32BwVvYtI97zVpMPEXSUZTUbOgOjNpjZACsyvvLFh z5fxDc8KJ+rH5u40ydc1P6gO2drvFEzL+HpJZKm30+6M6vzuBj+Wu2c4NDgrBUApDsPo ql2Q== 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=83cC++JBvxtuYwqI1Wpal4dXD6seEE+xJXHtcSQOxnc=; b=wac+YqEr6a4w6qe8Rrf3huvO4cEfz1vxJv3LwwWWy1hZwAPhAzYFthmYizdS4q5ikf gNfd82J3dwqtDTCCUJQVv10CReYe1m8EvqNW/27w/XXQwPuVyPtFNOsR9e5ALqkzQDXk kYBB0PxPpZ2ZvC21i7V9sRTtr1cSoj5csj4OvK/eQyCdE78EYtfFuyzQlrc9DWnaA7x/ EgUs4AHgu/5caT3nnmNuagPNV6PezU20LgdnbMh4MZgpsgl2d+DRg1le+9rNzTgUCRui xFhoC0SyBLxaOR0U6CuD6n+2x11p6QY7hIeofMM66bPHJD4Wmz7TTZJ/jrBTkkBM2dRZ GBOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=1arSPZNk; dkim=neutral (no key) header.i=@suse.cz header.b=IvLs6n3B; 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 13-20020a17090a08cd00b002467062c312si23095962pjn.128.2023.04.28.09.05.18; Fri, 28 Apr 2023 09:05:38 -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=1arSPZNk; dkim=neutral (no key) header.i=@suse.cz header.b=IvLs6n3B; 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 S1346055AbjD1QAe (ORCPT + 99 others); Fri, 28 Apr 2023 12:00:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346039AbjD1QAd (ORCPT ); Fri, 28 Apr 2023 12:00:33 -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 A319F2D63 for ; Fri, 28 Apr 2023 09:00:32 -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 5F9B31F8BF; Fri, 28 Apr 2023 16:00:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1682697631; 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=83cC++JBvxtuYwqI1Wpal4dXD6seEE+xJXHtcSQOxnc=; b=1arSPZNkhbjfxLYH1ySqy60y6Tu32MjneIiI69Z8xEYcbvgRP/CAN/UnbseG1ACPmxOpfI RFF/9jKqpcB/c2/xthzNXZYlCXjCNwpIh+CuiLWPDsB3islEq3UBKo9vxrRSobLuJg6I5y ho2Zj59QC+yO4jHLYdywrDJmnLxQwqE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1682697631; 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=83cC++JBvxtuYwqI1Wpal4dXD6seEE+xJXHtcSQOxnc=; b=IvLs6n3BaASYoygxu3j2PTXo4QX0+9GyHp0EU9YMg+Lh/hOZTrF1hpxwzLYz1i3pJFiSnV W9opQVoYRAOPqCDQ== 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 90449138FA; Fri, 28 Apr 2023 16:00:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id CEDGHp7tS2SRbQAAMHmgww (envelope-from ); Fri, 28 Apr 2023 16:00:30 +0000 From: Petr Vorel To: ltp@lists.linux.it Cc: Petr Vorel , NeilBrown , Cyril Hrubis , linux-nfs@vger.kernel.org Subject: [PATCH v4 2/4] nfs_lib.sh: Unexport on proper side on netns Date: Fri, 28 Apr 2023 18:00:36 +0200 Message-Id: <20230428160038.3534905-3-pvorel@suse.cz> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230428160038.3534905-1-pvorel@suse.cz> References: <20230428160038.3534905-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 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 --- The same as in v3. 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