git: 668a32ab231d - stable/12 - netpfil tests: improve pfsync_defer.py
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 29 Jan 2023 07:50:52 UTC
The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=668a32ab231df18dba8b70f7a13f736dbb486210 commit 668a32ab231df18dba8b70f7a13f736dbb486210 Author: Kajetan Staszkiewicz <vegeta@tuxpowered.net> AuthorDate: 2023-01-20 09:43:02 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2023-01-29 02:34:56 +0000 netpfil tests: improve pfsync_defer.py Return different exit code depending on which failure was encountered. The pfsync test expect a very particular failure, not just any. MFC after: 1 week Sponsored by: InnoGames GmbH Differential Revision: https://reviews.freebsd.org/D38123 (cherry picked from commit 06012728beff45e94d58410eae7cda2ea980ef77) --- tests/sys/netpfil/pf/pfsync.sh | 2 +- tests/sys/netpfil/pf/pfsync_defer.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/sys/netpfil/pf/pfsync.sh b/tests/sys/netpfil/pf/pfsync.sh index bbe3fbcb1d2a..737753103683 100755 --- a/tests/sys/netpfil/pf/pfsync.sh +++ b/tests/sys/netpfil/pf/pfsync.sh @@ -168,7 +168,7 @@ defer_body() "set skip on ${epair_sync}a" \ "pass keep state" - atf_check -s exit:1 env PYTHONPATH=${common_dir} \ + atf_check -s exit:3 env PYTHONPATH=${common_dir} \ $(atf_get_srcdir)/pfsync_defer.py \ --syncdev ${epair_sync}b \ --indev ${epair_in}b \ diff --git a/tests/sys/netpfil/pf/pfsync_defer.py b/tests/sys/netpfil/pf/pfsync_defer.py index 4a691240b466..c1d90d4483c4 100644 --- a/tests/sys/netpfil/pf/pfsync_defer.py +++ b/tests/sys/netpfil/pf/pfsync_defer.py @@ -117,15 +117,15 @@ def main(): sys.exit(1) if not got_ping: - sys.exit(1) + sys.exit(2) if got_pfsync > got_ping: - sys.exit(1) + sys.exit(3) # Deferred packets are delayed up to 20ms (unless the pfsync peer, which we # don't have here, acks their state update earlier) if (sent_ping + 0.020) > got_ping: - sys.exit(1) + sys.exit(4) if __name__ == '__main__': main()