From: Phil Sutter <phil@nwl.cc>
To: netfilter-devel@vger.kernel.org
Subject: [iptables PATCH 3/5] tests: iptables-test: Fix for 'make distcheck'
Date: Wed, 6 Nov 2024 17:42:30 +0100 [thread overview]
Message-ID: <20241106164232.3384-3-phil@nwl.cc> (raw)
In-Reply-To: <20241106164232.3384-1-phil@nwl.cc>
This was a tricky one: Since called from VPATH topdir, extensions/ do
not contain test files at all. The script consequently passed since 0
tests failed (of 0 in total).
Fix this by introducing TESTS_PATH which is extensions/ below the directory
of the running iptables-test.py. Keep EXTENSIONS_PATH as-is: The built
extensions are indeed there and XTABLES_LIBDIR must point to them.
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
iptables-test.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/iptables-test.py b/iptables-test.py
index 141fec7b4ed16..66db552185bc3 100755
--- a/iptables-test.py
+++ b/iptables-test.py
@@ -30,6 +30,7 @@ EBTABLES_SAVE = "ebtables-save"
#IP6TABLES_SAVE = ['xtables-save','-6']
EXTENSIONS_PATH = "extensions"
+TESTS_PATH = os.path.join(os.path.dirname(sys.argv[0]), "extensions")
LOGFILE="/tmp/iptables-test.log"
log_file = None
@@ -558,7 +559,7 @@ STDERR_IS_TTY = sys.stderr.isatty()
'''
Show the list of missing test files
'''
- file_list = os.listdir(EXTENSIONS_PATH)
+ file_list = os.listdir(TESTS_PATH)
testfiles = [i for i in file_list if i.endswith('.t')]
libfiles = [i for i in file_list
if i.startswith('lib') and i.endswith('.c')]
@@ -669,8 +670,8 @@ STDERR_IS_TTY = sys.stderr.isatty()
if args.filename:
file_list = args.filename
else:
- file_list = [os.path.join(EXTENSIONS_PATH, i)
- for i in os.listdir(EXTENSIONS_PATH)
+ file_list = [os.path.join(TESTS_PATH, i)
+ for i in os.listdir(TESTS_PATH)
if i.endswith('.t')]
file_list.sort()
--
2.47.0
next prev parent reply other threads:[~2024-11-06 16:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-06 16:42 [iptables PATCH 1/5] tests: shell: iptables/0010-wait_0 is unreliable Phil Sutter
2024-11-06 16:42 ` [iptables PATCH 2/5] tests: shell: Print escape sequences with terminals only Phil Sutter
2024-11-06 16:42 ` Phil Sutter [this message]
2024-11-06 16:42 ` [iptables PATCH 4/5] tests: xlate-test: Fix for 'make distcheck' Phil Sutter
2024-11-06 16:42 ` [iptables PATCH 5/5] Makefile.am: Revert to old serial test harness Phil Sutter
2024-11-06 17:13 ` [iptables PATCH 1/5] tests: shell: iptables/0010-wait_0 is unreliable Phil Sutter
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=20241106164232.3384-3-phil@nwl.cc \
--to=phil@nwl.cc \
--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