public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: [testsuite] Fix runaway gdb.base/attach processes.
Date: Sat, 27 Jun 2026 23:56:49 GMT	[thread overview]
Message-ID: <178260460904.1.15231851625960766856.rpms-gdb-3887bdb15a47@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/gdb
Branch : gdb-17.2-rebase-f44
Commit : 3887bdb15a479be46fd49b732c42b7130333871f
Author : Jan Kratochvil <jan.kratochvil@redhat.com>
Date   : 2014-09-14T19:22:44+02:00
Stats  : +95/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/gdb/c/3887bdb15a479be46fd49b732c42b7130333871f?branch=gdb-17.2-rebase-f44

Log:
[testsuite] Fix runaway gdb.base/attach processes.

---
diff --git a/gdb-async-stopped-on-pid-arg-testsuite.patch b/gdb-async-stopped-on-pid-arg-testsuite.patch
new file mode 100644
index 0000000..f50ead1
--- /dev/null
+++ b/gdb-async-stopped-on-pid-arg-testsuite.patch
@@ -0,0 +1,89 @@
+http://sourceware.org/ml/gdb-patches/2014-09/msg00381.html
+Subject: [testsuite patch] runaway attach processes  [Re: Regression: GDB stopped on run with attached process (PR 17347)]
+
+
+--RnlQjJ0d97Da+TV1
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+
+On Thu, 11 Sep 2014 14:35:53 +0200, Pedro Alves wrote:
+> Thanks, pushed to both master and 7.8.
+
+I have started seeing occasional runaway 'attach' processes these days.
+I cannot be certain it is really caused by this patch, for example
+grep 'FAIL.*cmdline attach run' does not show anything in my logs.
+
+But as I remember this 'attach' runaway process always happened in GDB (but
+I do not remember it in the past months) I think it would be most safe to just
+solve it forever by [attached].
+
+
+Jan
+
+--RnlQjJ0d97Da+TV1
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline; filename=1
+
+gdb/testsuite/
+2014-09-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.base/attach.c: Include unistd.h.
+	(main): Call alarm.  Add label postloop.
+	* gdb.base/attach.exp (do_attach_tests): Use gdb_get_line_number,
+	gdb_breakpoint, gdb_continue_to_breakpoint.
+	(test_command_line_attach_run): Kill ${testpid} in one exit path.
+
+diff --git a/gdb/testsuite/gdb.base/attach.c b/gdb/testsuite/gdb.base/attach.c
+index 0041b47..91b180c 100644
+--- a/gdb/testsuite/gdb.base/attach.c
++++ b/gdb/testsuite/gdb.base/attach.c
+@@ -5,6 +5,7 @@
+    exit unless/until gdb sets the variable to non-zero.)
+    */
+ #include <stdio.h>
++#include <unistd.h>
+ 
+ int  should_exit = 0;
+ 
+@@ -12,9 +13,11 @@ int main ()
+ {
+   int  local_i = 0;
+ 
++  alarm (60);
++
+   while (! should_exit)
+     {
+       local_i++;
+     }
+-  return 0;
++  return 0; /* postloop */
+ }
+diff --git a/gdb/testsuite/gdb.base/attach.exp b/gdb/testsuite/gdb.base/attach.exp
+index 6340496..5fb5c53 100644
+--- a/gdb/testsuite/gdb.base/attach.exp
++++ b/gdb/testsuite/gdb.base/attach.exp
+@@ -256,11 +256,8 @@ proc do_attach_tests {} {
+ 
+     # Verify that the modification really happened.
+ 
+-    gdb_test "tbreak 19" "Temporary breakpoint .*at.*$srcfile, line 19.*" \
+-	"after attach2, set tbreak postloop"
+-
+-    gdb_test "continue" "main.*at.*$srcfile:19.*" \
+-	"after attach2, reach tbreak postloop"
++    gdb_breakpoint [gdb_get_line_number "postloop"] temporary
++    gdb_continue_to_breakpoint "postloop" ".* postloop .*"
+ 
+     # Allow the test process to exit, to cleanup after ourselves.
+ 
+@@ -451,6 +448,7 @@ proc test_command_line_attach_run {} {
+ 		 "-iex set\\ height\\ 0 -iex set\\ width\\ 0 --pid=$testpid -ex \"start\""]
+ 	if { $res != 0} {
+ 	    fail $test
++	    remote_exec build "kill -9 ${testpid}"
+ 	    return $res
+ 	}
+ 	gdb_test_multiple "" $test {
+
+--RnlQjJ0d97Da+TV1--
+

diff --git a/gdb.spec b/gdb.spec
index 850398d..94bacf7 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -26,7 +26,7 @@ Version: 7.8
 
 # The release always contains a leading reserved number, start it at 1.
 # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
-Release: 21%{?dist}
+Release: 22%{?dist}
 
 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL
 Group: Development/Debuggers
@@ -538,6 +538,7 @@ Patch929: python-framefilter-invalidarg.patch
 # Fix GDB SIGTT* Stopped when using the PID argument (BZ 1136704, Pedro Alves).
 Patch930: gdb-async-stopped-on-pid-arg-1of2.patch
 Patch931: gdb-async-stopped-on-pid-arg-2of2.patch
+Patch970: gdb-async-stopped-on-pid-arg-testsuite.patch
 
 %if 0%{!?rhel:1} || 0%{?rhel} > 6
 # RL_STATE_FEDORA_GDB would not be found for:
@@ -828,6 +829,7 @@ find -name "*.info*"|xargs rm -f
 %patch929 -p1
 %patch930 -p1
 %patch931 -p1
+%patch970 -p1
 
 %patch848 -p1
 %if 0%{!?el6:1}
@@ -1323,6 +1325,9 @@ then
 fi
 
 %changelog
+* Sun Sep 14 2014 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.8-22.fc21
+- [testsuite] Fix runaway gdb.base/attach processes.
+
 * Sun Sep  7 2014 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.8-21.fc21
 - Fix GDB SIGTT* Stopped when using the PID argument (BZ 1136704, Pedro Alves).
 

                 reply	other threads:[~2026-06-27 23:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178260460904.1.15231851625960766856.rpms-gdb-3887bdb15a47@fedoraproject.org \
    --to=jan.kratochvil@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox