[2/2,gdb/testsuite] Clean up in gdb.multi/checkpoint-multi.exp
Checks
| Context |
Check |
Description |
| linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Test passed
|
| linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Test passed
|
Commit Message
I noticed in gdb.multi/checkpoint-multi.exp that when an inferior is detached,
the process is not cleaned up.
Fix this by re-attaching and killing it.
---
gdb/testsuite/gdb.multi/checkpoint-multi.exp | 6 ++++++
1 file changed, 6 insertions(+)
@@ -148,7 +148,13 @@ proc start_2_inferiors_checkpoint_on_inf_2_alt {} {
with_test_prefix "check detach on non-checkpointed inferior" {
start_2_inferiors_checkpoint_on_inf_2
+ set pid [get_inferior_pid]
gdb_test "detach" "Detaching from program.*$::exec1.*Inferior 1.*detached.*"
+ with_test_prefix cleanup {
+ gdb_test "inferior 1" "Switching to inferior 1 .*"
+ gdb_test "attach $pid" "Attaching to program: .*" "re-attach for kill"
+ gdb_test_kill "kill" 1
+ }
}
with_test_prefix "check kill on non-checkpointed inferior" {