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:		5b8af90fe3 ("ping: Add ATF-Python tests")
Pull Request:	https://github.com/freebsd/freebsd-src/pull/874
Differential Revision: https://reviews.freebsd.org/D42268
This commit is contained in:
Jose Luis Duran 2023-10-17 11:35:38 +00:00 committed by Mark Johnston
parent fabf705f4b
commit 24fe0cb84d

View file

@ -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]