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@xxxxxx> --- 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