3 # Check how pread/pwrite and preadv/pwritev syscalls are traced.
5 . "${srcdir=.}/init.sh"
11 if [ $? -eq 77 ]; then
12 framework_skip_ 'preadv/pwritev syscalls are not available'
19 $STRACE $args > $LOG 2>&1 || {
21 fail_ "$STRACE $args failed"
26 local syscall="$1"; shift
28 LC_ALL=C grep -E -x "$syscall$*" $LOG > /dev/null || {
30 fail_ "$STRACE $args failed to trace \"$syscall\" properly"
34 grep_log 'pread(64)?' '\(3, "\\0\\0\\0\\0", 4, 1004211379570065135\) += 4'
35 grep_log 'preadv' '\(3, \[{"\\0\\0\\0\\0", 4}\], 1, 1004211379570065135\) += 4'
36 grep_log 'pwrite(64)?' '\(3, "\\0\\0\\0\\0", 4, 1004211379570065135\) += 4'
37 grep_log 'pwritev' '\(3, \[{"\\0\\0\\0\\0", 4}\], 1, 1004211379570065135\) += 4'