1#!/bin/sh 2 3# Check that getdents/getdents64 syscalls are traced properly. 4 5. "${srcdir=.}/init.sh" 6 7check_prog gawk 8AWKPATH="$srcdir" gawk -f "$srcdir"/getdents.awk "$srcdir"/getdents.out || 9 framework_skip_ 'gawk does not work properly' 10 11check_prog ls 12check_prog mkdir 13check_prog rm 14check_prog seq 15check_prog touch 16 17dir="$LOG.dir" 18rm -rf -- "$dir" 19mkdir -- "$dir" || 20 framework_skip_ 'failed to create a directory' 21 22touch -- "$dir/$(for i in $(seq 1 127); do echo A; done; echo Z)" || 23 framework_skip_ 'failed to create a file' 24 25ls -- "$dir" > /dev/null || 26 framework_skip_ 'failed to list a directory' 27 28run_strace -vegetdents,getdents64 ls -- "$dir" > /dev/null 29match_awk 30 31rm -rf -- "$dir" 32 33exit 0 34