From patchwork Wed Feb 22 13:30:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 13149158 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 4EB52C61DA4 for ; Wed, 22 Feb 2023 13:32:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229672AbjBVNcN (ORCPT ); Wed, 22 Feb 2023 08:32:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231799AbjBVNcN (ORCPT ); Wed, 22 Feb 2023 08:32:13 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAA5D3B23B for ; Wed, 22 Feb 2023 05:31:15 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 930ABB8123A for ; Wed, 22 Feb 2023 13:30:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A56F7C433D2; Wed, 22 Feb 2023 13:30:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677072623; bh=9Bn16TkRKwuNZyh/QyhM6dH7sZeD7Yv8zo7pheE5v5U=; h=From:To:Cc:Subject:Date:From; b=mVSBqNIaZcv6BI8R+dIYZHB7UXu7WJyGLSBOtrCg1MpY5zCZWc+DWngMNuqKkdM43 Cbq0P7XHxo4ct5dj8FMuCMBg2IOAzGyon44LTFrOEOMbWA5YWoORZ+ZtMZJIYa4cWD YuSrRFoBZnPV9JdRhkaqXHNAFyxLEIxrtjiwYnG4NqxIlFqz5S5mYbfVSGfo2Kiz1m 8AQLo7hBMc66laX4TS7D6pXn0qo64x85A2U8AZAHEMTi1/Ri3MR//JUTL50pLtzcEf 7KfnOkv3a+aEsn0fzwoOtRLgi3Nq/4aFDCd2rcaASomLRmjaMMSwicfEu68Ur2PFQF aK9aEcvD08nmg== From: Jeff Layton To: bfields@fieldses.org, dai.ngo@oracle.com Cc: linux-nfs@vger.kernel.org Subject: [pynfs PATCH] examples: add a new example localhost_helper.sh script Date: Wed, 22 Feb 2023 08:30:21 -0500 Message-Id: <20230222133021.29775-1-jlayton@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org It's possible (and pretty common) to run pynfs against the server running on the same host. Add a new serverhelper script for that purpose. Signed-off-by: Jeff Layton --- examples/localhost_helper.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 examples/localhost_helper.sh diff --git a/examples/localhost_helper.sh b/examples/localhost_helper.sh new file mode 100755 index 000000000000..6db123311e7a --- /dev/null +++ b/examples/localhost_helper.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# +# serverhelper script for running tests against knfsd running on localhost. +# Note that this requires that the running user can use sudo to restart nfsd +# without a password. +# + +# server argument is ignored here +server=$1 +command=$2 +shift; shift + +case $command in +reboot ) + sudo systemctl restart nfs-server.service + ;; +unlink ) + rm $1 + ;; +rename ) + mv $1 $2 + ;; +link ) + ln $1 $2 + ;; +chmod ) + chmod $1 $2 + ;; +esac