* [nft PATCH] tests: monitor: Become $PWD agnostic
@ 2024-11-07 13:46 Phil Sutter
2024-11-07 17:33 ` Phil Sutter
0 siblings, 1 reply; 2+ messages in thread
From: Phil Sutter @ 2024-11-07 13:46 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter-devel, Florian Westphal
The call to 'cd' is problematic since later the script tries to 'exec
unshare -n $0'. This is not the only problem though: Individual test
cases specified on command line are expected to be relative to the
script's directory, too. Just get rid of these nonsensical restrictions.
Reported-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
tests/monitor/run-tests.sh | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tests/monitor/run-tests.sh b/tests/monitor/run-tests.sh
index 36fc800c10520..9d25a395cbcf2 100755
--- a/tests/monitor/run-tests.sh
+++ b/tests/monitor/run-tests.sh
@@ -1,7 +1,6 @@
#!/bin/bash
-cd $(dirname $0)
-nft=${NFT:-../../src/nft}
+nft=${NFT:-$(dirname $0)/../../src/nft}
debug=false
test_json=false
@@ -192,7 +191,7 @@ while [ -n "$1" ]; do
nft=nft
shift
;;
- testcases/*.t)
+ *.t)
testcases+=" $1"
shift
;;
--
2.47.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [nft PATCH] tests: monitor: Become $PWD agnostic
2024-11-07 13:46 [nft PATCH] tests: monitor: Become $PWD agnostic Phil Sutter
@ 2024-11-07 17:33 ` Phil Sutter
0 siblings, 0 replies; 2+ messages in thread
From: Phil Sutter @ 2024-11-07 17:33 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter-devel, Florian Westphal
On Thu, Nov 07, 2024 at 02:46:36PM +0100, Phil Sutter wrote:
> The call to 'cd' is problematic since later the script tries to 'exec
> unshare -n $0'. This is not the only problem though: Individual test
> cases specified on command line are expected to be relative to the
> script's directory, too. Just get rid of these nonsensical restrictions.
>
> Reported-by: Florian Westphal <fw@strlen.de>
> Signed-off-by: Phil Sutter <phil@nwl.cc>
Patch applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-07 17:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-07 13:46 [nft PATCH] tests: monitor: Become $PWD agnostic Phil Sutter
2024-11-07 17:33 ` Phil Sutter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox