* Also try a interpreter with a long name.
This commit is contained in:
parent
8d7076e8cf
commit
774bdc0d5e
|
@ -1,6 +1,7 @@
|
|||
check_PROGRAMS = main simple
|
||||
|
||||
TESTS = plain-run.sh shrink.sh set-interpreter-short.sh $(XFAIL_TESTS) # set-rpath.sh
|
||||
TESTS = plain-run.sh shrink.sh set-interpreter-short.sh \
|
||||
set-interpreter-long.sh $(XFAIL_TESTS) # set-rpath.sh
|
||||
|
||||
XFAIL_TESTS = plain-fail.sh
|
||||
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
#! /bin/sh -e
|
||||
|
||||
./simple
|
||||
|
||||
oldInterpreter=$(../src/patchelf --print-interpreter ./simple)
|
||||
echo "current interpreter is $oldInterpreter"
|
||||
|
||||
rm -rf scratch
|
||||
mkdir -p scratch
|
||||
|
||||
newInterpreter=$(pwd)/scratch/iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
cp simple scratch/
|
||||
../src/patchelf --interpreter "$newInterpreter" 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" "$newInterpreter"
|
||||
scratch/simple
|
|
@ -9,14 +9,10 @@ rm -rf scratch
|
|||
mkdir -p scratch
|
||||
|
||||
cp simple scratch/
|
||||
../src/patchelf --interpreter $(pwd)/scratch/i scratch/simple
|
||||
../src/patchelf --interpreter /oops $(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
|
||||
|
|
Loading…
Reference in New Issue