Skip to content

Commit 40c31cb

Browse files
committed
revert: qemu changes
QEMU has been updated. Those changes should not be required anymore.
1 parent 5819fc5 commit 40c31cb

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

tests/replace-add-needed.sh

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,7 @@ cp libbar.so "${SCRATCH}"/
1111

1212
cd "${SCRATCH}"
1313

14-
# QEMU & ldd are not playing well together in certain cases
15-
CHECK_QEMU=0
16-
libcldd=$(ldd ./simple | awk '/ => / { print $3 }' | grep -E "(libc(-[0-9.]*)*.so|ld-musl)") || CHECK_QEMU=1
17-
if [ "${CHECK_QEMU}" -ne 0 ]; then
18-
if [ -f /lib64/libc.so.6 ] && grep qemu /proc/1/cmdline >/dev/null 2>&1; then
19-
libcldd=/lib64/libc.so.6
20-
else
21-
echo "ldd ./simple failed"
22-
exit 1
23-
fi
24-
fi
14+
libcldd=$(ldd ./simple | awk '/ => / { print $3 }' | grep -E "(libc(-[0-9.]*)*.so|ld-musl)")
2515

2616
# We have to set the soname on these libraries
2717
${PATCHELF} --set-soname libbar.so ./libbar.so

tests/set-interpreter-long.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@ SCRATCH=scratch/$(basename "$0" .sh)
66
oldInterpreter=$(../src/patchelf --print-interpreter ./simple)
77
echo "current interpreter is $oldInterpreter"
88

9-
RUN_EXPLICIT_INTERPRETER=0
10-
if [ "$(uname)" = Linux ] && ! grep qemu /proc/1/cmdline >/dev/null 2>&1; then # QEMU & ldd/ld.so are not playing well together in certain cases
11-
RUN_EXPLICIT_INTERPRETER=1
12-
fi
13-
14-
if [ "${RUN_EXPLICIT_INTERPRETER}" -ne 0 ]; then
9+
if test "$(uname)" = Linux; then
1510
echo "running with explicit interpreter..."
1611
"$oldInterpreter" ./simple
1712
fi
@@ -33,7 +28,7 @@ echo "running with new interpreter..."
3328
ln -s "$oldInterpreter" "$newInterpreter"
3429
"${SCRATCH}"/simple
3530

36-
if [ "${RUN_EXPLICIT_INTERPRETER}" -ne 0 ]; then
31+
if test "$(uname)" = Linux; then
3732
echo "running with explicit interpreter..."
3833
"$oldInterpreter" "${SCRATCH}/simple"
3934
fi

0 commit comments

Comments
 (0)