This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] testsuite: Extend TLS core file testing with an OS-generated dump
Hi Pedro,
> > Acknowledged. Given the current situation I cannot afford investing
> > any further work into this change, so let's ditch it (and a change to
> > gdb.base/auxv.exp to use `use_gdb_stub' I planned to submit next). If I
> > find some time after all, then I can revisit the decision later on.
> I understand. Let me take it over then. Below's a version using
> core_find.
>
> I also simplified the patch a bit:
>
> - Removed the rlimit bits, since it seems that no other core-related test
> does that (so it seems to me that if needed, it would better be done
> separately and to several testcases at once).
Well, I took them from gdb.base/auxv.c, so clearly there's at least one
test that has them. Perhaps you could modernise gdb.base/auxv.exp too?
> As a local hack, I flipped the logic in:
> set core_supported [expr {$corefile != ""}]
> to make sure that the expected UNSUPPORTED messages come out.
>
> Let me know what you think.
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).
I ran it native and gdbserver-native, and remote, with correct results.
Messages in the commit description need to be updated though, as below:
> This adds:
>
> PASS: gdb.threads/tls-core.exp: set cwd to temporary directory for core dumps
> PASS: gdb.threads/tls-core.exp: continue to signal
> PASS: gdb.threads/tls-core.exp: continue to termination
> PASS: gdb.threads/tls-core.exp: generate native core dump
> PASS: gdb.threads/tls-core.exp: load native corefile
> PASS: gdb.threads/tls-core.exp: print thread-local storage variable from native corefile
PASS: gdb.threads/tls-core.exp: native: load core file
PASS: gdb.threads/tls-core.exp: native: print thread-local storage variable
here, and:
> to local testing and:
>
> UNSUPPORTED: gdb.threads/tls-core.exp: generate native core dump
> UNSUPPORTED: gdb.threads/tls-core.exp: load native corefile
> UNSUPPORTED: gdb.threads/tls-core.exp: print thread-local storage variable from native corefile
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?
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).
Maciej