diff --git a/tests/select.awk b/tests/select.awk index 142504ae..7c97c402 100644 --- a/tests/select.awk +++ b/tests/select.awk @@ -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 diff --git a/tests/select.test b/tests/select.test index 339a8e45..52f8b048 100755 --- a/tests/select.test +++ b/tests/select.test @@ -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"