Message ID | 5527CBEC.6030002@codesourcery.com |
---|---|
State | New |
Headers | show |
>> >> We can just bail out if infpid is still "" after this gdb_test_multiple. >> > > That still gives me one FAIL due to not matching what was expected. Did > you mean a check inside this gdb_test_multiple? > No, you are right. I thought something different. > > 2015-04-10 Luis Machado<lgustavo@codesourcery.com> > > gdb/testsuite/ > * gdb.base/coredump-filter.exp: Restrict test to Linux systems only. > Handle the case of targets that do not provide PID information. It is OK to me.
On 04/10/2015 12:16 PM, Yao Qi wrote: >>> >>> We can just bail out if infpid is still "" after this gdb_test_multiple. >>> >> >> That still gives me one FAIL due to not matching what was expected. Did >> you mean a check inside this gdb_test_multiple? >> > > No, you are right. I thought something different. > >> >> 2015-04-10 Luis Machado<lgustavo@codesourcery.com> >> >> gdb/testsuite/ >> * gdb.base/coredump-filter.exp: Restrict test to Linux systems only. >> Handle the case of targets that do not provide PID information. > > It is OK to me. > Thanks. I've pushed this now.
2015-04-10 Luis Machado <lgustavo@codesourcery.com> gdb/testsuite/ * gdb.base/coredump-filter.exp: Restrict test to Linux systems only. Handle the case of targets that do not provide PID information. --- gdb/testsuite/gdb.base/coredump-filter.exp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gdb/testsuite/gdb.base/coredump-filter.exp b/gdb/testsuite/gdb.base/coredump-filter.exp index f3203be..8350981 100644 --- a/gdb/testsuite/gdb.base/coredump-filter.exp +++ b/gdb/testsuite/gdb.base/coredump-filter.exp @@ -15,6 +15,12 @@ standard_testfile +# This test is Linux-only. +if ![istarget *-*-linux*] then { + untested "coredump-filter.exp" + return -1 +} + if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] } { untested "could not compile test program" return -1 @@ -146,6 +152,12 @@ gdb_test_multiple "info inferiors" "getting inferior pid" { -re "process \($decimal\).*\r\n$gdb_prompt $" { set infpid $expect_out(1,string) } + -re "Remote target.*$gdb_prompt $" { + # If the target does not provide PID information (like usermode QEMU), + # just bail out as the rest of the test may rely on it, giving spurious + # failures. + return -1 + } } # Get the main function's address. -- 1.9.1