Dmitry V. Levin
3ec5c0492c
* tests/init.sh: Check for cat and rm. * tests/getdents.test: Check for awk. * tests/ptrace_setoptions.test: Check for grep. * tests/net-fd.test: Do not check for rm. * tests/net.test: Likewise. * tests/scm_rights-fd.test: Likewise. * tests/stat.test: Likewise. * tests/uio.test: Likewise.
30 lines
619 B
Bash
Executable File
30 lines
619 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Check that getdents/getdents64 syscalls are traced properly.
|
|
|
|
. "${srcdir=.}/init.sh"
|
|
|
|
check_prog awk
|
|
check_prog grep
|
|
check_prog ls
|
|
check_prog mkdir
|
|
check_prog rmdir
|
|
|
|
mkdir emptydir ||
|
|
framework_skip_ 'failed to create an empty directory'
|
|
|
|
ls emptydir ||
|
|
{ rmdir emptydir; framework_skip_ 'failed to list an empty directory'; }
|
|
|
|
args='-vegetdents,getdents64'
|
|
$STRACE $args -o $LOG ls emptydir
|
|
rc=$?
|
|
rmdir emptydir
|
|
[ $rc -eq 0 ] ||
|
|
{ cat $LOG; fail_ "strace $args failed"; }
|
|
|
|
awk -f "$srcdir"/getdents.awk $LOG ||
|
|
{ cat $LOG; fail_ "strace $args failed to trace getdents/getdents64 properly"; }
|
|
|
|
exit 0
|