[gdb/testsuite] Test sw watchpoint in gdb.threads/process-dies-while-detaching.exp
authorTom de Vries <tdevries@suse.de>
Mon, 27 Sep 2021 08:16:57 +0000 (10:16 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 27 Sep 2021 08:16:57 +0000 (10:16 +0200)
commit203a9824347042e0f7580994cbe7a1eb8dc1e893
tree9fed62c560c22c95865c6befcb7be2d8380c28cc
parentc11f01dbbdfb8e9f437b13e31ba89c50a6fb8db6
[gdb/testsuite] Test sw watchpoint in gdb.threads/process-dies-while-detaching.exp

The test-case gdb.threads/process-dies-while-detaching.exp takes about 20s
when using hw watchpoints, but when forcing sw watchpoints (using the patch
mentioned in PR28375#c0), the test-case takes instead 3m14s.

Also, it show a FAIL:
...
(gdb) continue^M
Continuing.^M
Cannot find user-level thread for LWP 10324: generic error^M
(gdb) FAIL: gdb.threads/process-dies-while-detaching.exp: single-process:
continue: watchpoint: continue
...
for which PR28375 was filed.

Modify the test-case to:
- add the hw/sw axis to the watchpoint testing, to ensure that we
  observe the sw watchpoint behaviour also on can-use-hw-watchpoints
  architectures.
- skip the hw breakpoint testing if not supported
- set the sw watchpoint later to avoid making the test
  too slow.  This still triggers the same PR, but now takes just 24s.

This patch adds a KFAIL for PR28375.

Tested on x86_64-linux.
gdb/testsuite/gdb.threads/process-dies-while-detaching.exp