summaryrefslogtreecommitdiffstats
path: root/tests/set-interpreter-short.sh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-09-30 15:38:42 (GMT)
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-09-30 15:38:42 (GMT)
commit8d7076e8cfeb874235b2ce0a2aca638f559fa739 (patch)
tree635f08dff0332c0cbbebf320f1902cd83c76fcae /tests/set-interpreter-short.sh
parent53494408276ceccf1c02a8fdae83beae674fa547 (diff)
downloadpatchelf-8d7076e8cfeb874235b2ce0a2aca638f559fa739.zip
patchelf-8d7076e8cfeb874235b2ce0a2aca638f559fa739.tar.gz
patchelf-8d7076e8cfeb874235b2ce0a2aca638f559fa739.tar.bz2
* Set a interpreter with a short name.
Diffstat (limited to 'tests/set-interpreter-short.sh')
-rwxr-xr-xtests/set-interpreter-short.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/set-interpreter-short.sh b/tests/set-interpreter-short.sh
new file mode 100755
index 0000000..bab1184
--- /dev/null
+++ b/tests/set-interpreter-short.sh
@@ -0,0 +1,22 @@
+#! /bin/sh -e
+
+./simple
+
+oldInterpreter=$(../src/patchelf --print-interpreter ./simple)
+echo "current interpreter is $oldInterpreter"
+
+rm -rf scratch
+mkdir -p scratch
+
+cp simple scratch/
+../src/patchelf --interpreter $(pwd)/scratch/i scratch/simple
+
+echo "running with missing interpreter..."
+if scratch/simple; then
+ echo "simple works, but it shouldn't"
+ exit 1
+fi
+
+echo "running with new interpreter..."
+ln -s "$oldInterpreter" scratch/i
+scratch/simple