Re: Re: Re: Re: [PATCH] Add an autotest for #8523 (but how can I get a path for a helper lyx file?)
Am Sonntag, 27. Januar 2013 um 09:12:44, schrieb Kornel Benko kor...@lyx.org I would change the file, there is also no need to remove, on next test it will be overwritten anyway and we can check the result too. TestBegin ../bug-8523.lyx lyx-log.txt 21 KK: \[Home] KK: some text KK: \Ax KK: buffer-save\[Return] TestEnd It does not work here either. 1.) should be 'buffer-write' 2.) there is no crash 3.) I had to insert [Return] manually 4.) Even then, it changes the lyx-file only now and then Kornel# regression in branch: SIGSEGV when saving with a module that doesn't exist (#8523) # Lang en_EN.utf8 TestBegin ../bug-8523.lyx -dbg any lyx-log.txt 21 #Sleep 6 KK: \[Return]\[Return]\[Return]\[Return] KK: \[Return]\[Return]\[Return]\[Return] Sleep 3 KK: \[Home] KK: some text KK: \Ax KK: buffer-write\[Return]\[Return] TestEnd # This script invokes the keytest.py script with the simple set-up needed # to re-run deterministic regression tests that one would like to have. # # AUTOTEST_ROOT = ${LYX_ROOT}/development/autotests # KEYTEST_INFILE = xxx-in.txt # KEYTEST_OUTFILE = xxx-out.txt # BINDIR = ${BUILD_DIR}/bin # WORKDIR = ${BUILD_DIR}/autotests/out-home # LOCALE_DIR = ${BUILD_DIR}/autotests/locale # PO_BUILD_DIR= ${BUILD_DIR}/po # PACKAGE = lyx2.1 # # Script should be called like: # cmake -DAUTOTEST_ROOT= \ # -DKEYTEST_INFILE= \ # -DKEYTEST_OUTFILE=xxx \ # -DBINDIR=xxx \ # -DLYX=xxx \ # -DWORKDIR=xxx \ # -DLOCALE_DIR=xxx \ # -DPO_BUILD_DIR=xxx \ # -DPACKAGE=xxx \ # -P ${AUTOTEST_ROOT}/single-test.cmake set(KEYTEST ${AUTOTEST_ROOT}/keytest.py) execute_process(COMMAND pidof ${LYX} OUTPUT_VARIABLE LYX_PID RESULT_VARIABLE pidstat OUTPUT_VARIABLE pidres) message(STATUS pidres = ${pidres}) if (NOT pidstat) # lyx already running, remove trailing '\n' from pid string(REGEX REPLACE \n pidres ${pidres}) execute_process(COMMAND wmctrl -l -p OUTPUT_VARIABLE _wmco) string(REGEX REPLACE [\n]+ ; _wmc ${_wmco}) foreach(_w ${_wmc}) string(REGEX MATCH ${pidres} _wr ${_w}) if (${_wr} MATCHES ${pidres}) # this entry contains the pid, go search for X11-window-id string(REGEX REPLACE .* _wr ${_w}) set(LYX_WINDOW_NAME ${_wr}) message(STATUS Set LYX_WINDOW_NAME to ${_wr}) endif() endforeach() else() set(pidres ) set(LYX_WINDOW_NAME ) endif() set(LYX_EXE ${BINDIR}/${LYX}) set(XVKBD_EXE ${BINDIR}/xvkbd) set(ENV{XVKBD_HACKED} 1) if(EXISTS ${WORKDIR}/.lyx/session) execute_process(COMMAND ${CMAKE_COMMAND} -E remove -f ${WORKDIR}/.lyx/session) endif() # Environments needed by keytest.py set(ENV{PACKAGE} ${PACKAGE}) set(ENV{LOCALE_DIR} ${LOCALE_DIR}) set(ENV{LYX_LOCALEDIR} ${WORKDIR}/../locale) set(ENV{LYX_USERDIR} ${WORKDIR}/.lyx) set(ENV{LYX_PID} ${pidres}) set(ENV{LYX_WINDOW_NAME} ${LYX_WINDOW_NAME}) set(ENV{LYX_EXE} ${LYX_EXE}) set(ENV{LYX} ${LYX}) set(ENV{XVKBD_EXE} ${XVKBD_EXE}) set(ENV{KEYTEST_INFILE} ${AUTOTEST_ROOT}/${KEYTEST_INFILE}) set(ENV{KEYTEST_OUTFILE} ${WORKDIR}/${KEYTEST_OUTFILE}) set(ENV{PO_BUILD_DIR} ${PO_BUILD_DIR}) set(ENV{MAX_DROP} 0) set(ENV{MAX_LOOPS} 1) file(GLOB _testfiles RELATIVE ${WORKDIR} test*.* #test*.*) if(_testfiles) # remove some leftover files from previous test execute_process( COMMAND ${CMAKE_COMMAND} -E remove -f ${_testfiles} ) endif() string(REGEX REPLACE -in\\.(txt|sh$) _jj ${KEYTEST_INFILE}) if(EXISTS ${AUTOTEST_ROOT}/${_jj}.lyx) configure_file(${AUTOTEST_ROOT}/${_jj}.lyx ${WORKDIR}/../${_jj}.lyx COPYONLY) endif() execute_process( COMMAND python ${KEYTEST} RESULT_VARIABLE KEYTEST_RES) if(KEYTEST_RES) message(FATAL_ERROR KEYTEST failed: KEYTEST_RES=${KEYTEST_RES}) endif() signature.asc Description: This is a digitally signed message part.
Re: Re: Re: Re: [PATCH] Add an autotest for #8523 (but how can I get a path for a helper lyx file?)
Am Sonntag, 27. Januar 2013 um 03:59:49, schrieb Scott Kostyshak skost...@lyx.org ... OK, I will change this. I am in the habit of writing copies of the form cp filename folder1/folder2/ because (1) this prevents type errors such as cp filename folder1/folder2/fielname and (2) the reader of the code doesn't have to check whether the two filenames are exactly the same. But I guess with this form there are concerns that filename could overwrite folder2? cmake --help-command configure_file -- configure_file(input output if output is a directory, I would not count on working in later versions of cmake. And who knows how all the cmake-supported OS may react. ... I don't understand. First, on opening bug-8523.lyx you should immediately see a warning which must be addressed. This is where the \[Return] works if XVKBD_HACKED is not automatically set. I will check. Also, I don't see a way around saving to another file because that is what triggers the bug. I missed that. Thanks a lot for reviewing the patches, Scott Kornel signature.asc Description: This is a digitally signed message part.
Re: Re: Re: Re: [PATCH] Add an autotest for #8523 (but how can I get a path for a helper lyx file?)
On Sun, Jan 27, 2013 at 4:13 AM, Kornel Benko kor...@lyx.org wrote: Am Sonntag, 27. Januar 2013 um 03:59:49, schrieb Scott Kostyshak skost...@lyx.org ... OK, I will change this. I am in the habit of writing copies of the form cp filename folder1/folder2/ because (1) this prevents type errors such as cp filename folder1/folder2/fielname and (2) the reader of the code doesn't have to check whether the two filenames are exactly the same. But I guess with this form there are concerns that filename could overwrite folder2? cmake --help-command configure_file -- configure_file(input output if output is a directory, I would not count on working in later versions of cmake. That command explains it: If output names an existing directory the input file is placed in that directory with its original name. And who knows how all the cmake-supported OS may react. True, this is the most important. I will change it to your suggestion. ... I don't understand. First, on opening bug-8523.lyx you should immediately see a warning which must be addressed. This is where the \[Return] works if XVKBD_HACKED is not automatically set. I will check. I will be interested to see if you can reproduce the difference I have. Scott
Re: Re: Re: Re: Re: [PATCH] Add an autotest for #8523 (but how can I get a path for a helper lyx file?)
Am Sonntag, 27. Januar 2013 um 10:13:59, schrieb Kornel Benko kor...@lyx.org I don't understand. First, on opening bug-8523.lyx you should immediately see a warning which must be addressed. This is where the \[Return] works if XVKBD_HACKED is not automatically set. I will check. Looks sometimes same here. I mean, the first time it worked, like you describe, but on later tests I had to manually insert [Return] again. Also, I don't see a way around saving to another file because that is what triggers the bug. I missed that. I got the crash if called manually. Once. I am not able to get the crash again Thanks a lot for reviewing the patches, Scott Kornel signature.asc Description: This is a digitally signed message part.
Re: Re: Re: Re: Re: [PATCH] Add an autotest for #8523 (but how can I get a path for a helper lyx file?)
Am Sonntag, 27. Januar 2013 um 04:42:25, schrieb Scott Kostyshak skost...@lyx.org if output is a directory, I would not count on working in later versions of cmake. That command explains it: If output names an existing directory the input file is placed in that directory with its original name. You are right. Kornel signature.asc Description: This is a digitally signed message part.
Re: Re: Re: Re: Re: [PATCH] Add an autotest for #8523 (but how can I get a path for a helper lyx file?)
On Sun, Jan 27, 2013 at 4:45 AM, Kornel Benko kor...@lyx.org wrote: Am Sonntag, 27. Januar 2013 um 10:13:59, schrieb Kornel Benko kor...@lyx.org I don't understand. First, on opening bug-8523.lyx you should immediately see a warning which must be addressed. This is where the \[Return] works if XVKBD_HACKED is not automatically set. I will check. Looks sometimes same here. I mean, the first time it worked, like you describe, but on later tests I had to manually insert [Return] again. Also, I don't see a way around saving to another file because that is what triggers the bug. I missed that. I got the crash if called manually. Once. I am not able to get the crash again Maybe I should stop trying to get this test to work. I don't think that tests should be this complicated. I'm very glad that we are implementing the option of using an existing LyX file because I think that this will be useful for a lot of tests in the future. But this particular test seems fragile and no one has confirmed that they can reliably reproduce the crash besides me. Scott
Re: Re: Re: Re: Re: Re: [PATCH] Add an autotest for #8523 (but how can I get a path for a helper lyx file?)
Am Sonntag, 27. Januar 2013 um 04:51:53, schrieb Scott Kostyshak skost...@lyx.org I got the crash if called manually. Once. I am not able to get the crash again Maybe I should stop trying to get this test to work. I don't think that tests should be this complicated. I'm very glad that we are implementing the option of using an existing LyX file because I think that this will be useful for a lot of tests in the future. But this particular test seems fragile and no one has confirmed that they can reliably reproduce the crash besides me. Scott OK then. Please commit corrected single-test.cmake. Kornel signature.asc Description: This is a digitally signed message part.
Re: Re: Re: Re: Re: Re: [PATCH] Add an autotest for #8523 (but how can I get a path for a helper lyx file?)
On Sun, Jan 27, 2013 at 4:56 AM, Kornel Benko kor...@lyx.org wrote: Am Sonntag, 27. Januar 2013 um 04:51:53, schrieb Scott Kostyshak skost...@lyx.org I got the crash if called manually. Once. I am not able to get the crash again Maybe I should stop trying to get this test to work. I don't think that tests should be this complicated. I'm very glad that we are implementing the option of using an existing LyX file because I think that this will be useful for a lot of tests in the future. But this particular test seems fragile and no one has confirmed that they can reliably reproduce the crash besides me. Scott OK then. Please commit corrected single-test.cmake. It's in. Thanks, Scott
Re: Re: Re: Re: [PATCH] Add an autotest for #8523 (but how can I get a path for a helper lyx file?)
Am Sonntag, 27. Januar 2013 um 09:12:44, schrieb Kornel Benko> I would change the file, there is also no need to remove, on next test it > will be overwritten anyway > and we can check the result too. > > TestBegin ../bug-8523.lyx > lyx-log.txt 2>&1 > KK: \[Home] > KK: some text > KK: \Ax > KK: buffer-save\[Return] > TestEnd > It does not work here either. 1.) should be 'buffer-write' 2.) there is no crash 3.) I had to insert [Return] manually 4.) Even then, it changes the lyx-file only now and then Kornel# regression in branch: SIGSEGV when saving with a module that doesn't exist (#8523) # Lang en_EN.utf8 TestBegin ../bug-8523.lyx -dbg any > lyx-log.txt 2>&1 #Sleep 6 KK: \[Return]\[Return]\[Return]\[Return] KK: \[Return]\[Return]\[Return]\[Return] Sleep 3 KK: \[Home] KK: some text KK: \Ax KK: buffer-write\[Return]\[Return] TestEnd # This script invokes the keytest.py script with the simple set-up needed # to re-run deterministic regression tests that one would like to have. # # AUTOTEST_ROOT = ${LYX_ROOT}/development/autotests # KEYTEST_INFILE = xxx-in.txt # KEYTEST_OUTFILE = xxx-out.txt # BINDIR = ${BUILD_DIR}/bin # WORKDIR = ${BUILD_DIR}/autotests/out-home # LOCALE_DIR = ${BUILD_DIR}/autotests/locale # PO_BUILD_DIR= ${BUILD_DIR}/po # PACKAGE = lyx2.1 # # Script should be called like: # cmake -DAUTOTEST_ROOT= \ # -DKEYTEST_INFILE= \ # -DKEYTEST_OUTFILE=xxx \ # -DBINDIR=xxx \ # -DLYX=xxx \ # -DWORKDIR=xxx \ # -DLOCALE_DIR=xxx \ # -DPO_BUILD_DIR=xxx \ # -DPACKAGE=xxx \ # -P ${AUTOTEST_ROOT}/single-test.cmake set(KEYTEST "${AUTOTEST_ROOT}/keytest.py") execute_process(COMMAND pidof ${LYX} OUTPUT_VARIABLE LYX_PID RESULT_VARIABLE pidstat OUTPUT_VARIABLE pidres) message(STATUS "pidres = ${pidres}") if (NOT pidstat) # lyx already running, remove trailing '\n' from pid string(REGEX REPLACE "\n" "" pidres ${pidres}) execute_process(COMMAND wmctrl -l -p OUTPUT_VARIABLE _wmco) string(REGEX REPLACE "[\n]+" ";" _wmc ${_wmco}) foreach(_w ${_wmc}) string(REGEX MATCH "${pidres}" _wr ${_w}) if (${_wr} MATCHES ${pidres}) # this entry contains the pid, go search for X11-window-id string(REGEX REPLACE " .*" "" _wr ${_w}) set(LYX_WINDOW_NAME ${_wr}) message(STATUS "Set LYX_WINDOW_NAME to ${_wr}") endif() endforeach() else() set(pidres "") set(LYX_WINDOW_NAME "") endif() set(LYX_EXE "${BINDIR}/${LYX}") set(XVKBD_EXE "${BINDIR}/xvkbd") set(ENV{XVKBD_HACKED} "1") if(EXISTS "${WORKDIR}/.lyx/session") execute_process(COMMAND ${CMAKE_COMMAND} -E remove -f "${WORKDIR}/.lyx/session") endif() # Environments needed by keytest.py set(ENV{PACKAGE} ${PACKAGE}) set(ENV{LOCALE_DIR} ${LOCALE_DIR}) set(ENV{LYX_LOCALEDIR} "${WORKDIR}/../locale") set(ENV{LYX_USERDIR} "${WORKDIR}/.lyx") set(ENV{LYX_PID} ${pidres}) set(ENV{LYX_WINDOW_NAME} ${LYX_WINDOW_NAME}) set(ENV{LYX_EXE} ${LYX_EXE}) set(ENV{LYX} ${LYX}) set(ENV{XVKBD_EXE} ${XVKBD_EXE}) set(ENV{KEYTEST_INFILE} "${AUTOTEST_ROOT}/${KEYTEST_INFILE}") set(ENV{KEYTEST_OUTFILE} "${WORKDIR}/${KEYTEST_OUTFILE}") set(ENV{PO_BUILD_DIR} "${PO_BUILD_DIR}") set(ENV{MAX_DROP} 0) set(ENV{MAX_LOOPS} 1) file(GLOB _testfiles RELATIVE "${WORKDIR}" "test*.*" "#test*.*") if(_testfiles) # remove some leftover files from previous test execute_process( COMMAND ${CMAKE_COMMAND} -E remove -f ${_testfiles} ) endif() string(REGEX REPLACE "-in\\.(txt|sh$)" "" _jj ${KEYTEST_INFILE}) if(EXISTS "${AUTOTEST_ROOT}/${_jj}.lyx") configure_file("${AUTOTEST_ROOT}/${_jj}.lyx" "${WORKDIR}/../${_jj}.lyx" COPYONLY) endif() execute_process( COMMAND python ${KEYTEST} RESULT_VARIABLE KEYTEST_RES) if(KEYTEST_RES) message(FATAL_ERROR "KEYTEST failed: KEYTEST_RES=${KEYTEST_RES}") endif() signature.asc Description: This is a digitally signed message part.
Re: Re: Re: Re: [PATCH] Add an autotest for #8523 (but how can I get a path for a helper lyx file?)
Am Sonntag, 27. Januar 2013 um 03:59:49, schrieb Scott Kostyshak... > OK, I will change this. I am in the habit of writing copies of the > form "cp filename folder1/folder2/" because (1) this prevents type > errors such as "cp filename folder1/folder2/fielname" and (2) the > reader of the code doesn't have to check whether the two filenames are > exactly the same. But I guess with this form there are concerns that > filename could overwrite folder2? cmake --help-command configure_file --> configure_file( if is a directory, I would not count on working in later versions of cmake. And who knows how all the cmake-supported OS may react. ... > > I don't understand. First, on opening bug-8523.lyx you should > immediately see a warning which must be addressed. This is where the > \[Return] works if XVKBD_HACKED is not automatically set. I will check. > Also, I > don't see a way around saving to another file because that is what > triggers the bug. I missed that. > Thanks a lot for reviewing the patches, > > Scott Kornel signature.asc Description: This is a digitally signed message part.
Re: Re: Re: Re: [PATCH] Add an autotest for #8523 (but how can I get a path for a helper lyx file?)
On Sun, Jan 27, 2013 at 4:13 AM, Kornel Benkowrote: > Am Sonntag, 27. Januar 2013 um 03:59:49, schrieb Scott Kostyshak > > > ... > > > >> OK, I will change this. I am in the habit of writing copies of the > >> form "cp filename folder1/folder2/" because (1) this prevents type > >> errors such as "cp filename folder1/folder2/fielname" and (2) the > >> reader of the code doesn't have to check whether the two filenames are > >> exactly the same. But I guess with this form there are concerns that > >> filename could overwrite folder2? > > > > cmake --help-command configure_file > > --> configure_file( > > if is a directory, I would not count on working in later versions > of cmake. That command explains it: "If names an existing directory the input file is placed in that directory with its original name." > > And who knows how all the cmake-supported OS may react. True, this is the most important. I will change it to your suggestion. > > > > ... > >> > >> I don't understand. First, on opening bug-8523.lyx you should > >> immediately see a warning which must be addressed. This is where the > >> \[Return] works if XVKBD_HACKED is not automatically set. > > > > I will check. I will be interested to see if you can reproduce the difference I have. Scott
Re: Re: Re: Re: Re: [PATCH] Add an autotest for #8523 (but how can I get a path for a helper lyx file?)
Am Sonntag, 27. Januar 2013 um 10:13:59, schrieb Kornel Benko> > > > I don't understand. First, on opening bug-8523.lyx you should > > immediately see a warning which must be addressed. This is where the > > \[Return] works if XVKBD_HACKED is not automatically set. > > I will check. Looks sometimes same here. I mean, the first time it worked, like you describe, but on later tests I had to manually insert [Return] again. > > Also, I > > don't see a way around saving to another file because that is what > > triggers the bug. > > I missed that. I got the crash if called manually. Once. I am not able to get the crash again > > Thanks a lot for reviewing the patches, > > > > Scott > Kornel signature.asc Description: This is a digitally signed message part.
Re: Re: Re: Re: Re: [PATCH] Add an autotest for #8523 (but how can I get a path for a helper lyx file?)
Am Sonntag, 27. Januar 2013 um 04:42:25, schrieb Scott Kostyshak> > if is a directory, I would not count on working in later versions > > of cmake. > > That command explains it: "If names an existing directory the > input file is placed in that directory with its original name." You are right. Kornel signature.asc Description: This is a digitally signed message part.
Re: Re: Re: Re: Re: [PATCH] Add an autotest for #8523 (but how can I get a path for a helper lyx file?)
On Sun, Jan 27, 2013 at 4:45 AM, Kornel Benkowrote: > Am Sonntag, 27. Januar 2013 um 10:13:59, schrieb Kornel Benko > > > > >> > > >> > I don't understand. First, on opening bug-8523.lyx you should > >> > immediately see a warning which must be addressed. This is where the > >> > \[Return] works if XVKBD_HACKED is not automatically set. > >> > >> I will check. > > > > Looks sometimes same here. I mean, the first time it worked, like you > describe, > > but on later tests I had to manually insert [Return] again. > > > >> > Also, I > >> > don't see a way around saving to another file because that is what > >> > triggers the bug. > >> > >> I missed that. > > > > I got the crash if called manually. Once. I am not able to get the crash > again > Maybe I should stop trying to get this test to work. I don't think that tests should be this complicated. I'm very glad that we are implementing the option of using an existing LyX file because I think that this will be useful for a lot of tests in the future. But this particular test seems fragile and no one has confirmed that they can reliably reproduce the crash besides me. Scott
Re: Re: Re: Re: Re: Re: [PATCH] Add an autotest for #8523 (but how can I get a path for a helper lyx file?)
Am Sonntag, 27. Januar 2013 um 04:51:53, schrieb Scott Kostyshak> > > > > > I got the crash if called manually. Once. I am not able to get the crash > > again > > > > Maybe I should stop trying to get this test to work. I don't think > that tests should be this complicated. I'm very glad that we are > implementing the option of using an existing LyX file because I think > that this will be useful for a lot of tests in the future. But this > particular test seems fragile and no one has confirmed that they can > reliably reproduce the crash besides me. > > Scott OK then. Please commit corrected single-test.cmake. Kornel signature.asc Description: This is a digitally signed message part.
Re: Re: Re: Re: Re: Re: [PATCH] Add an autotest for #8523 (but how can I get a path for a helper lyx file?)
On Sun, Jan 27, 2013 at 4:56 AM, Kornel Benkowrote: > Am Sonntag, 27. Januar 2013 um 04:51:53, schrieb Scott Kostyshak > > >> > > >> > > >> > I got the crash if called manually. Once. I am not able to get the crash > >> > again > >> > > >> > >> Maybe I should stop trying to get this test to work. I don't think > >> that tests should be this complicated. I'm very glad that we are > >> implementing the option of using an existing LyX file because I think > >> that this will be useful for a lot of tests in the future. But this > >> particular test seems fragile and no one has confirmed that they can > >> reliably reproduce the crash besides me. > >> > >> Scott > > > > OK then. Please commit corrected single-test.cmake. > It's in. Thanks, Scott