From 7ac4bb38ecbd81e20bf780fe6f3a9aec86f941f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janis=20Daniel=20Da=CC=88hne?= <janis.daehne2@student.uni-halle.de> Date: Mon, 29 Apr 2019 00:38:27 +0200 Subject: [PATCH] - fixes frontend nr. 120 - adds compiler timeout - and some cleanup --- api.php | 272 ++++++++++++++--------------------- bootstrap.php | 1 + constants.php | 50 ++++++- do_blackBoxTest_func.php | 49 ++++--- do_compareFilesTest_func.php | 41 ++++-- do_compileTest_func.php | 32 +++-- protocolHeaderPartParser.php | 2 +- readme.md | 80 ++++++----- stats/private.php | 7 +- stats/public.php | 7 +- 10 files changed, 294 insertions(+), 247 deletions(-) diff --git a/api.php b/api.php index 51e2564..4d8762e 100644 --- a/api.php +++ b/api.php @@ -89,6 +89,13 @@ if ($hardGlobalTimeoutInMs === NULL) { exit(1); } +$hardGlobalCompileTimeoutInMs = $config[$s_arg_hardCompileTimeoutInMs]; + +if ($hardGlobalCompileTimeoutInMs === NULL) { + output($status_code_InternalServerError, 'could not read global hard compile timeout in ms from config'); + exit(1); +} + $hardMemoryLimitInKb = $config[$s_arg_hardMemoryLimitInKb]; if ($hardMemoryLimitInKb === NULL) { @@ -272,23 +279,13 @@ foreach ($testCases as $test) { $missingArgument = $s_test_id; } - $result = array( - $s_testServerCode => $status_code_ArgumentInvalidOrMissing, - $s_testServerMessage => "argument '" . $missingArgument . "' missing", - $s_test_id => $testId, - $s_passed => FALSE, - $s_hasCompiled => FALSE, // all other errors returned before this line - - $s_programExitCode => NULL, - $s_runnerVersion => NULL, - $s_timeForCompiling => NULL, - $s_timeForUserProgram => NULL, - - $s_testResultCode => 100, # this is the result from the test runner program - $s_protocol => '', # the conversation protocol - - $s_output_test_server_version => $versionString, + $result = create_test_result($status_code_ArgumentInvalidOrMissing, "argument '" . $missingArgument . "' missing", $testId, + FALSE, FALSE, NULL, + NULL, NULL, NULL, + 100, '', + NULL, NULL ); + array_push($testResults, $result); continue; } @@ -299,22 +296,11 @@ foreach ($testCases as $test) { //check if valid/supported command if (!in_array($arg_command, $s_supportedCommands)) { - $result = array( - $s_testServerCode => $status_code_ArgumentInvalidOrMissing, - $s_testServerMessage => "unknown command, supported commands: [" . implode(', ', $s_supportedCommands) . ']', - $s_test_id => $testId, - $s_passed => FALSE, - $s_hasCompiled => FALSE, // all other errors returned before this line - - $s_programExitCode => NULL, - $s_runnerVersion => NULL, - $s_timeForCompiling => NULL, - $s_timeForUserProgram => NULL, - - $s_testResultCode => 100, # this is the result from the test runner program - $s_protocol => '', # the conversation protocol - - $s_output_test_server_version => $versionString, + $result = create_test_result($status_code_ArgumentInvalidOrMissing, "unknown command, supported commands: [" . implode(', ', $s_supportedCommands) . ']', $testId, + FALSE, FALSE, NULL, + NULL, NULL, NULL, + 100, '', + NULL, NULL ); array_push($testResults, $result); continue; @@ -324,22 +310,11 @@ foreach ($testCases as $test) { if ($compileCmd === NULL) { - $result = array( - $s_testServerCode => $status_code_DbIssue, - $s_testServerMessage => 'could not find compile command', - $s_test_id => $testId, - $s_passed => FALSE, - $s_hasCompiled => FALSE, // all other errors returned before this line - - $s_programExitCode => NULL, - $s_timeForCompiling => NULL, - $s_timeForUserProgram => NULL, - $s_runnerVersion => NULL, - - $s_testResultCode => 100, # this is the result from the test runner program - $s_protocol => '', # the conversation protocol - - $s_output_test_server_version => $versionString, + $result = create_test_result($status_code_DbIssue, 'could not find compile command', $testId, + FALSE, FALSE, NULL, + NULL, NULL, NULL, + 100, '', + NULL, NULL ); array_push($testResults, $result); continue; @@ -352,30 +327,39 @@ foreach ($testCases as $test) { $showTestRunnerDebugOutput = $config['showTestRunnerDebugOutput']; } + if (!isset($test[$s_test_compileTimeoutInMs])) { + $result = create_test_result($status_code_ArgumentInvalidOrMissing, "argument '" . $s_test_compileTimeoutInMs . "' missing", $testId, + FALSE, FALSE, NULL, + NULL, NULL, NULL, + 100, '', + NULL, NULL + ); + array_push($testResults, $result); + continue; + } + + $arg_compileTimeout = $test[$s_test_compileTimeoutInMs]; + + $min_compileTimeout = $hardGlobalCompileTimeoutInMs; + + if ($arg_compileTimeout) { + $min_compileTimeout = min($arg_compileTimeout, $hardGlobalCompileTimeoutInMs); + } + try { - $_result = do_compile($arg_mainFileNameWithExtension, $fullWorkingDirPath, $compileCmd, $sourceFileExtensions, $requestDistinctionString, $showTestRunnerDebugOutput); - }catch (Exception $e) { + $_result = do_compile($arg_mainFileNameWithExtension, $fullWorkingDirPath, $min_compileTimeout, + $compileCmd, $sourceFileExtensions, $requestDistinctionString, $showTestRunnerDebugOutput); + } catch (Exception $e) { //critical error, abort execution (all other tests are likely to fail) output($status_code_InternalServerError, "error executing regex test: " . $e->getMessage()); goto handleCleanup; } - $result = array( - $s_testServerCode => $status_code_Ok, - $s_testServerMessage => '', - $s_test_id => $testId, - $s_passed => $_result[$s_return_val] === 0, - $s_hasCompiled => $_result[$s_return_val] !== 50, // all other errors returned before this line - - $s_programExitCode => $_result[$s_user_program_exit_code], - $s_timeForCompiling => $_result[$s_timeForCompiling], - $s_timeForUserProgram => $_result[$s_timeForUserProgram], - $s_runnerVersion => $_result[$s_runnerVersion], - - $s_testResultCode => $_result[$s_return_val], # this is the result from the test runner program - $s_protocol => formatOutput($_result[$s_output]), # the conversation protocol - - $s_output_test_server_version => $versionString, + $result = create_test_result($status_code_Ok, '', $testId, + $_result[$s_return_val] === 0, $_result[$s_return_val] !== 50 && $_result[$s_return_val] !== 7, $_result[$s_user_program_exit_code], + $_result[$s_timeForCompiling], $_result[$s_timeForUserProgram], $_result[$s_runnerVersion], + $_result[$s_return_val], formatOutput($_result[$s_output]), + $_result[$s_compileTimeoutInMsUsed], NULL ); array_push($testResults, $result); @@ -402,23 +386,11 @@ foreach ($testCases as $test) { goto handleCleanup; } - - $result = array( - $s_testServerCode => $status_code_Ok, - $s_testServerMessage => '', - $s_test_id => $testId, - $s_passed => $_result[$s_return_val] === 0, - $s_hasCompiled => $_result[$s_return_val] !== 50, // all other errors returned before this line - - $s_programExitCode => NULL, - $s_timeForCompiling => NULL, - $s_timeForUserProgram => NULL, - $s_runnerVersion => NULL, - - $s_testResultCode => $_result[$s_return_val], # this is the result from the test runner program - $s_protocol => formatOutput($_result[$s_output]), # the conversation protocol - - $s_output_test_server_version => $versionString, + $result = create_test_result($status_code_Ok, '', $testId, + $_result[$s_return_val] === 0, $_result[$s_return_val] !== 50 && $_result[$s_return_val] !== 7, NULL, + NULL, NULL, NULL, + $_result[$s_return_val], formatOutput($_result[$s_output]), + NULL, NULL ); array_push($testResults, $result); @@ -429,22 +401,25 @@ foreach ($testCases as $test) { } if (!isset($test[$s_test_timeoutInMs])) { - $result = array( - $s_testServerCode => $status_code_ArgumentInvalidOrMissing, - $s_testServerMessage => "argument '" . $s_test_timeoutInMs . "' missing", - $s_test_id => $testId, - $s_passed => FALSE, - $s_hasCompiled => FALSE, // all other errors returned before this line - - $s_programExitCode => NULL, - $s_timeForCompiling => NULL, - $s_timeForUserProgram => NULL, - $s_runnerVersion => NULL, - - $s_testResultCode => 100, # this is the result from the test runner program - $s_protocol => '', # the conversation protocol - - $s_output_test_server_version => $versionString, + + $result = create_test_result($status_code_ArgumentInvalidOrMissing, "argument '" . $s_test_timeoutInMs . "' missing", $testId, + FALSE, FALSE, NULL, + NULL, NULL, NULL, + 100, '', + NULL, NULL + + ); + array_push($testResults, $result); + continue; + } + + if (!isset($test[$s_test_compileTimeoutInMs])) { + + $result = create_test_result($status_code_ArgumentInvalidOrMissing, "argument '" . $s_test_compileTimeoutInMs . "' missing", $testId, + FALSE, FALSE, NULL, + NULL, NULL, NULL, + 100, '', + NULL, NULL ); array_push($testResults, $result); continue; @@ -452,25 +427,16 @@ foreach ($testCases as $test) { # the timeout for the test $arg_timeout = $test[$s_test_timeoutInMs]; + $arg_compileTimeout = $test[$s_test_compileTimeoutInMs]; if (!isset($test[$s_test_memoryLimitInKb])) { - $result = array( - $s_testServerCode => $status_code_ArgumentInvalidOrMissing, - $s_testServerMessage => "argument '" . $s_test_memoryLimitInKb . "' missing", - $s_test_id => $testId, - $s_passed => FALSE, - $s_hasCompiled => FALSE, // all other errors returned before this line - - $s_programExitCode => NULL, - $s_timeForCompiling => NULL, - $s_timeForUserProgram => NULL, - $s_runnerVersion => NULL, - - $s_testResultCode => 100, # this is the result from the test runner program - $s_protocol => '', # the conversation protocol - - $s_output_test_server_version => $versionString, + + $result = create_test_result($status_code_ArgumentInvalidOrMissing, "argument '" . $s_test_memoryLimitInKb . "' missing", $testId, + FALSE, FALSE, NULL, + NULL, NULL, NULL, + 100, '', + NULL, NULL ); array_push($testResults, $result); continue; @@ -481,22 +447,11 @@ foreach ($testCases as $test) { if (!isset($test[$s_test_diskSpaceLimitInKb])) { - $result = array( - $s_testServerCode => $status_code_ArgumentInvalidOrMissing, - $s_testServerMessage => "argument '" . $s_test_diskSpaceLimitInKb . "' missing", - $s_test_id => $testId, - $s_passed => FALSE, - $s_hasCompiled => FALSE, // all other errors returned before this line - - $s_programExitCode => NULL, - $s_timeForCompiling => NULL, - $s_timeForUserProgram => NULL, - $s_runnerVersion => NULL, - - $s_testResultCode => 100, # this is the result from the test runner program - $s_protocol => '', # the conversation protocol - - $s_output_test_server_version => $versionString, + + $result = create_test_result($status_code_ArgumentInvalidOrMissing, "argument '" . $s_test_diskSpaceLimitInKb . "' missing", $testId, + FALSE, FALSE, NULL, + NULL, NULL, NULL, + 100, '', $versionString ); array_push($testResults, $result); continue; @@ -507,22 +462,11 @@ foreach ($testCases as $test) { if ($compileCmd === NULL || $execCmd === NULL) { - $result = array( - $s_testServerCode => $status_code_DbIssue, - $s_testServerMessage => "could not find compile command or execute command (unknown plang?)", - $s_test_id => $testId, - $s_passed => FALSE, - $s_hasCompiled => FALSE, // all other errors returned before this line - - $s_programExitCode => NULL, - $s_timeForCompiling => NULL, - $s_timeForUserProgram => NULL, - $s_runnerVersion => NULL, - - $s_testResultCode => 100, # this is the result from the test runner program - $s_protocol => '', # the conversation protocol - - $s_output_test_server_version => $versionString, + $result = create_test_result($status_code_DbIssue, "could not find compile command or execute command (unknown plang?)", $testId, + FALSE, FALSE, NULL, + NULL, NULL, NULL, + 100, '', + NULL, NULL ); array_push($testResults, $result); continue; @@ -536,6 +480,12 @@ foreach ($testCases as $test) { $min_timeout = min($arg_timeout, $hardGlobalTimeoutInMs); } + $min_compileTimeout = $hardGlobalCompileTimeoutInMs; + + if ($arg_compileTimeout) { + $min_compileTimeout = min($arg_compileTimeout, $hardGlobalCompileTimeoutInMs); + } + $min_memoryLimit = $hardMemoryLimitInKb; if ($arg_MemoryLimit) { @@ -598,7 +548,7 @@ foreach ($testCases as $test) { try { $_result = do_compareFilesTest($arg_mainFileNameWithExtension, $test, $fullWorkingDirPath, - $min_timeout, $min_memoryLimit, $min_diskSpaceLimit, + $min_timeout, $min_compileTimeout, $min_memoryLimit, $min_diskSpaceLimit, $compileCmd, $execCmd, $sourceFileExtensions, $needCompilation, $maxLinesToRead, $maxErrLinesToRead, $maxLinesToWrite, $requestDistinctionString, @@ -609,13 +559,12 @@ foreach ($testCases as $test) { output($status_code_InternalServerError, "error executing compare files test: " . $e->getMessage()); goto handleCleanup; } - } - else { + } else { require_once './do_blackBoxTest_func.php'; try { $_result = do_blackBoxTest($arg_mainFileNameWithExtension, $test, $fullWorkingDirPath, - $min_timeout, $min_memoryLimit, $min_diskSpaceLimit, + $min_timeout, $min_compileTimeout, $min_memoryLimit, $min_diskSpaceLimit, $compileCmd, $execCmd, $sourceFileExtensions, $needCompilation, $maxLinesToRead, $maxErrLinesToRead, $maxLinesToWrite, ($arg_command === $s_command_justRunTest), @@ -632,22 +581,11 @@ foreach ($testCases as $test) { } - $result = array( - $s_testServerCode => $status_code_Ok, - $s_testServerMessage => '', - $s_test_id => $testId, - $s_passed => $_result[$s_return_val] === 0, - $s_hasCompiled => $_result[$s_return_val] !== 50, // all other errors returned before this line - - $s_programExitCode => $_result[$s_user_program_exit_code], - $s_timeForCompiling => $_result[$s_timeForCompiling], - $s_timeForUserProgram => $_result[$s_timeForUserProgram], - $s_runnerVersion => $_result[$s_runnerVersion], - - $s_testResultCode => $_result[$s_return_val], # this is the result from the test runner program - $s_protocol => formatOutput($_result[$s_output]), # the conversation protocol - - $s_output_test_server_version => $versionString, + $result = create_test_result($status_code_Ok, '', $testId, + $_result[$s_return_val] === 0, $_result[$s_return_val] !== 50 && $_result[$s_return_val] !== 7, $_result[$s_user_program_exit_code], + $_result[$s_timeForCompiling], $_result[$s_timeForUserProgram], $_result[$s_runnerVersion], + $_result[$s_return_val], formatOutput($_result[$s_output]), + $_result[$s_compileTimeoutInMsUsed], $_result[$s_timeoutInMsUsed] ); if ($needCompilation) { diff --git a/bootstrap.php b/bootstrap.php index 1c45700..17f9824 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -61,6 +61,7 @@ $row = $allRows[0]; $config['workingDirFullPath'] = $row['workingDirFullPath']; $config[$s_arg_hardTimeoutInMs] = $row[$s_arg_hardTimeoutInMs]; +$config[$s_arg_hardCompileTimeoutInMs] = $row[$s_arg_hardCompileTimeoutInMs]; $config[$s_arg_hardMemoryLimitInKb] = $row[$s_arg_hardMemoryLimitInKb]; $config[$s_arg_hardDiskSpaceLimitInKb] = $row[$s_arg_hardDiskSpaceLimitInKb]; diff --git a/constants.php b/constants.php index 16be586..979ac1e 100644 --- a/constants.php +++ b/constants.php @@ -3,7 +3,7 @@ # variables //use this to know which version we published -$versionString = '2.0.0'; +$versionString = '2.1.0'; $rootDirNameToUseString = 'work'; $isDebug = false; //logs debug to STDOUT @@ -35,6 +35,7 @@ $s_lastRunDir = 'lastRunDir'; $s_arg_dbTransactionTableName = 'dbTransactionTableName'; $s_arg_hardTimeoutInMs = 'hardTimeoutInMs'; +$s_arg_hardCompileTimeoutInMs = 'hardCompileTimeoutInMs'; $s_arg_hardMemoryLimitInKb = 'hardMemoryLimitInKb'; $s_arg_hardDiskSpaceLimitInKb = 'hardDiskSpaceLimitInKb'; $s_arg_maxParallelTests = 'maxParallelTests'; @@ -123,6 +124,7 @@ $s_test_content = 'testContent'; $s_test_command = 'command'; # the command to execute see $s_supportedCommands $s_test_testContents = 'testContents'; $s_test_timeoutInMs = 'timeoutInMs'; # the timeout for the test +$s_test_compileTimeoutInMs = 'compileTimeoutInMs'; # the compile timeout for the test $s_test_memoryLimitInKb = 'memoryLimitInKb'; # the memory limit for the test $s_test_diskSpaceLimitInKb = 'maxDiskSpaceInKb'; # the max dis space the test can write to $s_test_allAssets = 'allAssets'; # the asset files @@ -132,6 +134,8 @@ $exitCodeOutputPrefix = 'exit:'; $s_user_program_exit_code = 'exit'; $s_runnerVersion = 'runnerVersion'; +$s_timeoutInMsUsed = 'timeoutInMsUsed'; +$s_compileTimeoutInMsUsed = 'compileTimeoutInMsUsed'; $s_timeForCompiling = 'timeForCompiling'; $s_timeForUserProgram = 'timeForUserProgram'; $s_output_without_header_part = 'stripedOutput'; @@ -190,4 +194,48 @@ function warn($message) fclose($fe); //fwrite(STDERR, $message); +} + +function create_test_result($testServerCode, $testServerMessage, $testId, + $passed, $hasCompiled, $programExitCode, + $timeForCompiling, $timeForUserProgram, $runnerVersion, + $testResultCode, $protocol, + $compileTimeoutInMsUsed, $timeoutInMsUsed + +) +{ + global $s_testServerCode; + global $s_testServerMessage; + global $s_test_id; + global $s_passed; + global $s_hasCompiled; + global $s_programExitCode; + global $s_runnerVersion; + global $s_timeForCompiling; + global $s_timeForUserProgram; + global $s_testResultCode; + global $s_protocol; + global $s_output_test_server_version; + global $s_timeoutInMsUsed; + global $s_compileTimeoutInMsUsed; + global $versionString; + + + return array( + $s_testServerCode => $testServerCode, + $s_testServerMessage => $testServerMessage, + $s_test_id => $testId, + $s_passed => $passed, + $s_hasCompiled => $hasCompiled, // all other errors returned before this line + $s_programExitCode => $programExitCode, + $s_runnerVersion => $runnerVersion, + $s_timeForCompiling => $timeForCompiling, + $s_timeForUserProgram => $timeForUserProgram, + $s_testResultCode => $testResultCode, # this is the result from the test runner program + $s_protocol => $protocol, # the conversation protocol + $s_output_test_server_version => $versionString, + $s_compileTimeoutInMsUsed => $compileTimeoutInMsUsed, + $s_timeoutInMsUsed => $timeoutInMsUsed, + ); + } \ No newline at end of file diff --git a/do_blackBoxTest_func.php b/do_blackBoxTest_func.php index 1842c84..ace0ad6 100644 --- a/do_blackBoxTest_func.php +++ b/do_blackBoxTest_func.php @@ -8,6 +8,7 @@ require_once __DIR__ . '/protocolHeaderPartParser.php'; * @param $test * @param $fullWorkingDirPath * @param int|string $timeout the timeout in MS (can be string from db or int from default values) + * @param int|string $compileTimeout the compile timeout in MS (can be string from db or int from default values) * @param int|string $memoryLimit the memory limit in kb (can be string from db or int from default values) * @param int|string $diskSpaceLimit the max disk space the program can write to (can be string from db or int from default values) * @param string $compileCmd the command to execute to compile the file(s) @@ -25,7 +26,7 @@ require_once __DIR__ . '/protocolHeaderPartParser.php'; * Format: array[int] => {fileName: string, fileContent: string} */ function do_blackBoxTest($mainFileNameWithExtension, $test, $fullWorkingDirPath, - $timeout, $memoryLimit, $diskSpaceLimit, + $timeout, $compileTimeout, $memoryLimit, $diskSpaceLimit, $compileCmd, $execCmd, $sourceFileExtensions, $needCompilation, $maxLinesToRead, $maxErrLinesToRead, $maxLinesToWrite, $justRun, @@ -48,6 +49,8 @@ function do_blackBoxTest($mainFileNameWithExtension, $test, $fullWorkingDirPath, global $s_runnerVersion; global $s_timeForCompiling; global $s_timeForUserProgram; + global $s_timeoutInMsUsed; + global $s_compileTimeoutInMsUsed; global $s_output_without_header_part; @@ -81,22 +84,23 @@ function do_blackBoxTest($mainFileNameWithExtension, $test, $fullWorkingDirPath, $longCmd = $config['runner'] - . ' ' . $command_to_execute_string # arg[0] the test method - . ' "' . $fullWorkingDirPath . '"' # arg[1] dir path - . ' ' . $mainFileNameWithExtension # arg[2] file path - . ' "' . $compileCmd . '"' # arg[3] command to execute # currently ignored because we call compile in php... - - . ' "' . $commandToExecute . '"' # arg[4] command to execute the test - . ' ' . $timeout # arg[5] the timeout - . ' ' . $memoryLimit # arg[6] the memory limit - . ' ' . $diskSpaceLimit # arg[7] the disk limit - . ' "' . implode(',', $sourceFileExtensions) . '"' # arg[8] the source file extensions - . ' ' . ($needCompilation ? 'true' : 'false') # arg[9] true: compile program new, false: not - . ' "' . $maxLinesToRead . '"' # arg[10] max lines to read from the user program (inclusive) - . ' "' . $maxErrLinesToRead . '"' # arg[11] max lines to read from the user program stderr (inclusive) - . ' "' . $maxLinesToWrite . '"' # arg[12] max lines to write to the user program (inclusive) - . ' "' . $uniqueSessionId . '"' # arg[13] a unique session id - . ' "' . ($showTestRunnerDebugOutput === TRUE ? 1 : 0) . '"' # arg[14] showTestRunnerDebugOutput + . ' ' . $command_to_execute_string # arg[0] the test method + . ' "' . $fullWorkingDirPath . '"' # arg[1] dir path + . ' "' . $mainFileNameWithExtension . '"' # arg[2] file path + . ' "' . $compileCmd . '"' # arg[3] command to execute # currently ignored because we call compile in php... + + . ' "' . $commandToExecute . '"' # arg[4] command to execute the test + . ' "' . $timeout . '"' # arg[5] the timeout in ms + . ' "' . $compileTimeout . '"' # arg[6] the compile timeout in ms + . ' "' . $memoryLimit . '"' # arg[7] the memory limit + . ' "' . $diskSpaceLimit . '"' # arg[8] the disk limit + . ' "' . implode(',', $sourceFileExtensions) . '"' # arg[9] the source file extensions + . ' ' . ($needCompilation ? 'true' : 'false') # arg[10] true: compile program new, false: not + . ' "' . $maxLinesToRead . '"' # arg[11] max lines to read from the user program (inclusive) + . ' "' . $maxErrLinesToRead . '"' # arg[12] max lines to read from the user program stderr (inclusive) + . ' "' . $maxLinesToWrite . '"' # arg[13] max lines to write to the user program (inclusive) + . ' "' . $uniqueSessionId . '"' # arg[14] a unique session id + . ' "' . ($showTestRunnerDebugOutput === TRUE ? 1 : 0) . '"' # arg[15] showTestRunnerDebugOutput ; @@ -165,6 +169,15 @@ function do_blackBoxTest($mainFileNameWithExtension, $test, $fullWorkingDirPath, #file_put_contents($fullWorkingDirPath . 'xyz.txt', $output); + # in case the test runner didn't even run we may need to cast (vals from db) + if (gettype($timeout) === 'string') { + $timeout = intval($timeout, 10); + } + + if (gettype($compileTimeout) === 'string') { + $compileTimeout = intval($compileTimeout, 10); + } + return array( $s_return_val => $return_var, $s_output => $headerPart[$s_output_without_header_part], @@ -172,5 +185,7 @@ function do_blackBoxTest($mainFileNameWithExtension, $test, $fullWorkingDirPath, $s_runnerVersion => $headerPart[$s_runnerVersion], $s_timeForCompiling => $headerPart[$s_timeForCompiling], $s_timeForUserProgram => $headerPart[$s_timeForUserProgram], + $s_timeoutInMsUsed => $timeout, + $s_compileTimeoutInMsUsed => $compileTimeout, ); } diff --git a/do_compareFilesTest_func.php b/do_compareFilesTest_func.php index ca83807..1e344a7 100644 --- a/do_compareFilesTest_func.php +++ b/do_compareFilesTest_func.php @@ -8,6 +8,7 @@ require_once __DIR__ . '/protocolHeaderPartParser.php'; * @param $test * @param $fullWorkingDirPath * @param int|string $timeout the timeout in MS (can be string from db or int from default values) + * @param int|string $compileTimeout the compile timeout in MS (can be string from db or int from default values) * @param int|string $memoryLimit the memory limit in kb (can be string from db or int from default values) * @param int|string $diskSpaceLimit the max disk space the program can write to (can be string from db or int from default values) * @param string $compileCmd the command to execute to compile the file(s) @@ -24,7 +25,7 @@ require_once __DIR__ . '/protocolHeaderPartParser.php'; * Format: array[int] => {fileName: string, fileContent: string} */ function do_compareFilesTest($mainFileNameWithExtension, $test, $fullWorkingDirPath, - $timeout, $memoryLimit, $diskSpaceLimit, + $timeout, $compileTimeout, $memoryLimit, $diskSpaceLimit, $compileCmd, $execCmd, $sourceFileExtensions, $needCompilation, $maxLinesToRead, $maxErrLinesToRead, $maxLinesToWrite, $uniqueSessionId, @@ -47,6 +48,8 @@ function do_compareFilesTest($mainFileNameWithExtension, $test, $fullWorkingDirP global $s_runnerVersion; global $s_timeForCompiling; global $s_timeForUserProgram; + global $s_timeoutInMsUsed; + global $s_compileTimeoutInMsUsed; global $s_output_without_header_part; $command_to_execute_string = $s_command_compareFilesTest; @@ -85,20 +88,21 @@ function do_compareFilesTest($mainFileNameWithExtension, $test, $fullWorkingDirP $longCmd = $config['runner'] . ' ' . $command_to_execute_string # arg[0] the test method . ' "' . $fullWorkingDirPath . '"' # arg[1] dir path - . ' ' . $mainFileNameWithExtension # arg[2] file path + . ' "' . $mainFileNameWithExtension . '"' # arg[2] file path . ' "' . $compileCmd . '"' # arg[3] command to execute # currently ignored because we call compile in php... . ' "' . $commandToExecute . '"' # arg[4] command to execute the test - . ' ' . $timeout # arg[5] the timeout - . ' ' . $memoryLimit # arg[6] the memory limit - . ' ' . $diskSpaceLimit # arg[7] the disk limit - . ' "' . implode(',', $sourceFileExtensions) . '"' # arg[8] the source file extensions - . ' ' . ($needCompilation ? 'true' : 'false') # arg[9] true: compile program new, false: not - . ' "' . $maxLinesToRead . '"' # arg[10] max lines to read from the user program (inclusive) - . ' "' . $maxErrLinesToRead . '"' # arg[11] max lines to read from the user program stderr (inclusive) - . ' "' . $maxLinesToWrite . '"' # arg[12] max lines to write to the user program (inclusive) - . ' "' . $uniqueSessionId . '"' # arg[13] a unique session id - . ' "' . ($showTestRunnerDebugOutput === TRUE ? 1 : 0) . '"' # arg[14] showTestRunnerDebugOutput - . ' "' . $fileHashInfo . '"' # arg[15] file:hash list + . ' "' . $timeout . '"' # arg[5] the timeout + . ' "' . $compileTimeout . '"' # arg[6] the timeout + . ' "' . $memoryLimit . '"' # arg[7] the memory limit + . ' "' . $diskSpaceLimit . '"' # arg[8] the disk limit + . ' "' . implode(',', $sourceFileExtensions) . '"' # arg[9] the source file extensions + . ' ' . ($needCompilation ? 'true' : 'false') # arg[10] true: compile program new, false: not + . ' "' . $maxLinesToRead . '"' # arg[11] max lines to read from the user program (inclusive) + . ' "' . $maxErrLinesToRead . '"' # arg[12] max lines to read from the user program stderr (inclusive) + . ' "' . $maxLinesToWrite . '"' # arg[13] max lines to write to the user program (inclusive) + . ' "' . $uniqueSessionId . '"' # arg[14] a unique session id + . ' "' . ($showTestRunnerDebugOutput === TRUE ? 1 : 0) . '"' # arg[15] showTestRunnerDebugOutput + . ' "' . $fileHashInfo . '"' # arg[16] file:hash list ; @@ -167,6 +171,15 @@ function do_compareFilesTest($mainFileNameWithExtension, $test, $fullWorkingDirP #file_put_contents($fullWorkingDirPath . 'xyz.txt', $output); + # in case the test runner didn't even run we may need to cast (vals from db) + if (gettype($timeout) === 'string') { + $timeout = intval($timeout, 10); + } + + if (gettype($compileTimeout) === 'string') { + $compileTimeout = intval($compileTimeout, 10); + } + return array( $s_return_val => $return_var, $s_output => $headerPart[$s_output_without_header_part], @@ -174,5 +187,7 @@ function do_compareFilesTest($mainFileNameWithExtension, $test, $fullWorkingDirP $s_runnerVersion => $headerPart[$s_runnerVersion], $s_timeForCompiling => $headerPart[$s_timeForCompiling], $s_timeForUserProgram => $headerPart[$s_timeForUserProgram], + $s_timeoutInMsUsed => $timeout, + $s_compileTimeoutInMsUsed => $compileTimeout, ); } diff --git a/do_compileTest_func.php b/do_compileTest_func.php index 927bdc3..d22511e 100644 --- a/do_compileTest_func.php +++ b/do_compileTest_func.php @@ -7,6 +7,7 @@ require_once __DIR__ . '/protocolHeaderPartParser.php'; * compiles the given main file (if a compile error occurs then an answer is sent) * @param string $mainFileNameWithExtension the main file to compile (with extension) * @param $fullWorkingDirPath string the working dir with the source files + * @param int|string $compileTimeout the compile timeout in MS (can be string from db or int from default values) * @param string $compileCmd the compile command to execute * @param $sourceFileExtensions array the list with the file extensions from the source files for the p language * @param $uniqueSessionId string the unique session id for the test runner to handle sandbox file system management @@ -16,7 +17,9 @@ require_once __DIR__ . '/protocolHeaderPartParser.php'; * @internal param array $allFiles all files to copy in teh dir to use * Format: array[int] => {fileName: string, fileContent: string} */ -function do_compile($mainFileNameWithExtension, $fullWorkingDirPath, $compileCmd, $sourceFileExtensions, +function do_compile($mainFileNameWithExtension, $fullWorkingDirPath, + $compileTimeout, + $compileCmd, $sourceFileExtensions, $uniqueSessionId, $showTestRunnerDebugOutput ) @@ -31,6 +34,8 @@ function do_compile($mainFileNameWithExtension, $fullWorkingDirPath, $compileCmd global $s_runnerVersion; global $s_timeForCompiling; global $s_timeForUserProgram; + global $s_timeoutInMsUsed; + global $s_compileTimeoutInMsUsed; global $s_output_without_header_part; $command_to_execute_string = $s_command_compile; @@ -39,13 +44,14 @@ function do_compile($mainFileNameWithExtension, $fullWorkingDirPath, $compileCmd $return_var = -1; $longCmd = $config['runner'] - . ' ' . $command_to_execute_string # arg[0] the test method - . ' "' . $fullWorkingDirPath . '"' # arg[1] dir path - . ' ' . $mainFileNameWithExtension # arg[2] file path - . ' "' . $compileCmd . '"' # arg[3] command to execute - . ' "' . implode(',', $sourceFileExtensions) . '"'# arg[4] the source file extensions - . ' "' . $uniqueSessionId . '"' # arg[5] a unique session id - . ' "' . ($showTestRunnerDebugOutput === TRUE ? 1 : 0) . '"' # arg[6] showTestRunnerDebugOutput + . ' ' . $command_to_execute_string # arg[0] the test method + . ' "' . $fullWorkingDirPath . '"' # arg[1] dir path + . ' "' . $mainFileNameWithExtension . '"' # arg[2] file path + . ' "' . $compileTimeout . '"' # arg[3] compile timeout in ms + . ' "' . $compileCmd . '"' # arg[4] command to execute + . ' "' . implode(',', $sourceFileExtensions) . '"' # arg[5] the source file extensions + . ' "' . $uniqueSessionId . '"' # arg[6] a unique session id + . ' "' . ($showTestRunnerDebugOutput === TRUE ? 1 : 0) . '"' # arg[7] showTestRunnerDebugOutput ; @@ -72,12 +78,18 @@ function do_compile($mainFileNameWithExtension, $fullWorkingDirPath, $compileCmd $return_var = proc_close($process); } - if ($isDebug && (isset($errorOutput) && trim($errorOutput)!=='')) { + if ($isDebug && (isset($errorOutput) && trim($errorOutput) !== '')) { debug("error during execution of the (compile) test runner: " . $errorOutput); } $headerPart = parseHeaderPart($output); + # in case the test runner didn't even run we may need to cast (vals from db) + + if (gettype($compileTimeout) === 'string') { + $compileTimeout = intval($compileTimeout, 10); + } + return array( $s_return_val => $return_var, $s_output => $headerPart[$s_output_without_header_part], @@ -85,5 +97,7 @@ function do_compile($mainFileNameWithExtension, $fullWorkingDirPath, $compileCmd $s_runnerVersion => $headerPart[$s_runnerVersion], $s_timeForCompiling => $headerPart[$s_timeForCompiling], $s_timeForUserProgram => $headerPart[$s_timeForUserProgram], + $s_timeoutInMsUsed => $headerPart[$s_timeoutInMsUsed], + $s_compileTimeoutInMsUsed => $compileTimeout, ); } diff --git a/protocolHeaderPartParser.php b/protocolHeaderPartParser.php index 9a4b39f..008c4e7 100644 --- a/protocolHeaderPartParser.php +++ b/protocolHeaderPartParser.php @@ -11,7 +11,6 @@ function parseHeaderPart($output) global $s_output_without_header_part; - //if we have no header tuples we might have only so ---\n //this is because we cannot use $headerPos -1 $headerPos = strpos($output, $s_header_part_separator); @@ -57,6 +56,7 @@ function parseHeaderPart($output) if ($val === null) continue; $timeForUserProgram = intval($val, 10); + } } diff --git a/readme.md b/readme.md index 5bd60d1..9dd39ff 100644 --- a/readme.md +++ b/readme.md @@ -51,7 +51,8 @@ The request is a json object so the request should be from mime type application * **fileContent** (string) the content of the asset (base64 encoded) * **hash** (string/null) the md5 hash of the content (can be null if not calculated) * but the test runner **will not accept null** as hash (for now) -* **timeoutInMs**: (int) the timeout in ms to wait after terminating the users program +* **timeoutInMs**: (int) the timeout in ms for execution to wait before terminating the users program +* **compileTimeoutInMs** (int) the timeout in ms for compilation to wait before terminating the compiling * **memoryLimitInKb**: (int) the max memory in kb the users program can use * **maxDiskSpaceInKb**: (int) the max disk space in kb the users program can write to * **allFiles**: (array) the files to use @@ -78,6 +79,7 @@ The request is a json object so the request should be from mime type application } ], "timeoutInMs": 1000, + "compileTimeoutInMs": 2000, "memoryLimitInKb": 1000, "maxDiskSpaceInKb": 1000 } @@ -266,7 +268,7 @@ when a compile error occurred then the output of the compiler ``` EOT -ccompare [fileName1WithExtension] [fileName2WithExtension] (ignoreCase) (ignoreLeadingWhitespaces) (ignoreTrailingWhitespaces) (ignoreAllEmptyOrWhitespacesOnlyLines) +ccompare [fileName1WithExtension] [fileName2WithExtension] (1) (2) (4) (8) c[result] ``` @@ -286,7 +288,7 @@ where `[result]` is one of the following string when a line mismatched we have the following output ``` -ccompare [fileName1WithExtension] [fileName2WithExtension] (ignoreCase) (ignoreLeadingWhitespaces) (ignoreTrailingWhitespaces) (ignoreAllEmptyOrWhitespacesOnlyLines) +ccompare [fileName1WithExtension] [fileName2WithExtension] (1) (2) (4) (8) cactual [line nr] [line] cexpected [line nr] [line] ``` @@ -294,8 +296,8 @@ cexpected [line nr] [line] if the user file ended before the expected file then the output is ``` -ccompare [fileName1WithExtension] [fileName2WithExtension] (ignoreCase) (ignoreLeadingWhitespaces) (ignoreTrailingWhitespaces) (ignoreAllEmptyOrWhitespacesOnlyLines) -cactual [line nr] eof +ccompare [fileName1WithExtension] [fileName2WithExtension] (1) (2) (4) (8) +cactual [line nr] eof2 cexpected [line nr] [line] ``` @@ -406,6 +408,7 @@ Columns (the same as in the local config except the db specific settings) * id (we should have a primary key) (number) the number does not matter * workingDirFullPath * hardTimeoutInMs +* hardCompileTimeoutInMs * hardMemoryLimitInKb * hardMaxDiskSpaceLimitInKb * maxParallelTests @@ -420,9 +423,9 @@ Columns (the same as in the local config except the db specific settings) #### Example -id | workingDirFullPath | hardTimeoutInMs | hardMemoryLimitInKb | hardMaxDiskSpaceLimitInKb | maxParallelTests | maxNumberOfTestsWithOneRequest |runner | showTestRunnerDebugOutput | maxLinesToRead | maxErrLinesToRead | maxLinesToWrite | environmentVars +id | workingDirFullPath | hardTimeoutInMs | hardCompileTimeoutInMs | hardMemoryLimitInKb | hardMaxDiskSpaceLimitInKb | maxParallelTests | maxNumberOfTestsWithOneRequest |runner | showTestRunnerDebugOutput | maxLinesToRead | maxErrLinesToRead | maxLinesToWrite | environmentVars --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- -1 | /Users/janis/Documents/Test/ | 4000 | 2000 | 2000 | 10 | 15 | "/Users/janis/Misc/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/bin/java" -Dfile.encoding=UTF8 -cp "/Users/janis/Documents/Projects/SyndromAll/Syndrom_DefaultTestRunnerFullThreaded/out" Main | 0 | 500 | 500 | 500 | USER=yapextester\nHOME=/home/yapextester\nPWD=\nLANG=de_DE.UTF-8\nPATH=/usr/local/bin:/usr/bin:/bin:/ +1 | /Users/janis/Documents/Test/ | 4000 | 2000 | 2000 | 2000 | 10 | 15 | "/Users/janis/Misc/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/bin/java" -Dfile.encoding=UTF8 -cp "/Users/janis/Documents/Projects/SyndromAll/Syndrom_DefaultTestRunnerFullThreaded/out" Main | 0 | 500 | 500 | 500 | USER=yapextester\nHOME=/home/yapextester\nPWD=\nLANG=de_DE.UTF-8\nPATH=/usr/local/bin:/usr/bin:/bin:/ @@ -444,7 +447,8 @@ A json object with the following properties (order does not matter) * **dbTransactionTableName** : (string) the table used for the transaction (to ensure the maxParallelTests) * **workingDirFullPath** : (string) the path to the directory where the user programs will be tested/saved/executed -* **hardTimeoutInMs** : (int) the global timeout for all programming languages (used to create if we can create a new root directory) +* **hardTimeoutInMs** : (int) the global timeout for all programming languages +* **hardCompileTimeoutInMs** : (int) the global compile timeout for all programming languages * **hardMemoryLimitInKb** - the hard memory limit in kb * **hardMaxDiskSpaceLimitInKb** - the hard max disk space limit in kb @@ -497,6 +501,7 @@ If the config table has more than 1 row, the first row is taken! "dbTransactionTableName": "transactions", "maxParallelTests": 50, "hardTimeoutInMs": 4000, + "hardCompileTimeoutInMs": 4000, "hardMemoryLimitInKb": 2000, "hardMaxDiskSpaceLimitInKb": 2000, "maxNumberOfTestsWithOneRequest": 20, @@ -527,29 +532,32 @@ arg[4] = the execute command to run the test case arg[5] = time limit (int) in MS time limit = time the program can run (hard limit) in MS e.g. 1000 -arg[6] = memory limit (int) in KB +arg[6] = compile time limit (int) in MS +time limit = time the compiling can run (hard limit) in MS e.g. 2000 + +arg[7] = memory limit (int) in KB memory limit = the max memory the program can use in KB .e.g. 1000 kb -arg[7] = disk limit (int) in KB +arg[8] = disk limit (int) in KB disk limit = the max disk space the test can write to -arg[8] = contains a list of extensions of the soruce files for the p lang (differentiate beteen source files and assets). This is a "," separated list +arg[9] = contains a list of extensions of the soruce files for the p lang (differentiate beteen source files and assets). This is a "," separated list e.g. "cpp, h" -arg[9] = **true** to let the runner compile the sources, **false** to skip compilation (when running multiple tests skipping increases performance) +arg[10] = **true** to let the runner compile the sources, **false** to skip compilation (when running multiple tests skipping increases performance) -arg[10] = max lines to read from the user program (inclusive) (int) e.g. 100 +arg[11] = max lines to read from the user program (inclusive) (int) e.g. 100 negative or 0 is treated as unlimited -arg[11] = max lines to read from the user program stderr (inclusive) (int) e.g. 100 +arg[12] = max lines to read from the user program stderr (inclusive) (int) e.g. 100 negative or 0 is treated as unlimited -arg[12] = max lines to write to the user program (inclusive) (int) e.g. 100 +arg[13] = max lines to write to the user program (inclusive) (int) e.g. 100 negative or 0 is treated as unlimited -arg[13] = a unique session id (e.g. used with firejail to manage overlay fs names) +arg[14] = a unique session id (e.g. used with firejail to manage overlay fs names) -arg[14] = "true" to enable debug output (this will leak internal paths!!) or "false" to disable debug output. +arg[15] = "true" to enable debug output (this will leak internal paths!!) or "false" to disable debug output. The debug output will be normal lines starting with " [Test-Runner]" ## Compile Test or Syntaxtest @@ -559,14 +567,16 @@ arg[1] = the directory containing all files (the main file) arg[2] = the main file name to use -arg[3] = the compile command to execute +arg[3] = the compile timeout in ms + +arg[4] = the compile command to execute -arg[4] = contains a list of extensions of the soruce files for the p lang (differentiate beteen source files and assets). This is a "," separated list +arg[5] = contains a list of extensions of the soruce files for the p lang (differentiate beteen source files and assets). This is a "," separated list e.g. "cpp, h" -arg[5] = a unique session id +arg[6] = a unique session id -arg[6] = "true" to enable debug output (this will leak internal paths!!) or "false" to disable debug output. +arg[7] = "true" to enable debug output (this will leak internal paths!!) or "false" to disable debug output. The debug output will be normal lines starting with " [Test-Runner]" ## Regex Test @@ -593,32 +603,35 @@ arg[4] = the execute command to run the test case arg[5] = time limit (int) in MS time limit = time the program can run (hard limit) in MS e.g. 1000 -arg[6] = memory limit (int) in KB +arg[6] = compile time limit (int) in MS +time limit = time the compiling can run (hard limit) in MS e.g. 2000 + +arg[7] = memory limit (int) in KB memory limit = the max memory the program can use in KB .e.g. 1000 kb -arg[7] = disk limit (int) in KB +arg[8] = disk limit (int) in KB disk limit = the max disk space the test can write to -arg[8] = contains a list of extensions of the soruce files for the p lang (differentiate beteen source files and assets). This is a "," separated list +arg[9] = contains a list of extensions of the soruce files for the p lang (differentiate beteen source files and assets). This is a "," separated list e.g. "cpp, h" -arg[9] = **true** to let the runner compile the sources, **false** to skip compilation (when running multiple tests skipping increases performance) +arg[10] = **true** to let the runner compile the sources, **false** to skip compilation (when running multiple tests skipping increases performance) -arg[10] = max lines to read from the user program (inclusive) (int) e.g. 100 +arg[11] = max lines to read from the user program (inclusive) (int) e.g. 100 negative or 0 is treated as unlimited -arg[11] = max lines to read from the user program stderr (inclusive) (int) e.g. 100 +arg[12] = max lines to read from the user program stderr (inclusive) (int) e.g. 100 negative or 0 is treated as unlimited -arg[12] = max lines to write to the user program (inclusive) (int) e.g. 100 +arg[13] = max lines to write to the user program (inclusive) (int) e.g. 100 negative or 0 is treated as unlimited -arg[13] = a unique session id (e.g. used with firejail to manage overlay fs names) +arg[14] = a unique session id (e.g. used with firejail to manage overlay fs names) -arg[14] = **"true"** to enable debug output (this will leak internal paths!!) or **"false"** to disable debug output. +arg[15] = **"true"** to enable debug output (this will leak internal paths!!) or **"false"** to disable debug output. The debug output will be normal lines starting with " [Test-Runner]" -arg[15] = "file1:hash1 file2:hash2" a list of `file:hash` pairs separated with a single whitespace. +arg[16] = "file1:hash1 file2:hash2" a list of `file:hash` pairs separated with a single whitespace. These are the files for the test (the assets) with the pre calculated hash or `null` (if not pre calculated). The test runner decides of the hash needs to be calculated or not (only files that should be compared need to be hashed). @@ -807,12 +820,13 @@ from the Test-Runner (`testResultCode`) The Runner needs to return result code (exit code) to indicate the result of the test run. * **0** - test was successful -* **1** - output mismatched +* **1** - output mismatch * **2** - some error occurred during execution of the users program (e.g. numberformat exception, any non 0 exit code will result in this) * **3** - timeout hit / some read thread interrupted * **4** - memory limit hit * **5** - disk limit hit -* **6** - compare files line mismatched +* **6** - compare files mismatch +* **7** - compile timeout hit * **50** - compile error * **51** - test content read timeout * **52** - exit mismatched, **note** that output mismatched has a higher priority (output mismatched is displayed of we have both errors), this is only generated if the test contained a check for the exit code diff --git a/stats/private.php b/stats/private.php index 7a0c9e2..47021c5 100644 --- a/stats/private.php +++ b/stats/private.php @@ -14,9 +14,10 @@ require_once __DIR__.'/../constants.php'; $response = array( "workingDirFullPath" => $config["workingDirFullPath"], - "hardTimeoutInMs" => $config[$s_arg_hardTimeoutInMs], - "hardMemoryLimitInKb" => $config[$s_arg_hardMemoryLimitInKb], - "hardDiskSpaceLimitInKb" => $config[$s_arg_hardDiskSpaceLimitInKb], + $s_arg_hardTimeoutInMs => $config[$s_arg_hardTimeoutInMs], + $s_arg_hardCompileTimeoutInMs => $config[$s_arg_hardCompileTimeoutInMs], + $s_arg_hardDiskSpaceLimitInKb => $config[$s_arg_hardDiskSpaceLimitInKb], + $s_arg_hardMemoryLimitInKb => $config[$s_arg_hardMemoryLimitInKb], "maxParallelTests" => $config["maxParallelTests"], "maxNumberOfTestsWithOneRequest" => $config["maxNumberOfTestsWithOneRequest"], diff --git a/stats/public.php b/stats/public.php index 234d00d..0f1ac72 100644 --- a/stats/public.php +++ b/stats/public.php @@ -13,9 +13,10 @@ require_once __DIR__.'/../constants.php'; $response = array( - "hardTimeoutInMs" => $config[$s_arg_hardTimeoutInMs], - "hardMemoryLimitInKb" => $config[$s_arg_hardMemoryLimitInKb], - "hardDiskSpaceLimitInKb" => $config[$s_arg_hardDiskSpaceLimitInKb], + $s_arg_hardTimeoutInMs => $config[$s_arg_hardTimeoutInMs], + $s_arg_hardCompileTimeoutInMs => $config[$s_arg_hardCompileTimeoutInMs], + $s_arg_hardDiskSpaceLimitInKb => $config[$s_arg_hardDiskSpaceLimitInKb], + $s_arg_hardMemoryLimitInKb => $config[$s_arg_hardMemoryLimitInKb], "maxNumberOfTestsWithOneRequest" => $config["maxNumberOfTestsWithOneRequest"], "maxLinesToRead" => $config["maxLinesToRead"], -- GitLab