Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5518626pxj; Wed, 26 May 2021 12:27:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOp3PnE3AuBGiEg1YZPoqwtxzuQVZn90lwZIH/y5kKIdedCC7PUBfrVRdGuCIFgXAwSVsF X-Received: by 2002:a17:906:134e:: with SMTP id x14mr35187527ejb.190.1622057239188; Wed, 26 May 2021 12:27:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622057239; cv=none; d=google.com; s=arc-20160816; b=Igj6dUljpWdtmP47qm1LtC8gwuatANQHpYXQMJXF8Q4ryQrCcIrb20L456JW1Zty/G l6xQiNT59ta+WZh7W7CKFOpScw586MgYD9yRAEVdqS+KWzFFpXwBWJO/AuWmo5+g/nuw C42IfZ+j0PbcGcs+vEs7eB93h1gowq/UA7dSHbNtyfVb9TyGl2kDp3jO1VzN3FO3OJq1 v3Sq67EyNjRvHpEaq2T0R1DvD2VRqyGxjN5Nv/n6M782XtyCay9yYqkS5IEl4MoEMqRy /4m6bBQSxe0N2v45tESeowoCJH6+4urIuNLCLlnNP+y2atjEn02oo3JyNI2GILwk++pA gCyQ== 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=SK1nOwApoB060hVZEHApU/oevSCROkupDp1uSU4WGFk=; b=RiPAoYFFKZE9g9O4x7wM8V8BP1l47nxlV4zjEf/YNUQvL1Dz2HMHrOJ+AXpvFYrm0k DKS2LmxDR+GHW74vNtgqbhbO2numvK6UZAPAeVF3o7qRe6N06bGZzh612aKaHW7gKq+B 23zs0JAfksxH5JJDJgPl/LJUbTF9HiQlaXcGqvCuaZrJnmBUS6cyhi3IOJhHe5OPGM5Z Y5An93l5EyCHxnueIbe6Na1Qec6ejBS1Q1njjeja1k67iNisIoDnTKc9R29pO1DQXYoD Di43z6G4353tpTCI62bZTjnsqwo6WYk6rl4G8QdPchHz70XFPjXl7exJtrJR2IpD71jJ 4yKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=eol3yfsP; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h3si200918edw.187.2021.05.26.12.26.55; Wed, 26 May 2021 12:27:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=eol3yfsP; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234386AbhEZRfe (ORCPT + 99 others); Wed, 26 May 2021 13:35:34 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:52924 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234009AbhEZRfe (ORCPT ); Wed, 26 May 2021 13:35:34 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 09DE6218D6; Wed, 26 May 2021 17:25:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1622049911; 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=SK1nOwApoB060hVZEHApU/oevSCROkupDp1uSU4WGFk=; b=eol3yfsPu1+ki1WlO3dEloXfMopIP7VeNBzybI9iOwNRwjiZpGF8uJIrMEZ6IaChBSP65f 45Cz+88N1L9x6J/RacxdvF7iU4pfGnm6lJGSK5sS4jzAslHvGVGTFBRsxXrd5jbzEyML1R 146B+67PF2ixneNqtMxqSWB92SEOsAg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1622049911; 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=SK1nOwApoB060hVZEHApU/oevSCROkupDp1uSU4WGFk=; b=Ge4MWO6Pw33JbeSTrAQ0K8vWWMZDoq67pkE5E+ZPS45V8M/Qw1ThPImUxwb1Fe7juZFAqS v6yyCQEStlgYddBg== Received: from director2.suse.de (director2.suse-dmz.suse.de [192.168.254.72]) by imap.suse.de (Postfix) with ESMTPSA id C090811A98; Wed, 26 May 2021 17:25:10 +0000 (UTC) From: Petr Vorel To: ltp@lists.linux.it Cc: Petr Vorel , Alexey Kodanev , linux-nfs@vger.kernel.org Subject: [LTP PATCH v2 3/3] nfs_lib.sh: Check running rpc.mountd, rpc.statd Date: Wed, 26 May 2021 19:25:03 +0200 Message-Id: <20210526172503.18621-3-pvorel@suse.cz> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210526172503.18621-1-pvorel@suse.cz> References: <20210526172503.18621-1-pvorel@suse.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org NOTE: we're not checking rpcbind/portmap which is required for NFSv3, as it's rpc.mountd dependency. Deliberately not add pgrep as required dependency. Signed-off-by: Petr Vorel --- changes v1->v2: * check for rpc.mountd, rpc.statd (previsously checked for rpc.mountd, rpcbind/portmap) testcases/network/nfs/nfs_stress/nfs_lib.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/testcases/network/nfs/nfs_stress/nfs_lib.sh b/testcases/network/nfs/nfs_stress/nfs_lib.sh index 26b670c35..9bef1b86a 100644 --- a/testcases/network/nfs/nfs_stress/nfs_lib.sh +++ b/testcases/network/nfs/nfs_stress/nfs_lib.sh @@ -27,7 +27,7 @@ TST_PARSE_ARGS=nfs_parse_args TST_USAGE=nfs_usage TST_NEEDS_TMPDIR=1 TST_NEEDS_ROOT=1 -TST_NEEDS_CMDS="$TST_NEEDS_CMDS mount exportfs" +TST_NEEDS_CMDS="$TST_NEEDS_CMDS exportfs mount" TST_SETUP="${TST_SETUP:-nfs_setup}" TST_CLEANUP="${TST_CLEANUP:-nfs_cleanup}" TST_NEEDS_DRIVERS="nfsd" @@ -110,11 +110,6 @@ nfs_mount() nfs_setup() { - # Check if current filesystem is NFS - if [ "$(stat -f . | grep "Type: nfs")" ]; then - tst_brk TCONF "Cannot run nfs-stress test on mounted NFS" - fi - local i local type local n=0 @@ -123,6 +118,16 @@ nfs_setup() local remote_dir local mount_dir + if [ "$(stat -f . | grep "Type: nfs")" ]; then + tst_brk TCONF "Cannot run nfs-stress test on mounted NFS" + fi + + if tst_cmd_available pgrep; then + for i in rpc.mountd rpc.statd; do + pgrep $i > /dev/null || tst_brk TCONF "$i not running" + done + fi + for i in $VERSION; do type=$(get_socket_type $n) tst_res TINFO "setup NFSv$i, socket type $type" -- 2.31.1