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: Fix testcase: gdb.base/gdb-rhbz1156192-recursive-dlopen.exp
Date: Sat, 27 Jun 2026 23:57:58 GMT [thread overview]
Message-ID: <178260467835.1.17025912435580524287.rpms-gdb-b513153c46e3@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/gdb
Branch : gdb-17.2-rebase-f44
Commit : b513153c46e3e632d67ad2ec2bee2ae275c1bb8c
Author : Jan Kratochvil <jan.kratochvil@redhat.com>
Date : 2016-10-24T23:23:00+02:00
Stats : +63/-42 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/gdb/c/b513153c46e3e632d67ad2ec2bee2ae275c1bb8c?branch=gdb-17.2-rebase-f44
Log:
Fix testcase: gdb.base/gdb-rhbz1156192-recursive-dlopen.exp
---
diff --git a/gdb-rhbz1156192-recursive-dlopen-test.patch b/gdb-rhbz1156192-recursive-dlopen-test.patch
index 10b9ecb..2fbc80b 100644
--- a/gdb-rhbz1156192-recursive-dlopen-test.patch
+++ b/gdb-rhbz1156192-recursive-dlopen-test.patch
@@ -200,8 +200,8 @@ Index: gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.c
Index: gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.exp 2016-10-23 21:56:43.815767639 +0200
-@@ -0,0 +1,119 @@
++++ gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.exp 2016-10-24 23:21:58.043064177 +0200
+@@ -0,0 +1,137 @@
+# Copyright 2014 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
@@ -247,47 +247,44 @@ Index: gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.exp
+ return -1
+}
+
-+set opts ""
+if { [prepare_for_testing ${testfile}.exp ${executable} ${srcfile} \
-+ [ list debug shlib_load "additional_flags=-Wno-deprecated-declarations -Wl,${binfile_lib1},-rpath,[file dirname ${binfile_lib1}],${binfile_lib2},-rpath,[file dirname ${binfile_lib2}]" ]] } {
++ [ list debug shlib_load "additional_flags=-Wno-deprecated-declarations" ]] } {
+ untested "Could not compile ${executable}"
+ return -1
+}
+
-+proc do_test { has_libfoo has_libbar pass } {
++proc do_test { has_libfoo has_libbar } {
+ global hex binfile_lib2 binfile_lib1 gdb_prompt
+ set libbar_match "[string_to_regexp $binfile_lib2]"
+ set libfoo_match "[string_to_regexp $binfile_lib1]"
+
-+ with_test_prefix "pass #$pass" {
-+ gdb_test_multiple "info shared" "info shared" {
-+ -re ".*$libfoo_match\r\n.*$libbar_match\(\r\n.*Shared library is missing\)?.*\r\n${gdb_prompt} $" {
-+ if { $has_libfoo && $has_libbar } {
-+ pass "matched libfoo and libbar"
-+ } else {
-+ fail "matched libfoo and libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
-+ }
++ gdb_test_multiple "info shared" "info shared" {
++ -re ".*$libfoo_match\r\n.*$libbar_match\(\r\n.*Shared library is missing\)?.*\r\n${gdb_prompt} $" {
++ if { $has_libfoo && $has_libbar } {
++ pass "matched libfoo and libbar"
++ } else {
++ fail "matched libfoo and libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
+ }
-+ -re ".*$libfoo_match\(\r\n.*Shared library is missing\)?.*\r\n${gdb_prompt} $" {
-+ if { $has_libfoo && !$has_libbar } {
-+ pass "matched libfoo"
-+ } else {
-+ fail "matched libfoo (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
-+ }
++ }
++ -re ".*$libfoo_match\(\r\n.*Shared library is missing\)?.*\r\n${gdb_prompt} $" {
++ if { $has_libfoo && !$has_libbar } {
++ pass "matched libfoo"
++ } else {
++ fail "matched libfoo (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
+ }
-+ -re ".*$libbar_match\(\r\n.*Shared library is missing\)?.*\r\n${gdb_prompt} $" {
-+ if { $has_libbar && !$has_libfoo } {
-+ pass "matched libbar"
-+ } else {
-+ fail "matched libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
-+ }
++ }
++ -re ".*$libbar_match\(\r\n.*Shared library is missing\)?.*\r\n${gdb_prompt} $" {
++ if { $has_libbar && !$has_libfoo } {
++ pass "matched libbar"
++ } else {
++ fail "matched libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
+ }
-+ "\r\n${gdb_prompt} $" {
-+ if { !$has_libfoo && !$has_libbar } {
-+ pass "did not match libfoo nor libbar"
-+ } else {
-+ fail "did not match libfoo nor libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
-+ }
++ }
++ "\r\n${gdb_prompt} $" {
++ if { !$has_libfoo && !$has_libbar } {
++ pass "did not match libfoo nor libbar"
++ } else {
++ fail "did not match libfoo nor libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
+ }
+ }
+ }
@@ -297,13 +294,12 @@ Index: gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.exp
+ set pass 0
+ # This variable holds the information about whether libfoo and
+ # libbar (respectively) are expected in the "info shared" output.
-+# set solib_event_order { { 0 0 } { 0 0 } { 0 0 } { 0 1 } \
-+# { 0 1 } { 0 0 } { 0 0 } { 0 1 } \
-+# { 0 1 } { 0 0 } { 0 0 } { 0 1 } \
-+# { 0 1 } { 0 0 } { 1 0 } { 1 1 } \
-+# { 1 1 } { 1 0 } { 1 0 } { 1 1 } \
-+# { 1 1 } { 1 0 } { 1 0 } { 1 0 } }
-+ set solib_event_order { { 0 0 } { 1 1 } }
++ set solib_event_order { { 0 0 } { 0 0 } { 0 0 } { 0 1 } \
++ { 0 1 } { 0 0 } { 0 0 } { 0 1 } \
++ { 0 1 } { 0 0 } { 0 0 } { 0 1 } \
++ { 0 1 } { 0 0 } { 0 0 1 } { 1 1 } \
++ { 1 1 } { 1 0 } { 1 0 } { 1 1 } \
++ { 1 1 } { 1 0 1 } { 1 0 } { 1 0 } }
+
+ with_test_prefix "stop-on-solib-events" {
+ gdb_test_no_output "set stop-on-solib-events 1" "setting stop-on-solib-events"
@@ -311,12 +307,34 @@ Index: gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.exp
+ gdb_run_cmd
+ foreach l $solib_event_order {
+ incr pass
-+ do_test [lindex $l 0] [lindex $l 1] $pass
-+ gdb_test "continue" "\(Called \(foo\|bar\)\r\n\)?Stopped due to shared library event.*"
++ with_test_prefix "pass #$pass" {
++ set should_be_corrupted [expr 0+0[lindex $l 2]]
++ do_test [lindex $l 0] [lindex $l 1]
++ set test "continue"
++ global gdb_prompt
++ gdb_test_multiple $test $test {
++ -re "\r\nwarning: Corrupted shared library list:.*\r\nStopped due to shared library event.*\r\n$gdb_prompt $" {
++ set corrupted 1
++ pass $test
++ }
++ -re "\r\nStopped due to shared library event.*\r\n$gdb_prompt $" {
++ set corrupted 0
++ pass $test
++ }
++ }
++ set test "corrupted=$corrupted but should_be_corrupted=$should_be_corrupted"
++ if {$corrupted == $should_be_corrupted} {
++ pass $test
++ } else {
++ fail $test
++ }
++ }
+ }
+ # In the last pass we do not expect to see libfoo or libbar.
+ incr pass
-+ do_test 0 0 $pass
++ with_test_prefix "pass #$pass" {
++ do_test 0 0
++ }
+ }
+}
+
diff --git a/gdb.spec b/gdb.spec
index acd7943..5a325b2 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -26,7 +26,7 @@ Version: 7.12
# 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: 27%{?dist}
+Release: 28%{?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
@@ -1572,6 +1572,9 @@ then
fi
%changelog
+* Mon Oct 24 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.12-28.fc25
+- Fix testcase: gdb.base/gdb-rhbz1156192-recursive-dlopen.exp
+
* Sun Oct 23 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.12-27.fc25
- More work on missing testcases present in rhel6 GDB; some still FAIL.
reply other threads:[~2026-06-27 23:57 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=178260467835.1.17025912435580524287.rpms-gdb-b513153c46e3@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