From: Phil Sutter <phil@nwl.cc>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft] tests: monitor: run-tests.sh: restore cwd before unshare
Date: Thu, 7 Nov 2024 14:39:29 +0100 [thread overview]
Message-ID: <ZyzDESVObswc_WPB@orbyte.nwl.cc> (raw)
In-Reply-To: <20241107125657.28339-1-fw@strlen.de>
On Thu, Nov 07, 2024 at 01:56:53PM +0100, Florian Westphal wrote:
> The monitor script no longer works if not called from tests/monitor directory:
>
> % tests/monitor/run-tests.sh
> unshare: failed to execute tests/monitor/run-tests.sh: No such file or directory
>
> ... because the script will change the directory.
> Stash and restore to old one so unshare $0 can work.
Still not perfect:
| % sudo ./tests/monitor/run-tests.sh ./tests/monitor/testcases/set-maps.t
| /home/n0-1/git/nftables /home/n0-1/git/nftables
| /home/n0-1/git/nftables
| /home/n0-1/git/nftables /home/n0-1/git/nftables
| unknown option './tests/monitor/testcases/set-maps.t'
| Usage: run-tests.sh [-j|--json] [-d|--debug] [testcase ...]
AFAICT, $(dirname $0) is only needed to locate the local nft binary. Let
me send a patch which eliminates the cd call entirely.
Cheers, Phil
prev parent reply other threads:[~2024-11-07 13:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-07 12:56 [PATCH nft] tests: monitor: run-tests.sh: restore cwd before unshare Florian Westphal
2024-11-07 13:39 ` Phil Sutter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZyzDESVObswc_WPB@orbyte.nwl.cc \
--to=phil@nwl.cc \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox