aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2018-10-10 21:50:10 +0100
committerMark Hatle <mark.hatle@windriver.com>2018-10-12 10:58:26 -0400
commitbd6e69d4f446253285118b4ef0740918a34a59c4 (patch)
tree38afb1c0a6b04312eb6ec655cd48d80cdb642c1f
parent312b2f5561c6232d168f7535782c711792aabc67 (diff)
downloadprelink-cross-bd6e69d4f446253285118b4ef0740918a34a59c4.tar.gz
prelink-cross-bd6e69d4f446253285118b4ef0740918a34a59c4.tar.bz2
prelink-cross-bd6e69d4f446253285118b4ef0740918a34a59c4.zip
testsuite/functions.sh: produce deterministic GNU_PRELINK section
Before the change one test failed due to timestamp drift: FAIL: shuffle7.sh This happens because prelinking takes time on the file and timestamp differs slightly. Avoid timestamp drift by overriding real timestamp with PRELINK_TIMESTAMP variable. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Added ChangeLog entry Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-rw-r--r--ChangeLog3
-rwxr-xr-xtestsuite/functions.sh6
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 271e908..73a301c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2018-10-12 Sergei Trofimovich <slyfox@gentoo.org>
+ * tessuite/functions.sh: Avoid timestamp drift
+
2018-10-12 Joseph Myers <joseph@codesourcery.com>
* testsuite/unprel1.sh: Fix for cross testing
diff --git a/testsuite/functions.sh b/testsuite/functions.sh
index 07a3827..89d996a 100755
--- a/testsuite/functions.sh
+++ b/testsuite/functions.sh
@@ -4,6 +4,12 @@ CCLINK=${CCLINK:-${CC} -Wl,--dynamic-linker=`echo ./ld*.so.*[0-9]`}
CXX="${CXX:-g++} ${LINKOPTS}"
CXXLINK=${CXXLINK:-${CXX} -Wl,--dynamic-linker=`echo ./ld*.so.*[0-9]`}
PRELINK=${PRELINK:-../src/prelink -c ./prelink.conf -C ./prelink.cache --ld-library-path=. --dynamic-linker=`echo ./ld*.so.*[0-9]` --rtld=../src/rtld/prelink-rtld}
+
+# force deterministic timestamps to make double prelinking
+# to produce unmodified binary.
+PRELINK_TIMESTAMP=${PRELINK_TIMESTAMP:-12345678}
+export PRELINK_TIMESTAMP
+
LDD=${LDD:-../src/rtld/prelink-rtld}
STRIP=${STRIP:-strip}
HOST_CC=${HOST_CC:-$CC}