diff options
author | Carl Love <cel@us.ibm.com> | 2021-11-29 16:28:42 +0000 |
---|---|---|
committer | Carl Love <cel@us.ibm.com> | 2021-12-13 11:09:42 -0600 |
commit | 408db576c98b232de0b1a1ee3495bad0d1c704cf (patch) | |
tree | 92d3cae3edf66607ef82dacefa8af6e70753a0c2 /gdb/testsuite | |
parent | e6582e1b3c194b01a2461f5c5326fcf358303607 (diff) | |
download | gdb-408db576c98b232de0b1a1ee3495bad0d1c704cf.zip gdb-408db576c98b232de0b1a1ee3495bad0d1c704cf.tar.gz gdb-408db576c98b232de0b1a1ee3495bad0d1c704cf.tar.bz2 |
gdb: Powerpc mark xfail in gdb.base/catch-syscall.exp
Powerpc is not reporting the
Catchpoint 1 (returned from syscall execve), ....
as expected. The issue appears to be with the kernel not returning the
expected result. This patch marks the test failure as an xfail.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28623
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/gdb.base/catch-syscall.exp | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp b/gdb/testsuite/gdb.base/catch-syscall.exp index cdd5e2a..b0d524c 100644 --- a/gdb/testsuite/gdb.base/catch-syscall.exp +++ b/gdb/testsuite/gdb.base/catch-syscall.exp @@ -127,7 +127,28 @@ proc check_return_from_syscall { syscall { pattern "" } } { } set thistest "syscall $syscall has returned" - gdb_test "continue" "Catchpoint $decimal \\(returned from syscall ${pattern}\\).*" $thistest + if { $pattern eq "execve" } { + gdb_test_multiple "continue" $thistest { + -re -wrap "Catchpoint $decimal \\(returned from syscall ${pattern}\\).*" { + pass $thistest + return 1 + } + -re -wrap ".*Breakpoint $decimal, main .*" { + # On Powerpc the kernel does not report the returned from + # syscall as expected by the test. GDB bugzilla 28623. + if { [istarget "powerpc64*-linux*"] } { + xfail $thistest + } else { + fail $thistest + } + return 0 + } + } + + } else { + gdb_test "continue" "Catchpoint $decimal \\(returned from syscall ${pattern}\\).*" $thistest + return 1 + } } # Internal procedure that performs two 'continue' commands and checks if @@ -142,7 +163,7 @@ proc check_continue { syscall { pattern "" } } { # Testing if the inferior has called the syscall. check_call_to_syscall $syscall $pattern # And now, that the syscall has returned. - check_return_from_syscall $syscall $pattern + return [check_return_from_syscall $syscall $pattern] } # Inserts a syscall catchpoint with an argument. @@ -348,11 +369,15 @@ proc test_catch_syscall_execve {} { # Check for entry/return across the execve, making sure that the # syscall_state isn't lost when turning into a new process. insert_catch_syscall_with_arg "execve" - check_continue "execve" + if [check_continue "execve"] { + # The check_continue test generates an XFAIL on Powerpc. In + # that case, gdb is already at main so don't do the continue. + - # Continue to main so extended-remote can read files as needed. - # (Otherwise that "Reading" output confuses gdb_continue_to_end.) - gdb_continue "main" + # Continue to main so extended-remote can read files as needed. + # (Otherwise that "Reading" output confuses gdb_continue_to_end.) + gdb_continue "main" + } # Now can we finish? check_for_program_end |