On 10/20/2016 06:27 PM, Pedro Alves wrote: > On 10/19/2016 09:19 PM, Luis Machado wrote: > >> I was thinking of a way to test this and decided to exercise everything >> against an invalid sysroot (by always passing 'set sysroot >> ' and i noticed quite a few segmentation faults >> ocurring in 10+ tests. >> >> Now we know things are broken and we know how to show that, but i'm >> wondering if we want to re-run tests with an invalid sysroot or if the >> manual testing with a sysroot override is enough. > > I think we should have some representative test that always runs, > without requiring manual testing. > >> >> I could add a loop to each test that is failing, but, though that >> exercises and shows the failure, it sounds like a waste of time to >> repeat those tests. > > Yeah. > >> >> I could also pick one candidate and isolate that in a test, but i'm not >> yet sure if all those 10+ failures fail for the same exact reason. >> >> Suggestions? > > I think it is sufficient to have one representative test for > each reasons (or reasons). Whether that is a new separate testcase > or whether we reuse some existing testcase, I guess depends on how > complicated the test needs to be. If trivial, maybe go for separate, > focused test. If a lot of test set up is needed, e.g., to get the > inferior to the state that triggers the bug), might make sense to > reuse some existing testcase. > > >> >> These are the failing tests: >> >> gdb.base/catch-syscall.exp >> gdb.base/execl-update-breakpoints.exp >> gdb.base/foll-exec-mode.exp >> gdb.base/foll-exec.exp >> gdb.base/foll-vfork.exp >> gdb.base/pie-execl.exp >> gdb.linespec/explicit.exp >> gdb.multi/bkpt-multi-exec.exp >> gdb.python/py-finish-breakpoint.exp >> gdb.threads/execl.exp >> gdb.threads/non-ldr-exc-1.exp >> gdb.threads/non-ldr-exc-2.exp >> gdb.threads/non-ldr-exc-3.exp >> gdb.threads/non-ldr-exc-4.exp >> gdb.threads/thread-execl.exp > > The obvious pattern here is that these are tests that exec. :-) > gdb.linespec/explicit.exp fails for an unrelated reason. It times out for me too, which is strange. Anyway, i came up with a small test mostly copied from gdb.base/foll-exec.exp. It does only one test to make sure gdb survives the exec event with crashing. I've confirmed it shows 1 FAIL without the attached patch and full passes with the patch applied. How does the test (and patch) look now?