* [testsuite patch] Fix gdb.gdb/selftest.exp for C++-O2-g-built GDB
@ 2016-07-16 13:14 Jan Kratochvil
2016-07-18 8:06 ` Yao Qi
0 siblings, 1 reply; 7+ messages in thread
From: Jan Kratochvil @ 2016-07-16 13:14 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 125 bytes --]
Hi,
tested on Fedora 24 x86_64 after:
./configure; make
That is: CFLAGS='-g -O2' CXXFLAGS='-g -O2'
OK for check-in?
Jan
[-- Attachment #2: 1 --]
[-- Type: text/plain, Size: 1482 bytes --]
gdb/testsuite/ChangeLog
2016-07-16 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.gdb/selftest.exp (do_steps_and_nexts): Add "next over TRY" and
"step into captured_main (args)".
(test_with_self): Add "captured_main (args);" case.
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
index af0026c..2cdd5c1 100644
--- a/gdb/testsuite/gdb.gdb/selftest.exp
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
@@ -116,6 +116,14 @@ proc do_steps_and_nexts {} {
set description "next over lim_at_start initialization"
set command "next"
}
+ -re ".*TRY.*$gdb_prompt $" {
+ set description "next over TRY"
+ set command "next"
+ }
+ -re ".*captured_main \\(args\\);.*$gdb_prompt $" {
+ set description "step into captured_main (args)"
+ set command "step"
+ }
-re ".*count . 0x3.*$gdb_prompt $" {
set description "next over conditional stack alignment code 1"
set command "next"
@@ -330,6 +338,13 @@ proc test_with_self { executable } {
-re "Starting program.*Breakpoint \[0-9\]+,.*captured_main .data.*$gdb_prompt $" {
xfail "$description (line numbers scrambled?)"
}
+ -re "captured_main \\(args\\);\r\n$gdb_prompt $" {
+ gdb_test_multiple "step" "$description" {
+ -re "captured_main .data.* at .*main.c:.*$gdb_prompt $" {
+ pass "$description"
+ }
+ }
+ }
-re "vfork: No more processes.*$gdb_prompt $" {
fail "$description (out of virtual memory)"
set timeout $oldtimeout
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [testsuite patch] Fix gdb.gdb/selftest.exp for C++-O2-g-built GDB
2016-07-16 13:14 [testsuite patch] Fix gdb.gdb/selftest.exp for C++-O2-g-built GDB Jan Kratochvil
@ 2016-07-18 8:06 ` Yao Qi
2016-07-18 8:18 ` Jan Kratochvil
0 siblings, 1 reply; 7+ messages in thread
From: Yao Qi @ 2016-07-18 8:06 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: gdb-patches
On Sat, Jul 16, 2016 at 2:14 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> Hi,
>
> tested on Fedora 24 x86_64 after:
> ./configure; make
> That is: CFLAGS='-g -O2' CXXFLAGS='-g -O2'
>
> OK for check-in?
>
I think my patch https://sourceware.org/ml/gdb-patches/2016-07/msg00157.html
can fix the fail too, but it is not checked in yet.
--
Yao (齐尧)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [testsuite patch] Fix gdb.gdb/selftest.exp for C++-O2-g-built GDB
2016-07-18 8:06 ` Yao Qi
@ 2016-07-18 8:18 ` Jan Kratochvil
2016-07-18 9:45 ` Yao Qi
0 siblings, 1 reply; 7+ messages in thread
From: Jan Kratochvil @ 2016-07-18 8:18 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches
On Mon, 18 Jul 2016 10:05:58 +0200, Yao Qi wrote:
> I think my patch https://sourceware.org/ml/gdb-patches/2016-07/msg00157.html
> can fix the fail too, but it is not checked in yet.
It does not for me:
FAIL: gdb.gdb/selftest.exp: run until breakpoint at captured_main
WARNING: Couldn't test self
->
FAIL: gdb.gdb/selftest.exp: unknown source line
FAIL: gdb.gdb/selftest.exp: step into xmalloc call
Jan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [testsuite patch] Fix gdb.gdb/selftest.exp for C++-O2-g-built GDB
2016-07-18 8:18 ` Jan Kratochvil
@ 2016-07-18 9:45 ` Yao Qi
2016-07-18 11:40 ` Jan Kratochvil
0 siblings, 1 reply; 7+ messages in thread
From: Yao Qi @ 2016-07-18 9:45 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: gdb-patches
On Mon, Jul 18, 2016 at 9:18 AM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> On Mon, 18 Jul 2016 10:05:58 +0200, Yao Qi wrote:
>> I think my patch https://sourceware.org/ml/gdb-patches/2016-07/msg00157.html
>> can fix the fail too, but it is not checked in yet.
>
> It does not for me:
>
> FAIL: gdb.gdb/selftest.exp: run until breakpoint at captured_main
> WARNING: Couldn't test self
> ->
> FAIL: gdb.gdb/selftest.exp: unknown source line
> FAIL: gdb.gdb/selftest.exp: step into xmalloc call
>
OK, I think we still need to convert gdb.gdb/selftest.exp using proc
do_self_tests to simplify the code, and then, improve procs in
lib/selftest-support.exp to handle the fails when GDB is compiled with
optimization. What do you think? If you agree on this, I can commit
my patch above, and tweak lib/selftest-support.exp to fix your fails.
--
Yao (齐尧)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [testsuite patch] Fix gdb.gdb/selftest.exp for C++-O2-g-built GDB
2016-07-18 9:45 ` Yao Qi
@ 2016-07-18 11:40 ` Jan Kratochvil
2016-07-19 9:47 ` Yao Qi
0 siblings, 1 reply; 7+ messages in thread
From: Jan Kratochvil @ 2016-07-18 11:40 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches
On Mon, 18 Jul 2016 11:45:36 +0200, Yao Qi wrote:
> OK, I think we still need to convert gdb.gdb/selftest.exp using proc
> do_self_tests to simplify the code, and then, improve procs in
> lib/selftest-support.exp to handle the fails when GDB is compiled with
> optimization. What do you think? If you agree on this, I can commit
> my patch above, and tweak lib/selftest-support.exp to fix your fails.
I have no opinion on it. I have no idea what's the purpose of
gdb.gdb/selftest.exp . I see during the past 10 years I saw an upstream catch
of one regression(s) by but it was more an accident and it could happen with
some other regular testsuite-built inferior if it was testing the same
feature.
I just want to keep it regression-free so do whatever you find fine, I can
rebase my patch on top of it, but I would like no regression for -O2 -g GDB
and I would like not to carry this patch off-trunk forever.
Jan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [testsuite patch] Fix gdb.gdb/selftest.exp for C++-O2-g-built GDB
2016-07-18 11:40 ` Jan Kratochvil
@ 2016-07-19 9:47 ` Yao Qi
2016-07-20 14:29 ` [commit] " Jan Kratochvil
0 siblings, 1 reply; 7+ messages in thread
From: Yao Qi @ 2016-07-19 9:47 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: gdb-patches
On Mon, Jul 18, 2016 at 12:40 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> On Mon, 18 Jul 2016 11:45:36 +0200, Yao Qi wrote:
>> OK, I think we still need to convert gdb.gdb/selftest.exp using proc
>> do_self_tests to simplify the code, and then, improve procs in
>> lib/selftest-support.exp to handle the fails when GDB is compiled with
>> optimization. What do you think? If you agree on this, I can commit
>> my patch above, and tweak lib/selftest-support.exp to fix your fails.
>
> I have no opinion on it. I have no idea what's the purpose of
> gdb.gdb/selftest.exp . I see during the past 10 years I saw an upstream catch
> of one regression(s) by but it was more an accident and it could happen with
> some other regular testsuite-built inferior if it was testing the same
> feature.
>
> I just want to keep it regression-free so do whatever you find fine, I can
> rebase my patch on top of it, but I would like no regression for -O2 -g GDB
> and I would like not to carry this patch off-trunk forever.
I've pushed my patch in. Your patch changing test_with_self is no longer
needed, but changes in do_steps_and_nexts are still useful to fix the fails
you've seen, so changes in do_steps_and_nexts are OK to commit.
--
Yao (齐尧)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [commit] [testsuite patch] Fix gdb.gdb/selftest.exp for C++-O2-g-built GDB
2016-07-19 9:47 ` Yao Qi
@ 2016-07-20 14:29 ` Jan Kratochvil
0 siblings, 0 replies; 7+ messages in thread
From: Jan Kratochvil @ 2016-07-20 14:29 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 339 bytes --]
On Tue, 19 Jul 2016 11:47:07 +0200, Yao Qi wrote:
> I've pushed my patch in. Your patch changing test_with_self is no longer
> needed, but changes in do_steps_and_nexts are still useful to fix the fails
> you've seen, so changes in do_steps_and_nexts are OK to commit.
Checked in:
027d97f8b0193a8113ee60bafc686d45d0af59ee
Thanks,
Jan
[-- Attachment #2: Type: message/rfc822, Size: 1942 bytes --]
From: Jan Kratochvil <jan.kratochvil@redhat.com>
Subject: [PATCH] testsuite: Fix gdb.gdb/selftest.exp for C++-O2-g-built GDB
Date: Wed, 20 Jul 2016 16:26:44 +0200
tested on Fedora 24 x86_64 after:
./configure; make
That is: CFLAGS='-g -O2' CXXFLAGS='-g -O2'
FAIL: gdb.gdb/selftest.exp: unknown source line
FAIL: gdb.gdb/selftest.exp: step into xmalloc call
gdb/testsuite/ChangeLog
2016-07-20 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.gdb/selftest.exp (do_steps_and_nexts): Add "next over TRY" and
"step into captured_main (args)".
---
gdb/testsuite/ChangeLog | 5 +++++
gdb/testsuite/gdb.gdb/selftest.exp | 8 ++++++++
2 files changed, 13 insertions(+)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 3a1bdfd..e7d935e 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2016-07-20 Jan Kratochvil <jan.kratochvil@redhat.com>
+ * gdb.gdb/selftest.exp (do_steps_and_nexts): Add "next over TRY" and
+ "step into captured_main (args)".
+
+2016-07-20 Jan Kratochvil <jan.kratochvil@redhat.com>
+
* gdb.btrace/tailcall-only.exp: Use is_lp64_target check.
2016-07-20 Jan Kratochvil <jan.kratochvil@redhat.com>
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
index 809045a..2fdd9e3 100644
--- a/gdb/testsuite/gdb.gdb/selftest.exp
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
@@ -111,6 +111,14 @@ proc do_steps_and_nexts {} {
set description "next over lim_at_start initialization"
set command "next"
}
+ -re ".*TRY.*$gdb_prompt $" {
+ set description "next over TRY"
+ set command "next"
+ }
+ -re ".*captured_main \\(args\\);.*$gdb_prompt $" {
+ set description "step into captured_main (args)"
+ set command "step"
+ }
-re ".*count . 0x3.*$gdb_prompt $" {
set description "next over conditional stack alignment code 1"
set command "next"
--
2.7.4
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-07-20 14:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-16 13:14 [testsuite patch] Fix gdb.gdb/selftest.exp for C++-O2-g-built GDB Jan Kratochvil
2016-07-18 8:06 ` Yao Qi
2016-07-18 8:18 ` Jan Kratochvil
2016-07-18 9:45 ` Yao Qi
2016-07-18 11:40 ` Jan Kratochvil
2016-07-19 9:47 ` Yao Qi
2016-07-20 14:29 ` [commit] " Jan Kratochvil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).