Harden gdb.base/coredump-filter.exp
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / coredump-filter.exp
index 8c94e94932069fc3f3615e1c21996555350684d6..f872de0d1f5a12b0c8b1aa589d2a0f423901ce58 100644 (file)
 
 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.
This page took 0.043053 seconds and 4 git commands to generate.