gdb: Only run scheduler-locking tests if feature is supported
authorAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 3 Jul 2018 15:44:08 +0000 (16:44 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 6 Aug 2018 07:52:08 +0000 (08:52 +0100)
commit5bd18990b01406ff41dc44d92db1c34018b61923
tree8cd440992f3e2b0eeea55e02ec0cea9ee5e0ad25
parent953473375500a809fbb3eca3efa4dbb670c3a32f
gdb: Only run scheduler-locking tests if feature is supported

Not all targets support scheduler-locking.  Add a check to see if the
taraget supports scheduler locking, and if it doesn't, don't run the
scheduler-locking tests that will otherwise fail.

There are actually a set of tests that try to use scheduler-locking
however, in most of these cases the test will not be run on smaller
targets (those that might not support threads and scheduler-locking)
due to the targets lack of support for threads, or some other larger
feature.

In the gdb.mi/mi-cmd-param-changed.exp test though, there's no
dependence on threads, or any other larger feature, and so, for the
small target I was using the test would otherwise try to run, only to
fail due to lack of support for scheduler-locking.

gdb/testsuite/ChangeLog:

* lib/gdb.exp (target_supports_scheduler_locking): New proc.
* gdb.mi/mi-cmd-param-changed.exp: Only run scheduler locking
tests if the target supports scheduler locking.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.mi/mi-cmd-param-changed.exp
gdb/testsuite/lib/gdb.exp