strace/tests/getdents.test
Dmitry V. Levin 3ec5c0492c tests: cleanup checks for basic programs
* 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.
2014-09-23 01:51:05 +00:00

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