* tests/stat.test: dd obs= is not portable, use bs= instead. * tests/stat32-v.test: Likewise. * tests/stat64-v.test: Likewise. * tests/net.test: Use $* instead of $@ in the quoted string. * tests/net-fd.test: Likewise. * tests/statfs.test: Quote { and } in regexps. * tests/caps.awk: Likewise. * tests/getdents.awk: Likewise. * tests/net-yy-accept.awk: Likewise. * tests/net-yy-connect.awk: Likewise. * tests/sigaction.awk: Likewise. * tests/unix-yy-accept.awk: Likewise. * tests/unix-yy-connect.awk: Likewise.
35 lines
840 B
Bash
Executable File
35 lines
840 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Check how statfs/statfs64 syscalls are traced.
|
|
|
|
. "${srcdir=.}/init.sh"
|
|
|
|
check_prog grep
|
|
|
|
# this test probes /proc/self/status
|
|
[ -f /proc/self/status ] ||
|
|
framework_skip_ '/proc/self/status is not available'
|
|
|
|
./statfs ||
|
|
fail_ 'statfs failed'
|
|
|
|
args="-efile ./statfs"
|
|
$STRACE $args > $LOG 2>&1 || {
|
|
cat $LOG
|
|
fail_ "$STRACE $args failed"
|
|
}
|
|
|
|
grep_log()
|
|
{
|
|
local syscall="$1"; shift
|
|
|
|
LC_ALL=C grep -E -x "$syscall$*" $LOG > /dev/null || {
|
|
cat $LOG
|
|
fail_ "$STRACE $args failed to trace \"$syscall\" properly"
|
|
}
|
|
}
|
|
|
|
grep_log 'statfs(64)?' '\("/proc/self/status"(, [1-9][0-9]*)?, \{f_type="PROC_SUPER_MAGIC", f_bsize=[1-9][0-9]*, f_blocks=[0-9]+, f_bfree=[0-9]+, f_bavail=[0-9]+, f_files=[0-9]+, f_ffree=[0-9]+, f_fsid=\{[0-9]+, [0-9]+\}, f_namelen=[1-9][0-9]*(, f_frsize=[0-9]+)?(, f_flags=[0-9]+)?\}\) += 0'
|
|
|
|
exit 0
|