blob: 3fa1c8db50d7ec11377817b7d61890f2e6289f19 [file] [log] [blame]
# Check that getdents/getdents64 syscalls are traced properly.
. "${srcdir=.}/"
check_prog gawk
AWKPATH="$srcdir" gawk -f "$srcdir"/getdents.awk "$srcdir"/getdents.out ||
framework_skip_ 'gawk does not work properly'
check_prog ls
check_prog mkdir
check_prog rm
check_prog seq
check_prog touch
rm -rf -- "$dir"
mkdir -- "$dir" ||
framework_skip_ 'failed to create a directory'
touch -- "$dir/$(for i in $(seq 1 127); do echo A; done; echo Z)" ||
framework_skip_ 'failed to create a file'
ls -- "$dir" > /dev/null ||
framework_skip_ 'failed to list a directory'
run_strace -vegetdents,getdents64 ls -- "$dir" > /dev/null
rm -rf -- "$dir"
exit 0