[ was: Re: [PATCH 3/3][gdb/testsuite] Warn about leaked global array ] On 04-06-2020 13:40, Tom de Vries wrote: > On 03-06-2020 11:49, Pedro Alves wrote: >> BTW, global variables alone aren't the full scope of the >> bleeding between testcases. There's also the case of >> testcases overriding procedures, like gdb.base/dbx.exp, >> but those are perhaps rare enough that we can continue >> handling it "manually" as before. > > AFAICT, that test-case does an effort to undo the override, though I'm > not sure how certain it is that the undo will be executed. > > Also, while working on the latest proposed patch, I also ran into > trouble related to the renaming of spawn in lib/tuiterm.exp. I wonder if > to address this we could wrap every tui test-case in > ... > tui_env { > ... > } > ... > and letting the tui_env proc deal with renaming and restoring the spawn. > We could even automate this in gdb_init/gdb_finish by calling > gdb_init_$subdir/gdb_finish_$subdir and handling it there. > That approach turned out to be not precise enough because also gdb.python/tui-window.exp imports tuiterm.exp. This fix uses a load_lib override. Any comments? Thanks - Tom