1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
#!/bin/sh
srcdir=${srcdir:-.}
. $srcdir/common.inc.sh
prepare 3
echo=${ECHO:-/bin/echo}
chroot=fakechroot
echo something > $testtree/somefile
t=`$srcdir/$chroot.sh $testtree /bin/cat somefile 2>&1`
test "$t" = "something" || not
ok "$chroot cat somefile returns" $t
t=`$srcdir/$chroot.sh $testtree /usr/bin/env /bin/sh -c '/bin/cat somefile' 2>&1`
test "$t" = "something" || not
ok "$chroot cat somefile returns" $t
t=`$srcdir/$chroot.sh $testtree /usr/bin/env FAKECHROOT_ELFLOADER=$echo /bin/sh -c '/bin/cat somefile' 2>&1`
case "$t" in *"/bin/cat somefile");; *) not; esac
ok "$chroot cat somefile with FAKECHROOT_ELFLOADER=$echo returns" $t
cleanup
|