* 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.
26 lines
632 B
Awk
26 lines
632 B
Awk
BEGIN {
|
|
fail = 0
|
|
lines = 3
|
|
cap = "(0|CAP_[A-Z_]+(\\|CAP_[A-Z_]+)*)"
|
|
capget = "^capget\\(\\{_LINUX_CAPABILITY_VERSION_3, 0\\}, \\{" cap ", " cap ", " cap "\\}\\) = 0$"
|
|
}
|
|
|
|
NR == 1 {if (match($0, capget)) next}
|
|
|
|
NR == 2 && $0 == "capset({_LINUX_CAPABILITY_VERSION_3, 0}, {CAP_DAC_OVERRIDE|CAP_WAKE_ALARM, CAP_DAC_READ_SEARCH|CAP_BLOCK_SUSPEND, 0}) = -1 EPERM (Operation not permitted)" {next}
|
|
|
|
NR == lines && $0 == "+++ exited with 0 +++" {next}
|
|
|
|
{
|
|
print "Line " NR " does not match."
|
|
fail = 1
|
|
exit 1
|
|
}
|
|
|
|
END {
|
|
if (fail == 0 && NR != lines) {
|
|
print "Expected " lines " lines, found " NR " line(s)."
|
|
exit 1
|
|
}
|
|
}
|