]> granicus.if.org Git - strace/commitdiff
tests/select.test: handle architectures using pselect6 syscall
authorAndreas Schwab <schwab@suse.de>
Thu, 12 Mar 2015 15:47:38 +0000 (16:47 +0100)
committerAndreas Schwab <schwab@suse.de>
Thu, 12 Mar 2015 16:22:07 +0000 (17:22 +0100)
* tests/select.awk (BEGIN): Update regexps to match both select
and pselect6 syscalls.
* tests/select.test: Probe for both select and pselect6 syscall.

tests/select.awk
tests/select.test

index 142504aeeacee9cbfa90c49fdd31d608fe5cbed9..688cefe4c42644fbb812c363906fe9b9d4d79e87 100644 (file)
@@ -1,7 +1,7 @@
 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\\)$"
+       r[1] = "^p?select6?\\(2, \\[0 1\\], \\[0 1\\], \\[0 1\\], NULL(, 0)?\\) += 1 \\(\\)$"
+       r[2] = "^p?select6?\\(-1, NULL, 0x[0-9a-f]+, NULL, NULL(, 0)?\\) += -1 "
+       r[3] = "^p?select6?\\(1025, \\[0\\], \\[\\], NULL, \\{0, 100(000)?\\}(, 0)?\\) += 0 \\(Timeout\\)$"
        r[4] = "^\\+\\+\\+ exited with 0 \\+\\+\\+$"
        lines = 4
        fail = 0
index bd3066ba8af42cf9fe3cad462684b118e9dfcedb..5d5fe54acee73cba8f20a4b41c5c8c587bfba558 100755 (executable)
@@ -6,13 +6,16 @@
 
 check_prog awk
 
-$STRACE -eselect -h > /dev/null ||
+syscall=
+$STRACE -epselect6 -h > /dev/null && syscall=$syscall,pselect6
+$STRACE -eselect -h > /dev/null && syscall=$syscall,select
+test -n "$syscall" ||
        skip_ 'select syscall is not supported on this architecture'
 
 ./select ||
        framework_skip_ 'select syscall does not behave as expected'
 
-args='-eselect ./select'
+args="-e$syscall ./select"
 $STRACE -o "$LOG" $args || {
        cat "$LOG"
        fail_ "$STRACE $args failed"