This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch 2/2] KFAIL for mb-templates.exp PASS->FAIL regression [Re: [RFC stub-side break conditions 5/5] GDBServer-side changes]
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Luis Machado <luis_gustavo at mentor dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 28 Feb 2012 17:05:34 +0100
- Subject: [patch 2/2] KFAIL for mb-templates.exp PASS->FAIL regression [Re: [RFC stub-side break conditions 5/5] GDBServer-side changes]
- References: <4F05BACD.3050006@mentor.com>
Hi Luis,
On Thu, 05 Jan 2012 15:59:25 +0100, Luis Machado wrote:
> I ran the testsuite with GDBServer and only one regression showed up
> in gdb.cp/mb-templates.exp. It may be a hidden bug that was exposed
> by these changes since it gives me an internal error when trying to
> parse the conditional expression.
even despite it is not a bug in your patchset you have introduced PASS->FAIL
regression in the results. This is IMO not acceptable, KFAIl should be put
there in such case.
It is already difficult to find a cause of each PASS->FAIL, as it is typically
by gcc/glibc but it may be also kernel or KVM and in some cases also CPU kind.
If even GDB could voluntarily turn PASS->FAIL results on its own...
I am aware PASS->FAILs happen for non-primary (=non-x86*) archs.
I will check it in.
Tested on {x86_64,x86_64-m32,i686}-fedora17-linux-gnu (f16 kernel) and in
non-extended gdbserver mode.
for gdbserver:
-FAIL: gdb.cp/mb-templates.exp: initial condition: run to breakpoint (timeout)
-FAIL: gdb.cp/mb-templates.exp: initial condition: run to breakpoint 2 (GDB internal error)
+KFAIL: gdb.cp/mb-templates.exp: initial condition: run to breakpoint (GDB internal error) (PRMS: breakpoints/13781)
+PASS: gdb.cp/mb-templates.exp: set breakpoint condition-evaluation host
+PASS: gdb.cp/mb-templates.exp: initial condition: set breakpoint (workaround)
+PASS: gdb.cp/mb-templates.exp: initial condition: run to breakpoint (workaround)
+PASS: gdb.cp/mb-templates.exp: initial condition: run to breakpoint 2
+PASS: gdb.cp/mb-templates.exp: kill
-FAIL: gdb.cp/mb-templates.exp: separate condition: run to breakpoint (timeout)
-FAIL: gdb.cp/mb-templates.exp: separate condition: run to breakpoint 2 (GDB internal error)
+PASS: gdb.cp/mb-templates.exp: separate condition: run to breakpoint
+PASS: gdb.cp/mb-templates.exp: separate condition: run to breakpoint 2
-FAIL: gdb.cp/mb-templates.exp: disabling location: run to breakpoint (timeout)
-FAIL: gdb.cp/mb-templates.exp: disabling location: enable (GDB internal error)
+PASS: gdb.cp/mb-templates.exp: disabling location: run to breakpoint
+PASS: gdb.cp/mb-templates.exp: disabling location: enable
Thanks,
Jan
gdb/
2012-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
* breakpoint.c (set_condition_evaluation_mode): Set
CONDITION_EVALUATION_MODE unconditionally.
gdb/testsuite/
2012-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
Implement testsuite workaround for PR breakpoints/13781.
* gdb.cp/mb-templates.exp: New loop with variable $workaround.
(set breakpoint condition-evaluation host): New conditional command.
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -761,6 +761,10 @@ set_condition_evaluation_mode (char *args, int from_tty,
new_mode = translate_condition_evaluation_mode (condition_evaluation_mode_1);
old_mode = translate_condition_evaluation_mode (condition_evaluation_mode);
+ /* Flip the switch. Flip it even if OLD_MODE == NEW_MODE as one of the
+ settings was "auto". */
+ condition_evaluation_mode = condition_evaluation_mode_1;
+
/* Only update the mode if the user picked a different one. */
if (new_mode != old_mode)
{
@@ -772,9 +776,6 @@ set_condition_evaluation_mode (char *args, int from_tty,
"target" -> "host": Remove all the conditions from the target.
*/
- /* Flip the switch. */
- condition_evaluation_mode = condition_evaluation_mode_1;
-
if (new_mode == condition_evaluation_target)
{
/* Mark everything modified and synch conditions with the
--- a/gdb/testsuite/gdb.cp/mb-templates.exp
+++ b/gdb/testsuite/gdb.cp/mb-templates.exp
@@ -38,24 +38,35 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
return -1
}
-clean_restart ${executable}
+# If GDB crashes try it again workarounding PR breakpoints/13781.
-set bp_location [gdb_get_line_number "set breakpoint here"]
+foreach workaround [list "" " (workaround)"] {
+ clean_restart ${executable}
-# Set a breakpoint with multiple locations
-# and a condition.
+ if {${workaround} != ""} {
+ gdb_test_no_output "set breakpoint condition-evaluation host"
+ }
-gdb_test "break $srcfile:$bp_location if i==1" \
- "Breakpoint.*at.*: $srcfile:$bp_location. \\(2 locations\\).*" \
- "initial condition: set breakpoint"
+ set bp_location [gdb_get_line_number "set breakpoint here"]
-gdb_run_cmd
+ # Set a breakpoint with multiple locations
+ # and a condition.
-set test "initial condition: run to breakpoint"
-gdb_test_multiple "" $test {
- -re "Breakpoint \[0-9\]+,.*foo<int> \\(i=1\\).*$gdb_prompt $" {
- pass $test
- break
+ gdb_test "break $srcfile:$bp_location if i==1" \
+ "Breakpoint.*at.*: $srcfile:$bp_location. \\(2 locations\\).*" \
+ "initial condition: set breakpoint$workaround"
+
+ gdb_run_cmd
+
+ if {${workaround} == "" && [is_remote target]} {
+ setup_kfail breakpoints/13781 "*-*-*"
+ }
+ set test "initial condition: run to breakpoint$workaround"
+ gdb_test_multiple "" $test {
+ -re "Breakpoint \[0-9\]+,.*foo<int> \\(i=1\\).*$gdb_prompt $" {
+ pass $test
+ break
+ }
}
}