[PATCH 2/2] [gdb/testsuite] Add KFAIL in gdb.threads/fork-plus-threads.exp
Tom de Vries
tdevries@suse.de
Tue Oct 26 23:37:10 GMT 2021
When running test-case gdb.threads/fork-and-threads.exp on a VM with openSUSE
Tumbleweed, with the VM bound to 1 cpu with 75% execution cap, I get:
...
(gdb) info inferiors^M
Num Description Connection Executable ^M
* 1 <null> fork-plus-threads ^M
11 <null> fork-plus-threads ^M
(gdb) FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: \
only inferior 1 left
...
The test checks that all removable inferiors are indeed removed from the
inferior list after exit, and evidently this didn't happen for inferior 11
(which is added by fork rather than a user command, and therefore removable).
I've investigated why that is that case, and it's because its refcount didn't
drop to 0.
This seems like a bug to me, so add a KFAIL for this.
Tested on x86_64-linux.
---
.../gdb.threads/fork-plus-threads.exp | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/gdb/testsuite/gdb.threads/fork-plus-threads.exp b/gdb/testsuite/gdb.threads/fork-plus-threads.exp
index 3e3b84114b1..7808f9f48ab 100644
--- a/gdb/testsuite/gdb.threads/fork-plus-threads.exp
+++ b/gdb/testsuite/gdb.threads/fork-plus-threads.exp
@@ -118,9 +118,21 @@ proc do_test { detach-on-fork } {
gdb_test "info threads" "No threads\." \
"no threads left"
- gdb_test "info inferiors" \
- "Num\[ \t\]+Description\[ \t\]+Connection\[ \t\]+Executable\[ \t\]+\r\n\\* 1 \[^\r\n\]+" \
- "only inferior 1 left"
+ set re \
+ [multi_line \
+ "Num\[ \t\]+Description\[ \t\]+Connection\[ \t\]+Executable\[ \t\]+" \
+ "\\* 1 \[^\r\n\]+"]
+ gdb_test_multiple "info inferiors" "only inferior 1 left" {
+ -re -wrap $re {
+ pass $gdb_test_name
+ }
+ -re -wrap $re.* {
+ if { ${detach-on-fork} == "off" } {
+ setup_kfail "threads/26272" *-*-*
+ }
+ fail $gdb_test_name
+ }
+ }
}
foreach_with_prefix detach-on-fork {"on" "off"} {
--
2.26.2
More information about the Gdb-patches
mailing list