From 24fe0cb84d71a0e9d648c43f92b5c3a730c3855a Mon Sep 17 00:00:00 2001 From: Jose Luis Duran Date: Tue, 17 Oct 2023 11:35:38 +0000 Subject: [PATCH] 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 --- sbin/ping/tests/test_ping.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ping/tests/test_ping.py b/sbin/ping/tests/test_ping.py index 900fbf45d52..3c66e6c54c4 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] -- 2.45.0