Skip to content

Commit 8c7cced

Browse files
Vladislav Kaluginladisgin
Vladislav Kalugin
authored andcommitted
Update KLEE, fix small bugs
1 parent 92a5078 commit 8c7cced

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

server/src/Server.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ Status Server::TestsGenServiceImpl::provideLoggingCallbacks(
423423
*/
424424
using namespace std::chrono_literals;
425425
while (holdLockFlag[callbackName].exchange(true, std::memory_order_acquire)) {
426-
std::this_thread::sleep_for(100ms);
426+
std::this_thread::sleep_for(1ms);
427427
}
428428
loguru::remove_callback(callbackName.c_str());
429429
if (openFiles) {

server/src/building/Linker.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ Result<Linker::LinkResult> Linker::linkWholeTarget(const fs::path &target) {
141141
insideFolder = false;
142142
}
143143
}
144-
if (!CollectionUtils::contains(testedFiles, objectInfo->getSourcePath()) && insideFolder) {
144+
if ( CollectionUtils::contains(testGen.tests, objectInfo->getSourcePath()) &&
145+
!CollectionUtils::contains(testedFiles, objectInfo->getSourcePath()) && insideFolder) {
145146
fs::path bitcodeFile = objectInfo->kleeFilesInfo->getKleeBitcodeFile();
146147
filesToLink.emplace(objectFile, bitcodeFile);
147148
} else {

server/test/framework/Syntax_Tests.cpp

+1-7
Original file line numberDiff line numberDiff line change
@@ -1464,7 +1464,7 @@ namespace {
14641464
}
14651465

14661466
TEST_F(Syntax_Test, Correct_CodeText_For_Regression_And_Error) {
1467-
auto [testGen, status] = createTestForFunction(linked_list_c, 3);
1467+
auto [testGen, status] = createTestForFunction(structs_with_pointers_c, 78);
14681468
const std::string code = testGen.tests.begin()->second.code;
14691469
const std::string beginRegressionRegion = "#pragma region " + Tests::DEFAULT_SUITE_NAME + NL;
14701470
const std::string endRegion = std::string("#pragma endregion") + NL;
@@ -1982,9 +1982,6 @@ namespace {
19821982
{
19831983
[] (const tests::Tests::MethodTestCase& testCase) {
19841984
return stoi(testCase.returnValue.view->getEntryValue(nullptr)) == -1;
1985-
},
1986-
[] (const tests::Tests::MethodTestCase& testCase) {
1987-
return stoi(testCase.returnValue.view->getEntryValue(nullptr)) > -1;
19881985
}
19891986
})
19901987
);
@@ -2676,9 +2673,6 @@ namespace {
26762673
testGen.tests.at(linked_list_c).methods.begin().value().testCases,
26772674
std::vector<TestCasePredicate>(
26782675
{
2679-
[] (const tests::Tests::MethodTestCase& testCase) {
2680-
return stoi(testCase.returnValue.view->getEntryValue(nullptr)) == 0;
2681-
},
26822676
[] (const tests::Tests::MethodTestCase& testCase) {
26832677
return stoi(testCase.returnValue.view->getEntryValue(nullptr)) == 1;
26842678
},

0 commit comments

Comments
 (0)