On Thu, Apr 4, 2013 at 7:52 AM, Kornel Benko <kor...@lyx.org> wrote: > Am Donnerstag, 4. April 2013 um 07:38:55, schrieb Scott Kostyshak > <skost...@lyx.org> > >> On Thu, Apr 4, 2013 at 7:23 AM, Kornel Benko <kor...@lyx.org> wrote: > >> > Am Donnerstag, 4. April 2013 um 07:13:35, schrieb Scott Kostyshak > >> > <skost...@lyx.org> > >> > > >> >> On Thu, Apr 4, 2013 at 7:00 AM, Kornel Benko <kor...@lyx.org> wrote: > >> > > >> >> > Am Donnerstag, 4. April 2013 um 12:32:19, schrieb Scott Kostyshak > >> > > >> >> > <skost...@lyx.org> > >> > > >> >> > > >> > > >> >> >> > >> > > >> >> > > >> > > >> >> >> commit 36da271b74784b77b54bfe2f0bc62624f9ce0345 > >> > > >> >> > > >> > > >> >> >> Author: Scott Kostyshak <skost...@lyx.org> > >> > > >> >> > > >> > > >> >> >> Date: Thu Apr 4 06:28:53 2013 -0400 > >> > > >> >> > > >> > > >> >> >> > >> > > >> >> > > >> > > >> >> >> Add test for #8370 (not yet fixed) > >> > > >> >> > > >> > > >> >> >> > >> > > >> >> > > >> > > >> >> > > >> > > >> >> > > >> > > >> >> > This test passes here. No new core-file around. > >> > > >> >> > >> > > >> >> Strange. When you follow the instructions manually can you reproduce? > >> > > >> >> http://www.lyx.org/trac/ticket/8370#comment:8 > >> > > >> > > >> > > >> > I can reproduce manually. Now there _is_ a core. And also > >> > bug-8370.lyx.emergency, > >> > > >> > which was there from the automatic test too. We could check for the > >> > existence > >> > > >> > of this file. > >> > >> Yes, that seems like a good idea. It would also be nice to figure out > >> why the tests are reporting as passed if they create a core and a > >> .emergency file for you. From what I remember, the test returns failed > >> if when it checks to see if LyX is still running, it is not (and thus > >> it assumes a pre-mature exit). Can you try running the test with a > >> pause after the crash should have been triggered? This should give > >> some more time for LyX to disappear so that the test realizes it is > >> gone and that the test should fail. If that's not the case, then I'm > >> not sure what's going on. Somehow the LyX process must still be > >> sticking around. Or at least the PID maybe? > >> > >> Scott > > > > Inserting "Sleep 1" above "TestEnd" makes the test fail here. > > Funny thing is, that now even without the "Sleep", the test is now failing. > > BUT, if I remove the core first, then the test passes. > > (in one of three tries)
I guess this means that the time it takes to remove the previous core is just enough to make it sometimes fail. > With the Sleep it failes all the time (tried 10 times) OK. I haven't looked at the code but I'm guessing there's already a delay in-between the last command and when the PID is tested. We could increase that. If it's not there, we could add it. I wonder if a better way of doing this is to put the burden of exiting LyX on the test. For example, each test could simply execute 'lyx-quit' at the end. We would have to deal with the "Save changed document?" dialog by executing a tab (to get to "Discard") and return. We could then use the 'wait' command. It seems that this would simplify things a lot. The 'wait' command has two advantages: (1) We don't have to manually check the PID (which we saw gives problems) and (2) We can get the return code. I don't know if that's better or worse. But that's the only alternative I can think of. Scott