git: 06012728beff - main - netpfil tests: improve pfsync_defer.py
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 22 Jan 2023 04:53:43 UTC
The branch main has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=06012728beff45e94d58410eae7cda2ea980ef77
commit 06012728beff45e94d58410eae7cda2ea980ef77
Author: Kajetan Staszkiewicz <vegeta@tuxpowered.net>
AuthorDate: 2023-01-20 09:43:02 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
CommitDate: 2023-01-22 03:26:32 +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
---
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 75b37516762f..21cc2ed87906 100644
--- a/tests/sys/netpfil/pf/pfsync.sh
+++ b/tests/sys/netpfil/pf/pfsync.sh
@@ -172,7 +172,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()