[RFC] [PATCH 0/1] Add untested for corefile tests

Christina Schimpe
2025-08-11T11:45:57Z

This is a patch to add UNTESTED for corefile tests in case an OS corefile is
not found or is not created. The discussion came up in this thread:

https://sourceware.org/pipermail/gdb-patches/2025-August/219807.html
and there are mixed opinions how we should treat this.

In my opinion, UNTESTED means that there is something wrong with the setup
and one should investigate, while UNSUPPORTED means it's acceptable for the
test to be skipped. However, I also understand Luis' feedback to add a FAIL,
since this strongly indicates that there is something we should look into.
However, if we test a patch and only check the new failures introduced by
the commit, there is a risk that someone might not realize he is not testing
core files at all.

We also have a wiki entry for this topic:
https://sourceware.org/gdb/wiki/TestingGDB

But it's also not completely clear on this specific question:
"GDB testsuite expects that corefile will be generated on the same folder of
the binary used on the test, when Apport is enabled, it can result in a FAIL/UNTESTED
since Apport collects the corefile generated and corefind function in GDB
testsuite is unable to find it".

In any case I think we should make this consistent in our testsuite and
I am looking forward to your feedback.

Christina

Christina Schimpe (1):
testsuite: add unsupported in case OS corefile is not found

gdb/testsuite/gdb.base/corefile.exp | 1 +
gdb/testsuite/gdb.base/corefile2.exp | 1 +
gdb/testsuite/gdb.base/corefile3.exp | 1 +
gdb/testsuite/gdb.base/many-headers.exp | 1 +
gdb/testsuite/gdb.mi/mi-corefile.exp | 1 +
gdb/testsuite/gdb.threads/corethreads.exp | 1 +
6 files changed, 6 insertions(+)

--
2.43.0