]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 5237: "make check" fails when ${TRUE} is a multicall binary (#2442) master
authorRenan Rodrigo <rr@ubuntu.com>
Thu, 18 Jun 2026 15:04:35 +0000 (15:04 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Fri, 19 Jun 2026 03:24:26 +0000 (03:24 +0000)
testHeaders copies the 'true' binary to a file named testHeaders relying
on the fact that GNU's true always exits 0. When 'true' implementation
is a multicall binary (e.g., in rust-coreutils and on Alpine Linux), it
cannot be called by other name. Create an empty executable file instead.

squid-conf-tests also copied the 'true' binary, but that Makefile target
is never executed and, hence, should not create an executable file.

CONTRIBUTORS
src/TestHeaders.am
test-suite/Makefile.am

index 4509413cee344a120ca72d198f6336ccec45dbcc..8596f0b2e198b6666aafd59cd83bee46f50c2c4f 100644 (file)
@@ -439,6 +439,7 @@ Thank you!
     Regents of the University of California (UCSD)
     Reinhard Posmyk <Reinhard.Posmyk@arxes.de>
     Reinhard Sojka <reinhard.sojka@parlament.gv.at>
     Regents of the University of California (UCSD)
     Reinhard Posmyk <Reinhard.Posmyk@arxes.de>
     Reinhard Sojka <reinhard.sojka@parlament.gv.at>
+    Renan Rodrigo <rr@ubuntu.com>
     Rene Geile <rene.geile@t-online.de>
     Reuben Farrelly <reuben@reub.net>
     Ricardo Ferreira Ribeiro <garb12@pm.me>
     Rene Geile <rene.geile@t-online.de>
     Reuben Farrelly <reuben@reub.net>
     Ricardo Ferreira Ribeiro <garb12@pm.me>
index 0e6a023db2532441ec8a4254909242f8bdb60c20..40b8fddd5279700868f3dfe6aefe3bc116d144d4 100644 (file)
@@ -15,7 +15,7 @@ EXCLUDE_FROM_HDR_TESTING =
 # headers to test
 
 testHeaders: $(SOURCES) $(noinst_HEADERS) $(EXTRA_DIST) $(top_srcdir)/test-suite/testHeader.cc.in
 # headers to test
 
 testHeaders: $(SOURCES) $(noinst_HEADERS) $(EXTRA_DIST) $(top_srcdir)/test-suite/testHeader.cc.in
-       $(MAKE) $(^:.h=.hdrtest) && cp $(TRUE) $@
+       $(MAKE) $(^:.h=.hdrtest) && touch $@ && $(CHMOD) +x $@
 
 .h.hdrtest:
        @SrcFilePath=`echo $< | $(SED) 's%^$(top_srcdir)/%%'`; \
 
 .h.hdrtest:
        @SrcFilePath=`echo $< | $(SED) 's%^$(top_srcdir)/%%'`; \
index 1a7d91dd20ab5a58240256fcc33c56b5f423aa63..a8a3cc53149faba22dc708fe20e81d83a2d5c73f 100644 (file)
@@ -150,7 +150,7 @@ squid-conf-tests: $(srcdir)/test-squid-conf.sh $(top_builddir)/src/squid.conf.de
                                sed s%$(srcdir)/squidconf/%% ; \
                else break; fi; \
        done; \
                                sed s%$(srcdir)/squidconf/%% ; \
                else break; fi; \
        done; \
-       if test "$$failed" -eq 0; then cp $(TRUE) $@ ; else exit 1; fi
+       if test "$$failed" -eq 0; then touch $@ ; else exit 1; fi
 
 CLEANFILES += \
        squid-conf-tests \
 
 CLEANFILES += \
        squid-conf-tests \