summaryrefslogtreecommitdiffstats
path: root/tests/no-rpath.sh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-10-01 01:05:50 (GMT)
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-10-01 01:05:50 (GMT)
commitdd77b207083013aeed5c62b50ffa99638fb0adf2 (patch)
tree94f6611ac5a47933c646db189f4d0d59620964da /tests/no-rpath.sh
parent2369d8b2def0775b0666350fd266bdc0abb07b0d (diff)
downloadpatchelf-dd77b207083013aeed5c62b50ffa99638fb0adf2.zip
patchelf-dd77b207083013aeed5c62b50ffa99638fb0adf2.tar.gz
patchelf-dd77b207083013aeed5c62b50ffa99638fb0adf2.tar.bz2
* Handle the case where no RPATH is present, so the .dynamic table has
to be increased.
Diffstat (limited to 'tests/no-rpath.sh')
-rwxr-xr-xtests/no-rpath.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/no-rpath.sh b/tests/no-rpath.sh
new file mode 100755
index 0000000..56c0646
--- /dev/null
+++ b/tests/no-rpath.sh
@@ -0,0 +1,21 @@
+#! /bin/sh -e
+
+rm -rf scratch
+mkdir -p scratch
+
+cp no-rpath scratch/
+
+oldRPath=$(../src/patchelf --print-rpath scratch/no-rpath)
+if test -n "$oldRPath"; then exit 1; fi
+../src/patchelf \
+ --interpreter "$(../src/patchelf --print-interpreter ../src/patchelf)" \
+ --set-rpath /foo:/bar:/xxxxxxxxxxxxxxx scratch/no-rpath
+
+newRPath=$(../src/patchelf --print-rpath scratch/no-rpath)
+if ! echo "$newRPath" | grep -q '/foo:/bar'; then
+ echo "incomplete RPATH"
+ exit 1
+fi
+
+exitCode=0
+cd scratch && ./no-rpath