summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordarealshinji <djcj@gmx.de>2015-07-13 17:54:30 (GMT)
committerdarealshinji <djcj@gmx.de>2015-07-13 17:54:30 (GMT)
commitd4720dcb722215dbdae4749e306c6d3f9a747e83 (patch)
treebade8345e2ed230ef88f26dd551c19cd743bb0b6 /tests
parent453660e7db8a1889627bba17b5606ad8a035c23c (diff)
downloadpatchelf-d4720dcb722215dbdae4749e306c6d3f9a747e83.zip
patchelf-d4720dcb722215dbdae4749e306c6d3f9a747e83.tar.gz
patchelf-d4720dcb722215dbdae4749e306c6d3f9a747e83.tar.bz2
soname test: set an initial DT_SONAME entry
Diffstat (limited to 'tests')
-rwxr-xr-xtests/soname.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/soname.sh b/tests/soname.sh
index f81e8ed..4a8fb96 100755
--- a/tests/soname.sh
+++ b/tests/soname.sh
@@ -6,13 +6,22 @@ mkdir -p ${SCRATCH}
cp libsimple.so ${SCRATCH}/
-# print and set DT_SONAME
+# set an initial DT_SONAME entry
+../src/patchelf --set-soname libsimple.so.1.0 ${SCRATCH}/libsimple.so
+newSoname=$(../src/patchelf --print-soname ${SCRATCH}/libsimple.so)
+if test "$newSoname" != libsimple.so.1.0; then
+ echo "failed --set-soname test. Expected newSoname: libsimple.so.1.0, got: $newSoname"
+ exit 1
+fi
+
+# print DT_SONAME
soname=$(../src/patchelf --print-soname ${SCRATCH}/libsimple.so)
if test "$soname" != libsimple.so.1.0; then
echo "failed --print-soname test. Expected soname: libsimple.so.1.0, got: $soname"
exit 1
fi
+# replace DT_SONAME entry
../src/patchelf --set-soname libsimple.so.1.1 ${SCRATCH}/libsimple.so
newSoname=$(../src/patchelf --print-soname ${SCRATCH}/libsimple.so)
if test "$newSoname" != libsimple.so.1.1; then