Clear board_info entry in kill_wait_spawned_process
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Testing passed
|
Commit Message
When certain DAP tests are run in a certain order, dejagnu will throw
an exception during shutdown. After adding many logging statements, I
tracked this down to kill_wait_spawned_process not clearing the
'fileid' board_info entry, causing dejagnu to try to wait for the
process a second time -- and fail.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31435
---
gdb/testsuite/lib/gdb.exp | 5 +++++
1 file changed, 5 insertions(+)
@@ -6194,6 +6194,11 @@ proc kill_wait_spawned_process { proc_spawn_id } {
# wait for the PID in the background. That's fine because we
# don't care about the exit status. */
wait -nowait -i $proc_spawn_id
+
+ # Don't let dejagnu try to clean this up, either.
+ global board_info
+ set name [board_info target name]
+ unset -nocomplain board_info($name,fileid)
}
# Returns the process id corresponding to the given spawn id.