[gdb/testsuite] Add gdb-caching-proc.exp testcase
When caching a proc using gdb_caching_proc, it will become less likely to
be executed, and consequently it's going to be harder to detect that the
proc is racy. OTOH, in general the proc is easy to rerun. So, add a
test-case to run all uncached gdb_caching_procs a number of times and detect
inconsistent results.
The purpose of caching is to reduce runtime, so rerunning is somewhat
counter-productive in that aspect, but it's better than uncached, because the
number of reruns is constant-bounded, and the increase in runtime is bound to
this test-case, and can be disabled on slow targets.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2018-12-01 Tom de Vries <tdevries@suse.de>
* gdb.base/gdb-caching-proc.exp: New file.