Re: [patch] XFAIL gdb.cp/mb-inline.exp conditionaly

Pedro Alves
2011-06-22T15:38:55Z

On Wednesday 15 June 2011 15:17:19, Yao Qi wrote:
> In mb-inline.exp, breakpoint 1.2 is disabled, re-run program, and make
> sure breakpoint 1.2 is still disabled and program will not hit it. The
> pre-condition is new inferior created by re-run is loaded at the exactly
> same address as previous one. However, it is not true on some systems,
> such as uclinux.
>
> On uclinux, new inferior is created on the different address, so status
> of breakpoint location (enabled or disabled) will not be kept during
> breakpoint updates. breakpoint 1.2 become enabled, instead of disabled.
> This will make this FAIL,
>
> FAIL: gdb.cp/mb-inline.exp: continue with disabled breakpoint 1.2
>

Why not do "info breakpoints", and parse the output, checking if
the breakpoint is really disabled? If it is not, no point issuing
the continue.

The breakpoint was set by line number, and we're reloading
the session the same both times. Why does breakpoint 1.2 become
enabled (and I'm guessing that breakpoint 1.1 becomes disabled)?

> This patch is to address this issue. After this patch, in my uclinux
> port, the test result is like this,
>
> # of expected passes 9
> # of expected failures 1
>
> but, some times, we can get 10 PASSes, because the new inferior may be
> created/loaded on the same address as previous one.
>
> Note that I also considered to use setup_xfail for uclinux target, but
> we may get a XPASS, so I didn't write patch in that way.
>
> OK for mainline?
>
>

--
Pedro Alves