summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/repeated-updates.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/repeated-updates.sh b/tests/repeated-updates.sh
index 669b11d..da7715a 100755
--- a/tests/repeated-updates.sh
+++ b/tests/repeated-updates.sh
@@ -2,6 +2,7 @@
SCRATCH=scratch/$(basename "$0" .sh)
PATCHELF=$(readlink -f "../src/patchelf")
+READELF=${READELF:-readelf}
rm -rf "${SCRATCH}"
mkdir -p "${SCRATCH}"
@@ -18,7 +19,7 @@ ${PATCHELF} --add-needed ./libbar.so simple
# Test that repeatedly modifying a string inside a shared library does not
# corrupt it due to the addition of multiple PT_LOAD entries
###############################################################################
-load_segments_before=$(readelf -W -l libbar.so | grep -c LOAD)
+load_segments_before=$(${READELF} -W -l libbar.so | grep -c LOAD)
for _ in $(seq 1 100)
do
@@ -27,7 +28,7 @@ do
./simple || exit 1
done
-load_segments_after=$(readelf -W -l libbar.so | grep -c LOAD)
+load_segments_after=$(${READELF} -W -l libbar.so | grep -c LOAD)
###############################################################################
# To be even more strict, check that we don't add too many extra LOAD entries