[PATCH] testsuite: Extend TLS core file testing with an OS-generated dump
Maciej W. Rozycki
macro@mips.com
Fri May 25 13:49:00 GMT 2018
On Thu, 24 May 2018, Pedro Alves wrote:
> > I'd keep that:
> >
> > rename tls_core_test ""
> >
> > command that I added at the end though, so as not to clutter the procedure
> > space. Otherwise it'll stay there thoughout the rest of a test suite run
> > (we have some leftover clutter in the testsuite already, which sometimes
> > makes different .exp scripts interact with each other).
>
> Ah, forgot to comment that. I think that would be a losing battle.
> We already have too many tests defining procedures and global variables
> and we never took that care. And frankly, it looks a bit too onerous
> to me. Particularly since to do it throughout would imply undefining
> procedures at every early-bail-out return path too.
>
> I think a better approach is to isolate the testcases somehow.
>
> One way is to put each testcase in its own tcl namespace. It still
> wouldn't isolate properly if you test with more than one board at the
> same time, like "--target_board=foo,bar".
Given your observations I've thought about namespaces too, especially as
they can be deleted once they're done with. So why wouldn't they work
with `--target_board=foo,bar', how is the test suite executed in such an
arrangement?
> Another way is to make sure that we run each testcase in its own
> separate 'expect' process. We actually can already do the latter,
> if you run the testsuite with "make check-parallel", like e.g.,:
>
> $ make check-parallel TESTS="gdb.*/tls-core.exp */break.exp"
>
> so we'd need to make "make check" do that by default. I think
> this might be the most promising approach.
Are globals available to those separate processes though? What if one is
updated as a side-effect of a library procedure called from a test case,
(like to achieve a caching effect)?
> > WARNING: can't generate a core file - core tests suppressed - check ulimit -c
> > UNSUPPORTED: gdb.threads/tls-core.exp: native: load core file
> > UNSUPPORTED: gdb.threads/tls-core.exp: native: print thread-local storage variable
> >
> > here. Will you handle all this or shall I?
>
> I've handled this now, and pushed the patch, as below.
Great, thanks!
> > Many thanks for taking care of this. Your updated test script actually
> > helped me greatly with a test case for the next change I am going to push
> > (another MIPS/Linux core file mishandling -- we live in a reality separate
> > from the kernel's as it turns out).
> Nice, great to hear that.
Pushed as commit d8dab6c3bbe6 ("MIPS/Linux: Correct o32 core file FGR
interpretation") now. I hope I didn't make the test case outdated from
the beginning.
Maciej
More information about the Gdb-patches
mailing list