tests: support alternative names of select syscall
* tests/select.awk: Recognize "_newselect" as another name of "select". * tests/select.test: Try alternative names of select syscall.
This commit is contained in:
parent
f97a4774d2
commit
4a00fc4867
@ -1,7 +1,8 @@
|
||||
BEGIN {
|
||||
r[1] = "^select\\(2, \\[0 1\\], \\[0 1\\], \\[0 1\\], NULL\\) += 1 \\(\\)$"
|
||||
r[2] = "^select\\(-1, NULL, 0x[0-9a-f]+, NULL, NULL\\) += -1 "
|
||||
r[3] = "^select\\(1025, \\[0\\], \\[\\], NULL, \\{0, 100\\}\\) += 0 \\(Timeout\\)$"
|
||||
select = "^(select|_newselect)"
|
||||
r[1] = select "\\(2, \\[0 1\\], \\[0 1\\], \\[0 1\\], NULL\\) += 1 \\(\\)$"
|
||||
r[2] = select "\\(-1, NULL, 0x[0-9a-f]+, NULL, NULL\\) += -1 "
|
||||
r[3] = select "\\(1025, \\[0\\], \\[\\], NULL, \\{0, 100\\}\\) += 0 \\(Timeout\\)$"
|
||||
r[4] = "^\\+\\+\\+ exited with 0 \\+\\+\\+$"
|
||||
lines = 4
|
||||
fail = 0
|
||||
|
@ -9,7 +9,17 @@ check_prog awk
|
||||
./select ||
|
||||
framework_skip_ 'select syscall does not behave as expected'
|
||||
|
||||
args="-eselect ./select"
|
||||
syscall=
|
||||
for n in select _newselect; do
|
||||
if $STRACE -e$n -h > /dev/null; then
|
||||
syscall=$n
|
||||
break
|
||||
fi
|
||||
done
|
||||
[ -n "$syscall" ] ||
|
||||
fail_ "$STRACE does not support select syscall?"
|
||||
|
||||
args="-e$syscall ./select"
|
||||
$STRACE -o "$LOG" $args || {
|
||||
cat "$LOG"
|
||||
fail_ "$STRACE $args failed"
|
||||
|
Loading…
Reference in New Issue
Block a user