diff options
author | Jose Luis Duran <jlduran@gmail.com> | 2023-10-17 11:35:38 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2023-10-19 13:35:39 +0000 |
commit | 24fe0cb84d71a0e9d648c43f92b5c3a730c3855a (patch) | |
tree | c138fe7a8882db3133906c8d42fa5d2b5cf3c120 | |
parent | fabf705f4b5aff2fa2dc997c2d0afd62a6927e68 (diff) | |
download | src-24fe0cb84d71a0e9d648c43f92b5c3a730c3855a.tar.gz src-24fe0cb84d71a0e9d648c43f92b5c3a730c3855a.zip |
ping tests: Fix test on i386 platforms
Actually use INT_MAX (0x7fffffff), not UINT_MAX (0xffffffff) to avoid
overflowing time_t and missing the test.
Reported by: Jenkins
Reviewed by: markj
Fixes: 5b8af90fe332 ("ping: Add ATF-Python tests")
Pull Request: https://github.com/freebsd/freebsd-src/pull/874
Differential Revision: https://reviews.freebsd.org/D42268
-rw-r--r-- | sbin/ping/tests/test_ping.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/ping/tests/test_ping.py b/sbin/ping/tests/test_ping.py index 900fbf45d52d..3c66e6c54c4d 100644 --- a/sbin/ping/tests/test_ping.py +++ b/sbin/ping/tests/test_ping.py @@ -51,7 +51,7 @@ def build_response_packet(echo, ip, icmp, oip_ihl, special): # Build a package with a timestamp of INT_MAX # (time-warped package) payload_no_timestamp = sc.bytes_hex(load)[16:] - load = (b"\xff" * 8) + sc.hex_bytes(payload_no_timestamp) + load = b"\x7f" + (b"\xff" * 7) + sc.hex_bytes(payload_no_timestamp) if special == "wrong": # Build a package with a wrong last byte payload_no_last_byte = sc.bytes_hex(load)[:-2] |