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
This commit is contained in:
parent
f57218e469
commit
06012728be
@ -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 \
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user