diff options
| author | Phil Sutter <phil@nwl.cc> | 2025-10-02 13:22:56 +0200 |
|---|---|---|
| committer | Phil Sutter <phil@nwl.cc> | 2025-10-23 22:48:51 +0200 |
| commit | aad26d166278aacbd42ce0d1f258c6fd30a05c7c (patch) | |
| tree | c3c85e99341c2afa6a074afb5d7d1bea136293ce /tests/py/nft-test.py | |
| parent | b028f8ce616bb5a219a10844357b9a3822d99a8c (diff) | |
tests: py: Fix for using wrong payload path
If one family has a per-family payload record, following families used
it by accident for a .got file when they actually should use the generic
name.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'tests/py/nft-test.py')
| -rwxr-xr-x | tests/py/nft-test.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/py/nft-test.py b/tests/py/nft-test.py index 35b29fc9..019c828f 100755 --- a/tests/py/nft-test.py +++ b/tests/py/nft-test.py @@ -817,9 +817,10 @@ def rule_add(rule, filename, lineno, force_all_family_option, filename_path): for table in table_list: if rule[1].strip() == "ok": table_payload_expected = None + table_payload_path = payload_path try: payload_log = open("%s.payload.%s" % (filename_path, table.family)) - payload_path = payload_log.name + table_payload_path = payload_log.name table_payload_expected = payload_find_expected(payload_log, rule[0]) except: if not payload_log: @@ -868,14 +869,14 @@ def rule_add(rule, filename, lineno, force_all_family_option, filename_path): error += 1 try: - gotf = open("%s.got" % payload_path) + gotf = open("%s.got" % table_payload_path) gotf_payload_expected = payload_find_expected(gotf, rule[0]) gotf.close() except: gotf_payload_expected = None payload_log.seek(0, 0) if not payload_check(gotf_payload_expected, payload_log, cmd): - gotf = open("%s.got" % payload_path, 'a') + gotf = open("%s.got" % table_payload_path, 'a') payload_log.seek(0, 0) gotf.write("# %s\n" % rule[0]) while True: |
