File: execve-elfloader.t

package info (click to toggle)
fakechroot 2.20.1%2Bds-18
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,904 kB
  • sloc: ansic: 7,688; sh: 1,917; makefile: 375; perl: 191; java: 5
file content (26 lines) | stat: -rwxr-xr-x 661 bytes parent folder | download | duplicates (7)
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