Accepting request 932918 from home:tomdevries:branches:devel:gcc-gdb-source-highlight
- Patches added (backport from master): * gdb-testsuite-add-missing-wait-in-gdb.base-signals-state-child.exp.patch - Add BuildRequire libsource-highlight. OBS-URL: https://build.opensuse.org/request/show/932918 OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=306
This commit is contained in:
@@ -0,0 +1,59 @@
|
|||||||
|
[gdb/testsuite] Add missing wait in gdb.base/signals-state-child.exp
|
||||||
|
|
||||||
|
On OBS I ran into:
|
||||||
|
...
|
||||||
|
(gdb) shell diff -s outputs/gdb.base/signals-state-child/standalone.txt \
|
||||||
|
outputs/gdb.base/signals-state-child/gdb.txt^M
|
||||||
|
diff: outputs/gdb.base/signals-state-child/standalone.txt: \
|
||||||
|
No such file or directory^M
|
||||||
|
(gdb) FAIL: gdb.base/signals-state-child.exp: signals states are identical
|
||||||
|
...
|
||||||
|
|
||||||
|
I managed to reproduce this by adding "sleep (5)" at the start of main in
|
||||||
|
signals-state-child.c.
|
||||||
|
|
||||||
|
Fix this by waiting on the result of the spawned command.
|
||||||
|
|
||||||
|
Tested on x86_64-linux.
|
||||||
|
|
||||||
|
---
|
||||||
|
gdb/testsuite/gdb.base/signals-state-child.exp | 14 +++++++++++---
|
||||||
|
1 file changed, 11 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/gdb/testsuite/gdb.base/signals-state-child.exp b/gdb/testsuite/gdb.base/signals-state-child.exp
|
||||||
|
index 0984033811b..81589375f22 100644
|
||||||
|
--- a/gdb/testsuite/gdb.base/signals-state-child.exp
|
||||||
|
+++ b/gdb/testsuite/gdb.base/signals-state-child.exp
|
||||||
|
@@ -69,9 +69,11 @@ set res [remote_spawn target "$binfile-standalone"]
|
||||||
|
if { $res < 0 || $res == "" } {
|
||||||
|
untested "spawning $binfile-standalone failed"
|
||||||
|
return 1
|
||||||
|
-} else {
|
||||||
|
- pass "collect standalone signals state"
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+set wait_status [remote_wait target 60]
|
||||||
|
+set have_standalone [expr [lindex $wait_status 0] == 0]
|
||||||
|
+gdb_assert { $have_standalone } "collect standalone signals state"
|
||||||
|
remote_close target
|
||||||
|
|
||||||
|
# Now run the program through gdb, and dump its initial signal actions
|
||||||
|
@@ -86,6 +88,12 @@ if { ! [ runto_main ] } then {
|
||||||
|
|
||||||
|
gdb_continue_to_end "collect signals state under gdb"
|
||||||
|
|
||||||
|
+set test "signals states are identical"
|
||||||
|
+if { ! $have_standalone } {
|
||||||
|
+ untested $test
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
if {!$purely_local} {
|
||||||
|
# Copy file from target to host through build.
|
||||||
|
remote_download host [remote_upload target gdb.txt] gdb.txt
|
||||||
|
@@ -95,4 +103,4 @@ if {!$purely_local} {
|
||||||
|
# Diff the .txt files. They should be identical.
|
||||||
|
gdb_test "shell diff -s $standalone_txt $gdb_txt" \
|
||||||
|
"Files .* are identical.*" \
|
||||||
|
- "signals states are identical"
|
||||||
|
+ $test
|
12
gdb.changes
12
gdb.changes
@@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 22 07:49:37 UTC 2021 - Tom de Vries <tdevries@suse.com>
|
||||||
|
|
||||||
|
- Disable BuildRequire libsource-highlight for SLE-12 and earlier.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Nov 19 15:31:46 UTC 2021 - Tom de Vries <tdevries@suse.com>
|
||||||
|
|
||||||
|
- Patches added (backport from master):
|
||||||
|
* gdb-testsuite-add-missing-wait-in-gdb.base-signals-state-child.exp.patch
|
||||||
|
- Add BuildRequire libsource-highlight.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Nov 18 14:01:30 UTC 2021 - Tom de Vries <tdevries@suse.com>
|
Thu Nov 18 14:01:30 UTC 2021 - Tom de Vries <tdevries@suse.com>
|
||||||
|
|
||||||
|
7
gdb.spec
7
gdb.spec
@@ -345,6 +345,7 @@ Patch2030: gdb-testsuite-don-t-error-when-trying-to-unset-last_spawn_tty_na
|
|||||||
Patch2031: gdb-exp-improve-error-reading-variable-message.patch
|
Patch2031: gdb-exp-improve-error-reading-variable-message.patch
|
||||||
Patch2032: fix-gdb.base-sigstep.exp-test-for-ppc.patch
|
Patch2032: fix-gdb.base-sigstep.exp-test-for-ppc.patch
|
||||||
Patch2033: gdb-testsuite-fix-regexp-in-gdb.base-foll-vfork.exp.patch
|
Patch2033: gdb-testsuite-fix-regexp-in-gdb.base-foll-vfork.exp.patch
|
||||||
|
Patch2034: gdb-testsuite-add-missing-wait-in-gdb.base-signals-state-child.exp.patch
|
||||||
|
|
||||||
# Backports from master, not yet available in next release.
|
# Backports from master, not yet available in next release.
|
||||||
|
|
||||||
@@ -469,6 +470,11 @@ BuildRequires: babeltrace-devel
|
|||||||
BuildRequires: babeltrace-devel
|
BuildRequires: babeltrace-devel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?suse_version} >= 1500
|
||||||
|
BuildRequires: libboost_regex-devel
|
||||||
|
BuildRequires: libsource-highlight-devel
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{build_testsuite}
|
%if %{build_testsuite}
|
||||||
|
|
||||||
# Copied from gcc9/gcc.spec.in
|
# Copied from gcc9/gcc.spec.in
|
||||||
@@ -797,6 +803,7 @@ find -name "*.info*"|xargs rm -f
|
|||||||
%patch2031 -p1
|
%patch2031 -p1
|
||||||
%patch2032 -p1
|
%patch2032 -p1
|
||||||
%patch2033 -p1
|
%patch2033 -p1
|
||||||
|
%patch2034 -p1
|
||||||
|
|
||||||
%patch2100 -p1
|
%patch2100 -p1
|
||||||
%patch2101 -p1
|
%patch2101 -p1
|
||||||
|
Reference in New Issue
Block a user