* [PATCH] Guarantee save-and-restore of GDBFLAGS on gdb.base/checkpoint-ns.exp
@ 2015-08-11 23:31 Sergio Durigan Junior
2015-08-12 10:15 ` Pedro Alves
0 siblings, 1 reply; 3+ messages in thread
From: Sergio Durigan Junior @ 2015-08-11 23:31 UTC (permalink / raw)
To: GDB Patches; +Cc: Pedro Alves, Keith Seitz, Patrick Palka
Hello,
This is a very simple patch, which depends on Patrick Palka's
"save_vars" patch
(<https://sourceware.org/ml/gdb-patches/2015-06/msg00391.html>, approved
but not pushed yet).
Keith found out that several tests were failing when testing the
native-gdbserver board on Fedora (x86_64). Strangely, these failures
had not been reported by our BuildBot. Later, he found that the reason
for this was because the failures only happened when running the
testsuite without FORCE_PARALLEL (i.e., on serial mode; maybe it would
be worth having a builder testing things on serial...). Then, he
decided to start bisecting the changes to see which one introduced the
failure (it was not trivial to know this only by looking at gdb.log).
After a lot of time, he found that Pedro's commit
e1316e60d4d1fe406efc6e7536b2bdb43733e9d2 was the culprit. There was
nothing wrong in the code, but the new gdb.base/checkpoint-ns.exp
testcase did something that left the GDBFLAGS variable in an
inconsistent state. This test works by modifying this variable to set
non-stop on, sourcing gdb.base/checkpoint.exp (which does the hard
work), and then restoring the old value on GDBFLAGS. However, this was
not working because gdb.base/checkpoint.exp bails out if it is being
tested on gdbserver, and when it calls "continue" the control goes back
to the function calling the tests, and not to
gdb.base/checkpoint-ns.exp.
The fix is simple: just wrap the "source" call, and make
gdb.base/checkpoint-ns.exp aware of the "continue"/"return" calls made
by gdb.base/checkpoint.exp. For that, we decided to use "save_vars".
The testsuite now is back to normal, and no regressions have been
introduced by this patch. OK to apply (after Patrick applies his
save_var patch)?
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/
2015-08-11 Sergio Durigan Junior <sergiodj@redhat.com>
Pedro Alves <palves@redhat.com>
Keith Seitz <keiths@redhat.com>
* gdb.base/checkpoint-ns.exp: Use save_vars to save and restore
GDBFLAGS.
diff --git a/gdb/testsuite/gdb.base/checkpoint-ns.exp b/gdb/testsuite/gdb.base/checkpoint-ns.exp
index d3698ba..d470bc4 100644
--- a/gdb/testsuite/gdb.base/checkpoint-ns.exp
+++ b/gdb/testsuite/gdb.base/checkpoint-ns.exp
@@ -18,9 +18,8 @@
# We drive non-stop mode from a separate file because the whole test
# takes a while to run. This way, we can test both modes in parallel.
-set saved_gdbflags $GDBFLAGS
-append GDBFLAGS " -ex \"set non-stop on\""
+save_vars { GDBFLAGS } {
+ append GDBFLAGS " -ex \"set non-stop on\""
-source $srcdir/$subdir/checkpoint.exp
-
-set GDBFLAGS $saved_gdbflags
+ source $srcdir/$subdir/checkpoint.exp
+}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Guarantee save-and-restore of GDBFLAGS on gdb.base/checkpoint-ns.exp
2015-08-11 23:31 [PATCH] Guarantee save-and-restore of GDBFLAGS on gdb.base/checkpoint-ns.exp Sergio Durigan Junior
@ 2015-08-12 10:15 ` Pedro Alves
2015-08-12 16:34 ` Sergio Durigan Junior
0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2015-08-12 10:15 UTC (permalink / raw)
To: Sergio Durigan Junior, GDB Patches; +Cc: Keith Seitz, Patrick Palka
On 08/12/2015 12:31 AM, Sergio Durigan Junior wrote:
> The testsuite now is back to normal, and no regressions have been
> introduced by this patch. OK to apply (after Patrick applies his
> save_var patch)?
OK.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Guarantee save-and-restore of GDBFLAGS on gdb.base/checkpoint-ns.exp
2015-08-12 10:15 ` Pedro Alves
@ 2015-08-12 16:34 ` Sergio Durigan Junior
0 siblings, 0 replies; 3+ messages in thread
From: Sergio Durigan Junior @ 2015-08-12 16:34 UTC (permalink / raw)
To: Pedro Alves; +Cc: GDB Patches, Keith Seitz, Patrick Palka
On Wednesday, August 12 2015, Pedro Alves wrote:
> On 08/12/2015 12:31 AM, Sergio Durigan Junior wrote:
>
>> The testsuite now is back to normal, and no regressions have been
>> introduced by this patch. OK to apply (after Patrick applies his
>> save_var patch)?
>
> OK.
Thanks, pushed.
<https://sourceware.org/ml/gdb-cvs/2015-08/msg00095.html>
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-08-12 16:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-11 23:31 [PATCH] Guarantee save-and-restore of GDBFLAGS on gdb.base/checkpoint-ns.exp Sergio Durigan Junior
2015-08-12 10:15 ` Pedro Alves
2015-08-12 16:34 ` Sergio Durigan Junior
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox