[ was: Re: [PATCH][gdb/testsuite] Ignore pass/fail/unsupported in gdb-caching-proc.exp ] On 18-02-2020 00:58, Simon Marchi wrote: >> >> if { ! [runto "GNAT_Debug_Info_Test"] } { >> - fail "failed to run to GNAT_Debug_Info_Test" >> return 0 >> } >> >> @@ -183,7 +190,6 @@ gdb_caching_proc gnat_runtime_has_debug_info { >> } >> default { >> # Some other unexpected output... >> - fail $gdb_test_name >> } >> } >> > > I'd be tempted to keep these last two "fail"s. They should not show up normally, > regardless of whether gnatmake is installed. But let's say: > > - the Ada runtime ever changes (__gnat_debug_raise_exception is renamed), or > - the output of the command "whatis __gnat_debug_raise_exception" changes > > then they'll show up, which is desirable because it means we need to come > and change something here. If the output of > "whatis __gnat_debug_raise_exception" changes in a way that it is not > recognized anymore and there is no FAIL, then gnat_runtime_has_debug_info > will just start returning false all the time and we might not notice it for a > while. Ack, committed as attached, keeping the last two fails. FWIW, I scanned a bit other gdb_caching_procs and there seems to be an idiom to handle hitting the default case of an expect using a warning, f.i. in skip_aarch64_sve_tests: ... default { warning "\n$me: default case taken" set skip_sve_tests 1 } ... So we could use that at least for the last fail. Also, here and there verbose seems to be used instead of fail. The gdb_caching_procs seem to avoid explicitly calling pass and fail, but usage of gdb_test_multiple does happen a couple of time, which might result in fails etc (but then again, that might not have been intentional, I'm not sure). In any case, we could either: - forbid calling pass in gdb_caching_proc, or - more accommodatingly, ignore pass in gdb_caching_proc. Both by renaming pass in gdb_do_cache. Likewise, we could perhaps redirect fails to warnings. Thanks, - Tom