]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/testsuite: Use _inferior_thread_count in gdb.threads/threadcrash.exp
authorGuinevere Larsen <blarsen@redhat.com>
Mon, 11 Mar 2024 09:57:31 +0000 (10:57 +0100)
committerTom de Vries <tdevries@suse.de>
Mon, 11 Mar 2024 09:57:31 +0000 (10:57 +0100)
commitb95b92ec093cea8014e33fdca2f800c4e5ce91be
treeacf77077d21396da0beff42a11fdf5505ce4cb01
parent72ab7ac8be993e29f8a393b72dc681d627b12d19
gdb/testsuite: Use _inferior_thread_count in gdb.threads/threadcrash.exp

A linaro PR [1] reports that the gdb.threads/threadcrash.exp test-case fails
to cout the number of threads in the inferior:
...
FAIL: gdb.threads/threadcrash.exp: test_gcore: $thread_count == 7
FAIL: gdb.threads/threadcrash.exp: test_gcore: $thread_count == [llength $test_list]
...

Fix this by getting the convenience variable _inferior_thread_count as opposed
to calculating it based on the output of "info threads".

Tested on arm-linux and x86_64-linux.

Reviewed-By: Lancelot Six <lancelot.six@amd.com>
Approved-By: Tom de Vries <tdevries@suse.de>
[1] https://linaro.atlassian.net/browse/GNU-1120
gdb/testsuite/gdb.threads/threadcrash.exp