git: f790f2809202 - stable/14 - ping tests: Fix test on i386 platforms

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Fri, 03 Nov 2023 13:31:09 UTC
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=f790f2809202389eee7750eb160491d44449d3ef

commit f790f2809202389eee7750eb160491d44449d3ef
Author:     Jose Luis Duran <jlduran@gmail.com>
AuthorDate: 2023-10-17 11:35:38 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-11-03 13:30:58 +0000

    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
    
    (cherry picked from commit 24fe0cb84d71a0e9d648c43f92b5c3a730c3855a)
---
 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 26a69b62f8fb..b501b8a606bf 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]