Re: [PATCH v3 2/2] Add dprintf and detach test (PR breakpoints/17012)

Simon Marchi
2014-09-04T18:37:18Z

On 14-09-04 12:45 PM, Pedro Alves wrote:
> On 08/22/2014 08:05 PM, Simon Marchi wrote:
>
>
>> Until the remote case is sorted out, would it be ok to disable the
>> test for all remote targets or KFAIL the tests? I will tackle the
>> blocking problems in separate patches.
>
> Sure.

I am not sure how to do this though. Is this ok?

# Disable this test when using gdb for now (the inferior crashes when
# detaching due to PR 17302).
set test "re-attach to inferior"
if ![gdb_is_target_remote] {
# Give some time for the ex-inferior to run and hopefully not crash.
sleep 1

gdb_test "attach $inferior_pid" "Attaching to program: $escapedbinfile, process $inferior_pid.*Reading symbols from.*" "$test"
} else {
kfail "breakpoints/17302" "$test"
}

I know that "remote" does not necessarily means gdbserver, but I don't
know how to check for gdbserver specifically. I put the sleep in the condition
so we don't waste time for nothing if we are not going to run the test anyway.

> This is OK otherwise.
>
> Though please push the test and fix as a single commit.
>
> Thanks,
> Pedro Alves
>