diff options
author | Andrew Burgess <aburgess@redhat.com> | 2024-06-09 20:28:36 +0100 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2024-07-24 14:36:11 +0100 |
commit | b0056f89497ce28e88b275250099d4fab0999c0a (patch) | |
tree | 72f6c1f36c5cf4896c6f1b3f4a87b047fb2b4f09 /gdb/eval.c | |
parent | 28792287e8109b7b40bd28d43950439f12f251a7 (diff) | |
download | binutils-b0056f89497ce28e88b275250099d4fab0999c0a.zip binutils-b0056f89497ce28e88b275250099d4fab0999c0a.tar.gz binutils-b0056f89497ce28e88b275250099d4fab0999c0a.tar.bz2 |
gdb/testsuite: ensure gdb_get_worker_threads succeeds
Sometimes, if I'm testing on a loaded machine, the
gdb.gdb/index-file.exp test will timeout during some early steps,
which then cases a TCL error to be thrown later in the test script.
Dejagnu then reports this error once the test run has completed, which
can be pretty noisy, and isn't really very helpful.
The underlying problem is that if GDB takes too long to load the
executable (which is GDB itself in this test) then GDB will still be
busy loading the executable when dejagnu moves on and call
gdb_get_worker_threads. The gdb_get_worker_threads call itself times
out as GDB is _still_ busy loading the executable, and so
gdb_get_worker_threads returns the string "UNKNOWN".
Later we try to perform arithmetic on the worker thread count, which
results in errors when we try to do 'UNKNOWN / 2'.
I propose that after calling gdb_get_worker_threads, we check if the
result was UNKNOWN. If it was then we should report an UNRESOLVED and
abandon the test, this avoids the later TCL errors.
Diffstat (limited to 'gdb/eval.c')
0 files changed, 0 insertions, 0 deletions