Author: janderwald Date: Tue Nov 14 15:58:52 2006 New Revision: 24751
URL: http://svn.reactos.org/svn/reactos?rev=24751&view=rev Log: - update svn properties - improve error checking - return -2 when the test fails - add a few test configs (required for sysregtest target)
Added: trunk/reactos/tools/sysreg/runonce.cfg trunk/reactos/tools/sysreg/secstage.cfg trunk/reactos/tools/sysreg/txtmode.cfg (with props) Modified: trunk/reactos/tools/sysreg/ (props changed) trunk/reactos/tools/sysreg/rosboot_test.cpp trunk/reactos/tools/sysreg/sysreg.cpp
Propchange: trunk/reactos/tools/sysreg/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue Nov 14 15:58:52 2006 @@ -1,8 +1,10 @@ +cdmake *.coff +*.d *.exe -*.d -*.a *.o *.sym -*.map -*.tmp +*.dsp +*.dsw +*.ncb +*.opt
Modified: trunk/reactos/tools/sysreg/rosboot_test.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/rosboot_test.c... ============================================================================== --- trunk/reactos/tools/sysreg/rosboot_test.cpp (original) +++ trunk/reactos/tools/sysreg/rosboot_test.cpp Tue Nov 14 15:58:52 2006 @@ -325,15 +325,21 @@ OsSupport::ProcessID pid = OsSupport::createProcess ((TCHAR*)boot_cmd.c_str (), 0, NULL);
string::size_type pipe_pos = boot_cmd.find (_T("serial pipe:")); - pipe_pos += 12; - string::size_type pipe_pos_end = boot_cmd.find (_T(" "), pipe_pos); - if (pipe_pos != string::npos && pipe_pos > 0 && pipe_pos < boot_cmd.size()) - { - pipecmd = _T("\\.\pipe\") + boot_cmd.substr (pipe_pos, pipe_pos_end - pipe_pos); - } - else - { - return false; + + if (pipe_pos != string::npos) + { + pipe_pos += 12; + string::size_type pipe_pos_end = boot_cmd.find (_T(" "), pipe_pos); + if (pipe_pos != string::npos && pipe_pos > 0 && pipe_pos < boot_cmd.size()) + { + pipecmd = _T("\\.\pipe\") + boot_cmd.substr (pipe_pos, pipe_pos_end - pipe_pos); + } + } + + if (!pipecmd.length ()) + { + //FIXME + pipecmd = _T("\\.\pipe\vmwaredebug"); }
if (m_Delayread) @@ -355,27 +361,31 @@
bool ret = true; vector<string> vect; - + size_t lines = 0; while(1) { if (isTimeout(m_Timeout)) { break; } - - if (namedpipe_reader.readPipe (vect) != 0) - { - DebugState state = checkDebugData(vect); - if (state == DebugStateBSODDetected || state == DebugStateUMEDetected) - { - ret = false; - break; - } - else if (state == DebugStateCPReached) - { - break; - } - } + size_t line_count = namedpipe_reader.readPipe (vect); + if (!line_count) + { + cerr << "No data read" << endl; + continue; + } + + DebugState state = checkDebugData(vect); + if (state == DebugStateBSODDetected || state == DebugStateUMEDetected) + { + ret = false; + break; + } + else if (state == DebugStateCPReached) + { + break; + } + lines += line_count; } namedpipe_reader.closePipe (); _sleep(3* CLOCKS_PER_SEC);
Added: trunk/reactos/tools/sysreg/runonce.cfg URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/runonce.cfg?re... ============================================================================== --- trunk/reactos/tools/sysreg/runonce.cfg (added) +++ trunk/reactos/tools/sysreg/runonce.cfg Tue Nov 14 15:58:52 2006 @@ -1,0 +1,117 @@ + ; ROS_OUTPUT +; +; This variable sets the location where to search symbol files for modules +; This is required when tracing usermode exceptions, bsod etc... +; +; If this value is not defined, sysreg looks for the environment variable +; ROS_OUTPUT. If this is also not set, it uses the default output-i386 + +ROS_OUTPUT=D:\reactos\output-i386 + +; ROS_ADDR2LINE +; +; This value is used by the symbol resolver to convert an module address into +; an source file + line number; +; +; Note: The symbol resolver appends the modulename and the module address seperated by an space + +ROS_ADDR2LINE=addr2line.exe --exe= + +;----------------------------------------------------------------------------------------- +; RosBoot specific settings +; + +; +; ROSBOOT_CMD +; +; This value is the command which is executed to gain debugging data +; this value is mandatory + +ROSBOOT_CMD=D:\reactos\qemu\qemu.exe -serial pipe:qemu -boot c -m 128 -L D:\reactos\qemu\ D:\reactos\RosVM.vmdk -pidfile pid.txt + +; +; ROSBOOT_PIDFILE +; +; This option stores the pid of the emulator process in a text file. +; + +ROSBOOT_PID_FILE=pid.txt + +; +; ROSBOOT_DEBUG_PORT +; +; This variable controls on where to look for debugging data. If the +; value is set to file, then sysreg will execute ROSBOOT_CMD and also +; open the file specified in ROSBOOT_DEBUG_FILE and read the debugging info from the file +; +; If the value is set to pipe, then sysreg will read from pipe created by the +; ROSBOOT_CMD +; +;ROSBOOT_DEBUG_PORT=file +ROSBOOT_DEBUG_PORT=pipe + +; +; ROSBOOT_DEBUG_FILE +; +; This value specifies the debug file. This variable must be set when using +; ROSBOOT_DEBUG_PORT=file +; +; Note: when ROSBOOT_DEBUG_PORT is set to pipe, then sysreg will write all received +; debug data to the specified debug file +; + +;ROSBOOT_DEBUG_FILE=D:\ReactOS\tools\sysreg\bsdebug.log +;ROSBOOT_DEBUG_FILE=D:\ReactOS\tools\sysreg\debug.log + +; ROSBOOT_DELAY_READ; +; +; When the emulator is started, it spends a little time loading and running through its +; BIOS. This time delays reading from the pipe/file untill the specified value +; +; the value is in seconds +; +; Note: if the value is not provided, then reading debug info is started immediately + +ROSBOOT_DELAY_READ=4 + + + +; ROSBOOT_TIME_OUT +; +; This variable is the maximum runtime of the ROSBOOT_CMD. If the command +; runs longer than this value, sysreg exits with success mode; +; +; Note: if you set the variable ROSBOOT_CHECK_POINT and the checkpoint is not reached +; within this time, sysreg exits with failure mode +; +; If the variable is not set, the default timeout is 1 minute +; +ROSBOOT_TIME_OUT=180.0 + +; ROSBOOT_CHECK_POINT +; +; RosBoot will stop executing when it finds a string in the form +; SYSREG_CHECKPOINT:CP_NAME +; +; CP_NAME is the value of the ROSBOOT_CHECK_POINT variable + +ROSBOOT_CHECK_POINT=THIRDBOOT_COMPLETE + +; ROSBOOT_CRITICAL_APP +; +; If an user-mode exception occurs in an critical application, i.e. setup.exe / explorer.exe, sysreg will report +; that the test has failed and quit debugging immediately +; +; if an user-mode exception occurs in any other application, sysreg will report the exception but the exception +; has no effect on the test result +; +; Note: if the value is set to IGNORE, sysreg will ignore all user-mode exceptions +; +; Note: if the variable is not set, then sysreg will stop on the first user-mode exception +; +; seperate each application with an space + + +ROSBOOT_CRITICAL_APP=setup.exe userinit.exe smss.exe winlogon.exe csrss.exe explorer.exe +;ROSBOOT_CRITICAL_APP=setup.exe userinit.exe smss.exe winlogon.exe csrss.exe explorer.exe lsass.exe +
Added: trunk/reactos/tools/sysreg/secstage.cfg URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/secstage.cfg?r... ============================================================================== --- trunk/reactos/tools/sysreg/secstage.cfg (added) +++ trunk/reactos/tools/sysreg/secstage.cfg Tue Nov 14 15:58:52 2006 @@ -1,0 +1,118 @@ + ; ROS_OUTPUT +; +; This variable sets the location where to search symbol files for modules +; This is required when tracing usermode exceptions, bsod etc... +; +; If this value is not defined, sysreg looks for the environment variable +; ROS_OUTPUT. If this is also not set, it uses the default output-i386 + +ROS_OUTPUT=D:\reactos\output-i386 + +; ROS_ADDR2LINE +; +; This value is used by the symbol resolver to convert an module address into +; an source file + line number; +; +; Note: The symbol resolver appends the modulename and the module address seperated by an space + +ROS_ADDR2LINE=addr2line.exe --exe= + +;----------------------------------------------------------------------------------------- +; RosBoot specific settings +; + +; +; ROSBOOT_CMD +; +; This value is the command which is executed to gain debugging data +; this value is mandatory + +ROSBOOT_CMD=D:\reactos\qemu\qemu.exe -serial pipe:qemu -boot c -m 128 -L D:\reactos\qemu\ D:\reactos\RosVM.vmdk -pidfile pid.txt + +; +; ROSBOOT_PIDFILE +; +; This option stores the pid of the emulator process in a text file. +; + +ROSBOOT_PID_FILE=pid.txt + +; +; ROSBOOT_DEBUG_PORT +; +; This variable controls on where to look for debugging data. If the +; value is set to file, then sysreg will execute ROSBOOT_CMD and also +; open the file specified in ROSBOOT_DEBUG_FILE and read the debugging info from the file +; +; If the value is set to pipe, then sysreg will read from pipe created by the +; ROSBOOT_CMD +; +;ROSBOOT_DEBUG_PORT=file +ROSBOOT_DEBUG_PORT=pipe + +; +; ROSBOOT_DEBUG_FILE +; +; This value specifies the debug file. This variable must be set when using +; ROSBOOT_DEBUG_PORT=file +; +; Note: when ROSBOOT_DEBUG_PORT is set to pipe, then sysreg will write all received +; debug data to the specified debug file +; + +;ROSBOOT_DEBUG_FILE=D:\ReactOS\tools\sysreg\bsdebug.log +;ROSBOOT_DEBUG_FILE=D:\ReactOS\tools\sysreg\debug.log + +; ROSBOOT_DELAY_READ; +; +; When the emulator is started, it spends a little time loading and running through its +; BIOS. This time delays reading from the pipe/file untill the specified value +; +; the value is in seconds +; +; Note: if the value is not provided, then reading debug info is started immediately + +ROSBOOT_DELAY_READ=4 + + + +; ROSBOOT_TIME_OUT +; +; This variable is the maximum runtime of the ROSBOOT_CMD. If the command +; runs longer than this value, sysreg exits with success mode; +; +; Note: if you set the variable ROSBOOT_CHECK_POINT and the checkpoint is not reached +; within this time, sysreg exits with failure mode +; +; If the variable is not set, the default timeout is 1 minute +; +ROSBOOT_TIME_OUT=180.0 + +; ROSBOOT_CHECK_POINT +; +; RosBoot will stop executing when it finds a string in the form +; SYSREG_CHECKPOINT:CP_NAME +; +; CP_NAME is the value of the ROSBOOT_CHECK_POINT variable + +ROSBOOT_CHECK_POINT=SYSSETUP_COMPLETE + + +; ROSBOOT_CRITICAL_APP +; +; If an user-mode exception occurs in an critical application, i.e. setup.exe / explorer.exe, sysreg will report +; that the test has failed and quit debugging immediately +; +; if an user-mode exception occurs in any other application, sysreg will report the exception but the exception +; has no effect on the test result +; +; Note: if the value is set to IGNORE, sysreg will ignore all user-mode exceptions +; +; Note: if the variable is not set, then sysreg will stop on the first user-mode exception +; +; seperate each application with an space + + +ROSBOOT_CRITICAL_APP=setup.exe userinit.exe smss.exe winlogon.exe csrss.exe explorer.exe +;ROSBOOT_CRITICAL_APP=setup.exe userinit.exe smss.exe winlogon.exe csrss.exe explorer.exe lsass.exe +
Modified: trunk/reactos/tools/sysreg/sysreg.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/sysreg.cpp?rev... ============================================================================== --- trunk/reactos/tools/sysreg/sysreg.cpp (original) +++ trunk/reactos/tools/sysreg/sysreg.cpp Tue Nov 14 15:58:52 2006 @@ -97,6 +97,7 @@ else { cout << "The regression test " << regtest->getName () << " failed" << endl; + return -2; }
return 0;
Added: trunk/reactos/tools/sysreg/txtmode.cfg URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/txtmode.cfg?re... ============================================================================== --- trunk/reactos/tools/sysreg/txtmode.cfg (added) +++ trunk/reactos/tools/sysreg/txtmode.cfg Tue Nov 14 15:58:52 2006 @@ -1,0 +1,119 @@ + ; ROS_OUTPUT +; +; This variable sets the location where to search symbol files for modules +; This is required when tracing usermode exceptions, bsod etc... +; +; If this value is not defined, sysreg looks for the environment variable +; ROS_OUTPUT. If this is also not set, it uses the default output-i386 + +ROS_OUTPUT=D:\reactos\output-i386 + +; ROS_ADDR2LINE +; +; This value is used by the symbol resolver to convert an module address into +; an source file + line number; +; +; Note: The symbol resolver appends the modulename and the module address seperated by an space + +ROS_ADDR2LINE=addr2line.exe --exe= + +;----------------------------------------------------------------------------------------- +; RosBoot specific settings +; + +; +; ROSBOOT_CMD +; +; This value is the command which is executed to gain debugging data +; this value is mandatory + +ROSBOOT_CMD=D:\reactos\qemu\qemu.exe -serial pipe:qemu -boot d -m 128 -L D:\reactos\qemu\ D:\reactos\RosVM.vmdk -cdrom D:\Reactos\ReactOS-RegTest.iso -pidfile pid.txt + +; +; ROSBOOT_PIDFILE +; +; This option stores the pid of the emulator process in a text file. +; + +ROSBOOT_PID_FILE=pid.txt + +; +; ROSBOOT_DEBUG_PORT +; +; This variable controls on where to look for debugging data. If the +; value is set to file, then sysreg will execute ROSBOOT_CMD and also +; open the file specified in ROSBOOT_DEBUG_FILE and read the debugging info from the file +; +; If the value is set to pipe, then sysreg will read from pipe created by the +; ROSBOOT_CMD +; +;ROSBOOT_DEBUG_PORT=file +ROSBOOT_DEBUG_PORT=pipe + +; +; ROSBOOT_DEBUG_FILE +; +; This value specifies the debug file. This variable must be set when using +; ROSBOOT_DEBUG_PORT=file +; +; Note: when ROSBOOT_DEBUG_PORT is set to pipe, then sysreg will write all received +; debug data to the specified debug file +; + +;ROSBOOT_DEBUG_FILE=D:\ReactOS\tools\sysreg\bsdebug.log +;ROSBOOT_DEBUG_FILE=D:\ReactOS\tools\sysreg\debug.log + +; ROSBOOT_DELAY_READ; +; +; When the emulator is started, it spends a little time loading and running through its +; BIOS. This time delays reading from the pipe/file untill the specified value +; +; the value is in seconds +; +; Note: if the value is not provided, then reading debug info is started immediately + +ROSBOOT_DELAY_READ=4 + + + +; ROSBOOT_TIME_OUT +; +; This variable is the maximum runtime of the ROSBOOT_CMD. If the command +; runs longer than this value, sysreg exits with success mode; +; +; Note: if you set the variable ROSBOOT_CHECK_POINT and the checkpoint is not reached +; within this time, sysreg exits with failure mode +; +; If the variable is not set, the default timeout is 1 minute +; +ROSBOOT_TIME_OUT=180.0 + +; ROSBOOT_CHECK_POINT +; +; RosBoot will stop executing when it finds a string in the form +; SYSREG_CHECKPOINT:CP_NAME +; +; CP_NAME is the value of the ROSBOOT_CHECK_POINT variable + +ROSBOOT_CHECK_POINT=USETUP_COMPLETE +;ROSBOOT_CHECK_POINT=SYSSETUP_COMPLETE +;ROSBOOT_CHECK_POINT=THIRDBOOT_COMPLETE + +; ROSBOOT_CRITICAL_APP +; +; If an user-mode exception occurs in an critical application, i.e. setup.exe / explorer.exe, sysreg will report +; that the test has failed and quit debugging immediately +; +; if an user-mode exception occurs in any other application, sysreg will report the exception but the exception +; has no effect on the test result +; +; Note: if the value is set to IGNORE, sysreg will ignore all user-mode exceptions +; +; Note: if the variable is not set, then sysreg will stop on the first user-mode exception +; +; seperate each application with an space + + +ROSBOOT_CRITICAL_APP=setup.exe userinit.exe smss.exe winlogon.exe csrss.exe explorer.exe +;ROSBOOT_CRITICAL_APP=setup.exe userinit.exe smss.exe winlogon.exe csrss.exe explorer.exe lsass.exe +
Propchange: trunk/reactos/tools/sysreg/txtmode.cfg ------------------------------------------------------------------------------ svn:eol-style = native