UTBotCpp
UTBotCpp copied to clipboard
There are always error in log and link to another empty log files
Description Sometimes when KLEE fails only empty log file generated, so it's difficult to investigate the problem
To Reproduce Steps to reproduce the behavior:
- Create simple CPP project with following code:
#include<iostream>
int main(int argc, char const *argv[])
{
std::cout << "Hello world" << std::endl;
}
- Run test generation for the file.
- Open resulting file, it has no tests but has following comment
// Some tests for function 'main' were skipped, as execution of function leads KLEE to the internal error. See console log for more details.
// Tests for main were not generated. Maybe the function is too complex.
- Open 'UTBot: Server Log' output as suggested, it has such information:
2022-08-29 17:04:22.192 [t00814305-SC3Q ] BaseForkTask.cpp:73 ERR| Exit status: 255
2022-08-29 17:04:22.192 [t00814305-SC3Q ] BaseForkTask.cpp:74 ERR| See details in "/home/utbot/utbot_distr/2022.8.233/utbot_distr/logs/t00814305-SC3Q/2022-08-29T14-04-22183.log"
2022-08-29 17:04:22.192 [t00814305-SC3Q ] KleeRunner.cpp:35 ERR| klee-stats call failed:
- Go to the UTBot server and open log mentioned above
2022-08-29T14-04-22183.log- it is empty. - Inspect the logs from this folder and note that for each execution two files created one is empty and second with the only error: /bin/sh: 1: /home/utbot/utbot_distr/install/bin/clang++: not found

Expected behavior
- Log fail contains actual error information
- If both logs files are from one tool then better to have only one file
- There is folder for the project in log folder, so I expected log files would be created there not at top of
logfolder.
Additional question here is what these errors are about, because such records appear even when generation is successful (or at least it looks like succeed).
[t00814305-PTAC ] BaseForkTask.cpp:65 1| . Running klee-stats out of process from pid: 3308
2022-10-14 11:10:07.487 [t00814305-PTAC ] ShellExecTask.cpp:25 1| . Execute: klee-stats --utbot-config /home/utbot/remote/SampleDocker2/build/utbot_files/klee_out/src/quick_sort_dot_c --table-format=readable-csv
from directory: /home/utbot/distr/2022.10.5/utbot_distr
2022-10-14 11:10:07.496 [t00814305-PTAC ] BaseForkTask.cpp:73 ERR| . Exit status: 255
2022-10-14 11:10:07.497 [t00814305-PTAC ] BaseForkTask.cpp:74 ERR| . See details in "/home/utbot/distr/2022.10.5/utbot_distr/logs/t00814305-PTAC/2022-10-14T08-10-07484.log"
2022-10-14 11:10:07.497 [t00814305-PTAC ] KleeRunner.cpp:35 ERR| . klee-stats call failed:
2022-10-14 11:10:07.497 [t00814305-PTAC ] Tests.cpp:542 1| . { parseKTest
2022-10-14 11:10:07.497 [t00814305-PTAC ] Tests.cpp:547 1| . . Parse klee for method: foo_bar
2022-10-14 11:10:07.497 [t00814305-PTAC ] Tests.cpp:771 9| . . Test case #1:
return: '1'
2022-10-14 11:10:07.497 [t00814305-PTAC ] Tests.cpp:771 9| . . Test case #2:
return: '<'
2022-10-14 11:10:07.497 [t00814305-PTAC ] Tests.cpp:771 9| . . Test case #3:
return: '0'
2022-10-14 11:10:07.497 [t00814305-PTAC ] Tests.cpp:542 1| . } 0.000 s: parseKTest
2022-10-14 11:10:07.497 [t00814305-PTAC ] Tests.cpp:542 1| . { parseKTest
2022-10-14 11:10:07.497 [t00814305-PTAC ] Tests.cpp:547 1| . . Parse klee for method: main
2022-10-14 11:10:07.497 [t00814305-PTAC ] Tests.cpp:771 9| . . Test case #1:
return: 0
2022-10-14 11:10:07.497 [t00814305-PTAC ] Tests.cpp:542 1| . } 0.000 s: parseKTest
2022-10-14 11:10:07.498 [t00814305-PTAC ] KleeGenerator.cpp:358 1| . Generated code for 2 tests
2022-10-14 11:10:07.498 [t00814305-PTAC ] SARIFGenerator.cpp:50 1| . { sarifAddTestsToResults
2022-10-14 11:10:07.498 [t00814305-PTAC ] SARIFGenerator.cpp:50 1| . } 0.000 s: sarifAddTestsToResults
2022-10-14 11:10:07.498 [t00814305-PTAC ] ServerTestsWriter.cpp:43 1| . Creating final response.