This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug testsuite/23269] fork-running-state hangs make check


https://sourceware.org/bugzilla/show_bug.cgi?id=23269

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
When running just fork-running-state.exp, make doesn't hang but the sleeping
processes are still visible.

Using this patch, I get just one hanging process:
...
diff --git a/gdb/testsuite/gdb.base/fork-running-state.exp
b/gdb/testsuite/gdb.base/fork-running-state.exp
index 27ed8a43e9..4ee1e116be 100644
--- a/gdb/testsuite/gdb.base/fork-running-state.exp
+++ b/gdb/testsuite/gdb.base/fork-running-state.exp
@@ -149,15 +149,9 @@ proc do_test { detach_on_fork follow_fork non_stop
schedule_multiple } {
 #  set non-stop on|off
 #  set schedule-multiple on|off

-foreach_with_prefix detach-on-fork {"off" "on"} {
-    foreach_with_prefix follow-fork {"parent" "child"} {
-       with_test_prefix "non-stop" {
-           do_test ${detach-on-fork} ${follow-fork} "on" "-"
-       }
-       with_test_prefix "all-stop" {
-           foreach_with_prefix schedule-multiple {"on" "off"} {
-               do_test ${detach-on-fork} ${follow-fork} "off"
${schedule-multiple}
-           }
-       }
-    }
-}
+set detach-on-fork "on"
+set follow-fork "parent"
+set non-stop "on"
+set schedule-multiple "-"
+
+do_test ${detach-on-fork} ${follow-fork} ${non-stop} ${schedule-multiple}
...

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
Created attachment 11064
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11064&action=edit
gdb.log

So, filtering out the PASS statements (and moving an -ex cmd to the prompt), we
have this debug session:
...
(gdb) set non-stop on
(gdb) break main
Breakpoint 1 at 0x400665: file
/home/vries/gdb_versions/devel/src/gdb/testsuite/gdb.base/fork-running-state.c,
line 52.
(gdb) run 
Starting program:
/home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.base/fork-running-state/fork-running-state 

Breakpoint 1, main () at
/home/vries/gdb_versions/devel/src/gdb/testsuite/gdb.base/fork-running-state.c:52
52        save_parent = getpid ();
(gdb) set detach-on-fork on
(gdb) set follow-fork parent
(gdb) continue &
Continuing.
[Detaching after fork from child process 18797]
(gdb) info threads
  Id   Target Id         Frame 
* 1    process 18793 "fork-running-st" (running)
(gdb) set print inferior-events off
(gdb) kill inferior 1
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]