Hi Tom, >>>>>> "Rainer" == Rainer Orth writes: > > Rainer> Right: some of them already do their own checks for async support: > > Rainer> gdb.base/async.exp > Rainer> gdb.base/bg-exec-sigint-bp-cond.exp > Rainer> gdb.base/interrupt-noterm.exp > > Rainer> but in those cases, async commands are a crucial part of the tests and I > Rainer> couldn't easily use the new supports_target_async there. > > I think it would be fine to stick > > require supports_target_async > > At the top of each of these files, and simplify some of the tests to > just assumes async execution will work. in some cases, this seems to be the right way forward. However, I've a hard time telling which ones should have this treatment. Others clearly run tests both in sync and async modes (like gdb.base/infcall-timeout.exp, gdb.threads/infcall-from-bp-cond-timeout.exp). At least in those cases, we can just skip the async subtests. > However that can also be comfortably done in a separate patch as well. I'd rather do it this way, initially concentrating on the cases where skipping target_async tests can avoid large numbers of timeouts. > Rainer> +# Return 1 if target supports asynchronous execution, otherwise return 0. > Rainer> +gdb_caching_proc supports_target_async {} { > Rainer> + global srcdir subdir gdb_prompt > Rainer> + > Rainer> + set me "supports_target_async" > Rainer> + > Rainer> + set src { int main() { return 0; } } > Rainer> + if {![gdb_simple_compile $me $src executable ""]} { > Rainer> + return 0 > Rainer> + } > Rainer> + > Rainer> + gdb_exit > Rainer> + gdb_start > Rainer> + gdb_reinitialize_dir $srcdir/$subdir > > I think these three lines can be replaced with "clean_restart". Nice. So far, I've simply followed existing current practice, although I've wondered how many tests seem extremely repetetive and consequentially hard to read. > Rainer> + if { ![runto_main] } { > Rainer> + return 0 > > This branch doesn't gdb_exit but falling through does. > Likewise this return doesn't delete the file. > > So maybe reworking this to fall through to the cleanup & final return > would be better. Done in the attached revision. Thanks. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University