git: 6fc227a68bbd - releng/15.0 - Ping: Make build reproducible
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 16 Oct 2025 20:08:19 UTC
The branch releng/15.0 has been updated by cperciva:
URL: https://cgit.FreeBSD.org/src/commit/?id=6fc227a68bbd12e070ed92985057dc933f4801b3
commit 6fc227a68bbd12e070ed92985057dc933f4801b3
Author: Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2025-10-13 15:58:10 +0000
Commit: Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2025-10-16 20:08:09 +0000
Ping: Make build reproducible
As recently fixed in sockstat (9934558460e4), having tests/Makefile
include files from the parent directory with SRCS= ../foo.c results
in a race condition as the parent build and the tests build try to
produce the same object file but contain different paths.
Use .PATH to tell make to find sockstat.c in the parent directory
but place the object file in the current object directory.
Approved by: re (cperciva)
Reviewed by: emaste, jrtc27, kevans
MFC after: 3 days
Sponsored by: https://www.patreon.com/cperciva
Differential Revision: https://reviews.freebsd.org/D53075
(cherry picked from commit 3c9a2f383fc25cdffa80c1348cb5388290e0f283)
(cherry picked from commit a7c1d6b72a3e3b979d38ad1ad706cc0d9be927ae)
---
sbin/ping/tests/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sbin/ping/tests/Makefile b/sbin/ping/tests/Makefile
index 0520b1d634cf..7d3ab02b9a86 100644
--- a/sbin/ping/tests/Makefile
+++ b/sbin/ping/tests/Makefile
@@ -1,5 +1,6 @@
ATF_TESTS_C+= in_cksum_test
-SRCS.in_cksum_test= in_cksum_test.c ../utils.c
+.PATH: ${.CURDIR:H}
+SRCS.in_cksum_test= in_cksum_test.c utils.c
PACKAGE= tests