public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: remove gdb-6.3-mapping-zero-inode-test.patch
Date: Sun, 28 Jun 2026 00:02:14 GMT [thread overview]
Message-ID: <178260493459.1.14280452364157292575.rpms-gdb-9c718a5e5027@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/gdb
Branch : gdb-17.2-rebase-f44
Commit : 9c718a5e5027b6c23505ee1c43220c75393bf54f
Author : Andrew Burgess <aburgess@redhat.com>
Date : 2025-06-03T15:01:17+01:00
Stats : +8/-257 in 5 file(s)
URL : https://src.fedoraproject.org/rpms/gdb/c/9c718a5e5027b6c23505ee1c43220c75393bf54f?branch=gdb-17.2-rebase-f44
Log:
remove gdb-6.3-mapping-zero-inode-test.patch
Upstream commit:
commit fcfd8a4f2392d3882c07c4e127bfcfb53ca78728
Date: Wed May 7 12:58:41 2025 +0100
gdb: support zero inode in generate-core-file command
includes a test that covers the same functionality as the test in
patch gdb-6.3-mapping-zero-inode-test.patch, so there's no point
carrying the local test any more. We'll pick up the upstream test the
next time Fedora rebases.
---
diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include
index 5adebfe..185d217 100644
--- a/_gdb.spec.Patch.include
+++ b/_gdb.spec.Patch.include
@@ -1,13 +1,9 @@
# Check distro name is included in the version output.
Patch001: gdb-6.3-rh-testversion-20041202.patch
-# Test GCORE for shmid 0 shared memory mappings.
-#=fedoratest: But it is broken anyway, sometimes the case being tested is not reproducible.
-Patch002: gdb-6.3-mapping-zero-inode-test.patch
-
# Fix follow-exec for C++ programs (bugreported by Martin Stransky).
#=fedoratest
-Patch003: gdb-archer-next-over-throw-cxx-exec.patch
+Patch002: gdb-archer-next-over-throw-cxx-exec.patch
# Update gdb-add-index.sh such that, when the GDB environment
# variable is not set, the script is smarter than just looking for
@@ -21,12 +17,12 @@ Patch003: gdb-archer-next-over-throw-cxx-exec.patch
# https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot
#
#=fedora
-Patch004: gdb-add-index.patch
+Patch003: gdb-add-index.patch
# Not a backport. Add a new script which hooks into GDB and suggests
# RPMs to install when GDB finds an objfile with no debug info.
-Patch005: gdb-add-rpm-suggestion-script.patch
+Patch004: gdb-add-rpm-suggestion-script.patch
# Backport "Fix another timeout in gdb.base/bg-execution-repeat.exp"
-Patch006: gdb-fix-bg-execution-repeat.patch
+Patch005: gdb-fix-bg-execution-repeat.patch
diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include
index 5885b36..56d9d0c 100644
--- a/_gdb.spec.patch.include
+++ b/_gdb.spec.patch.include
@@ -3,4 +3,3 @@
%patch -p1 -P003
%patch -p1 -P004
%patch -p1 -P005
-%patch -p1 -P006
diff --git a/_patch_order b/_patch_order
index de49aec..b9ef845 100644
--- a/_patch_order
+++ b/_patch_order
@@ -1,5 +1,4 @@
gdb-6.3-rh-testversion-20041202.patch
-gdb-6.3-mapping-zero-inode-test.patch
gdb-archer-next-over-throw-cxx-exec.patch
gdb-add-index.patch
gdb-add-rpm-suggestion-script.patch
diff --git a/gdb-6.3-mapping-zero-inode-test.patch b/gdb-6.3-mapping-zero-inode-test.patch
deleted file mode 100644
index 32b62d5..0000000
--- a/gdb-6.3-mapping-zero-inode-test.patch
+++ /dev/null
@@ -1,247 +0,0 @@
-From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
-From: Fedora GDB patches <invalid@email.com>
-Date: Fri, 27 Oct 2017 21:07:50 +0200
-Subject: gdb-6.3-mapping-zero-inode-test.patch
-
-;; Test GCORE for shmid 0 shared memory mappings.
-;;=fedoratest: But it is broken anyway, sometimes the case being tested is not reproducible.
-
-diff --git a/gdb/testsuite/gdb.base/gcore-shmid0.c b/gdb/testsuite/gdb.base/gcore-shmid0.c
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.base/gcore-shmid0.c
-@@ -0,0 +1,128 @@
-+/* Copyright 2007, 2009 Free Software Foundation, Inc.
-+
-+ This file is part of GDB.
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or (at
-+ your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330,
-+ Boston, MA 02111-1307, USA. */
-+
-+/*
-+ * Test GDB's handling of gcore for mapping with a name but zero inode.
-+ */
-+
-+#include <sys/ipc.h>
-+#include <sys/shm.h>
-+#include <stdio.h>
-+#include <errno.h>
-+#include <stdlib.h>
-+#include <unistd.h>
-+#include <assert.h>
-+#include <time.h>
-+
-+/* The same test running in a parallel testsuite may steal us the zero SID,
-+ even if we never get any EEXIST. Just try a while. */
-+
-+#define TIMEOUT_SEC 10
-+
-+static volatile int v;
-+
-+static void
-+initialized (void)
-+{
-+ v++;
-+}
-+
-+static void
-+unresolved (void)
-+{
-+ v++;
-+}
-+
-+int
-+main (void)
-+{
-+ int sid;
-+ unsigned int *addr = (void *) -1L;
-+ int attempt, round = 0;
-+ time_t ts_start, ts;
-+
-+ if (time (&ts_start) == (time_t) -1)
-+ {
-+ printf ("time (): %m\n");
-+ exit (1);
-+ }
-+
-+ /* The generated SID will cycle with an increment of 32768, attempt until it
-+ * wraps to 0. */
-+
-+ for (attempt = 0; addr == (void *) -1L; attempt++)
-+ {
-+ /* kernel-2.6.25-8.fc9.x86_64 just never returns the value 0 by
-+ shmget(2). shmget returns SID range 0..1<<31 in steps of 32768,
-+ 0x1000 should be enough but wrap the range it to be sure. */
-+
-+ if (attempt > 0x21000)
-+ {
-+ if (time (&ts) == (time_t) -1)
-+ {
-+ printf ("time (): %m\n");
-+ exit (1);
-+ }
-+
-+ if (ts >= ts_start && ts < ts_start + TIMEOUT_SEC)
-+ {
-+ attempt = 0;
-+ round++;
-+ continue;
-+ }
-+
-+ printf ("Problem is not reproducible on this kernel (attempt %d, "
-+ "round %d)\n", attempt, round);
-+ unresolved ();
-+ exit (1);
-+ }
-+
-+ sid = shmget ((key_t) rand (), 0x1000, IPC_CREAT | IPC_EXCL | 0777);
-+ if (sid == -1)
-+ {
-+ if (errno == EEXIST)
-+ continue;
-+
-+ printf ("shmget (%d, 0x1000, IPC_CREAT): errno %d\n", 0, errno);
-+ exit (1);
-+ }
-+
-+ /* Use SID only if it is 0, retry it otherwise. */
-+
-+ if (sid == 0)
-+ {
-+ addr = shmat (sid, NULL, SHM_RND);
-+ if (addr == (void *) -1L)
-+ {
-+ printf ("shmat (%d, NULL, SHM_RND): errno %d\n", sid,
-+ errno);
-+ exit (1);
-+ }
-+ }
-+ if (shmctl (sid, IPC_RMID, NULL) != 0)
-+ {
-+ printf ("shmctl (%d, IPC_RMID, NULL): errno %d\n", sid, errno);
-+ exit (1);
-+ }
-+ }
-+
-+ initialized ();
-+
-+ return 0;
-+}
-diff --git a/gdb/testsuite/gdb.base/gcore-shmid0.exp b/gdb/testsuite/gdb.base/gcore-shmid0.exp
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.base/gcore-shmid0.exp
-@@ -0,0 +1,101 @@
-+# Copyright 2007, 2009 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 2 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+# GNU General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+
-+# Test GDB's handling of gcore for mapping with a name but zero inode.
-+
-+if { [prepare_for_testing gcore-shmid0.exp gcore-shmid0] } {
-+ return -1
-+}
-+
-+# Does this gdb support gcore?
-+set test "help gcore"
-+gdb_test_multiple $test $test {
-+ -re "Undefined command: .gcore.*$gdb_prompt $" {
-+ # gcore command not supported -- nothing to test here.
-+ unsupported "gdb does not support gcore on this target"
-+ return -1;
-+ }
-+ -re "Save a core file .*$gdb_prompt $" {
-+ pass $test
-+ }
-+}
-+
-+if { ! [ runto_main ] } then {
-+ untested gcore-shmid0.exp
-+ return -1
-+}
-+
-+gdb_breakpoint "initialized"
-+gdb_breakpoint "unresolved"
-+
-+set oldtimeout $timeout
-+set timeout [expr $oldtimeout + 120]
-+
-+set test "Continue to initialized."
-+gdb_test_multiple "continue" $test {
-+ -re "Breakpoint .*, initialized .* at .*\r\n$gdb_prompt $" {
-+ pass $test
-+ }
-+ -re "Breakpoint .*, unresolved .* at .*\r\n$gdb_prompt $" {
-+ set timeout $oldtimeout
-+ unsupported $test
-+ return -1
-+ }
-+}
-+set timeout $oldtimeout
-+
-+set escapedfilename [string_to_regexp [standard_output_file gcore-shmid0.test]]
-+
-+set test "save a corefile"
-+gdb_test_multiple "gcore [standard_output_file gcore-shmid0.test]" $test {
-+ -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
-+ pass $test
-+ }
-+ -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
-+ unsupported $test
-+ }
-+}
-+
-+# Be sure to remove the handle first.
-+# But it would get removed even on a kill by GDB as the handle is already
-+# deleted, just it is still attached.
-+gdb_continue_to_end "finish"
-+
-+set test "core-file command"
-+gdb_test_multiple "core-file [standard_output_file gcore-shmid0.test]" $test {
-+ -re ".* program is being debugged already.*y or n. $" {
-+ # gdb_load may connect us to a gdbserver.
-+ send_gdb "y\n"
-+ exp_continue;
-+ }
-+ -re "Core was generated by .*\r\n\#0 .*\\\(\\\).*\r\n$gdb_prompt $" {
-+ # The filename does not fit there anyway so do not check it.
-+ pass $test
-+ }
-+ -re ".*registers from core file: File in wrong format.* $" {
-+ fail "core-file command (could not read registers from core file)"
-+ }
-+}
-+
-+set test "backtrace"
-+gdb_test_multiple "bt" $test {
-+ -re "#0 *initialized \\\(\\\) at .*#1 .* main \\\(.*$gdb_prompt $" {
-+ pass $test
-+ }
-+ -re "#0 *initialized \\\(\\\) at .*Cannot access memory at address .*$gdb_prompt $" {
-+ fail $test
-+ }
-+}
diff --git a/gdb.spec b/gdb.spec
index 197cf34..6eff82f 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -936,6 +936,10 @@ fi
# endif scl
%changelog
+* Tue Jun 03 2025 Andrew Burgess <aburgess@redhat.com>
+- Remove gdb-6.3-mapping-zero-inode-test.patch, we now have upstream
+ commit fcfd8a4f239.
+
* Tue Jun 03 2025 Python Maint <python-maint@redhat.com>
- Rebuilt for Python 3.14
reply other threads:[~2026-06-28 0:02 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=178260493459.1.14280452364157292575.rpms-gdb-9c718a5e5027@fedoraproject.org \
--to=aburgess@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