Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed #12063 - use less heavy code in executor tests #5566

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions test/testprocessexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class TestProcessExecutorBase : public TestFixture {
oss << "int main()\n"
<< "{\n";
for (int i = 0; i < 500; i++)
oss << " {char *a = malloc(10);}\n";
oss << " {int i = *((int*)0);}\n";

oss << " return 0;\n"
<< "}\n";
Expand All @@ -173,7 +173,7 @@ class TestProcessExecutorBase : public TestFixture {
check(16, 100, 100,
"int main()\n"
"{\n"
" char *a = malloc(10);\n"
" int i = *((int*)0);\n"
" return 0;\n"
"}");
}
Expand All @@ -184,7 +184,7 @@ class TestProcessExecutorBase : public TestFixture {
check(16, 100, 100,
"int main()\n"
"{\n"
" char *a = malloc(10);\n"
" int i = *((int*)0);\n"
" return 0;\n"
"}", dinit(CheckOptions, $.showtime = SHOWTIME_MODES::SHOWTIME_SUMMARY));
}
Expand All @@ -196,7 +196,7 @@ class TestProcessExecutorBase : public TestFixture {
check(16, 100, 100,
"int main()\n"
"{\n"
" char *a = malloc(10);\n"
" int i = *((int*)0);\n"
" return 0;\n"
"}", dinit(CheckOptions, $.plistOutput = plistOutput.c_str()));
}
Expand Down Expand Up @@ -229,7 +229,7 @@ class TestProcessExecutorBase : public TestFixture {
check(2, 1, 1,
"int main()\n"
"{\n"
" {char *a = malloc(10);}\n"
" {int i = *((int*)0);}\n"
" return 0;\n"
"}");
}
Expand All @@ -238,7 +238,7 @@ class TestProcessExecutorBase : public TestFixture {
check(2, 20, 20,
"int main()\n"
"{\n"
" {char *a = malloc(10);}\n"
" {int i = *((int*)0);}\n"
" return 0;\n"
"}");
}
Expand All @@ -256,7 +256,7 @@ class TestProcessExecutorBase : public TestFixture {
check(2, 4, 2,
"int main()\n"
"{\n"
" char *a = malloc(10);\n"
" int i = *((int*)0);\n"
" return 0;\n"
"}",
dinit(CheckOptions,
Expand Down
12 changes: 6 additions & 6 deletions test/testsingleexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class TestSingleExecutorBase : public TestFixture {
check(100, 100,
"int main()\n"
"{\n"
" char *a = malloc(10);\n"
" int i = *((int*)0);\n"
" return 0;\n"
"}", dinit(CheckOptions,
$.quiet = false));
Expand All @@ -180,7 +180,7 @@ class TestSingleExecutorBase : public TestFixture {
check(100, 100,
"int main()\n"
"{\n"
" char *a = malloc(10);\n"
" int i = *((int*)0);\n"
" return 0;\n"
"}", dinit(CheckOptions, $.showtime = SHOWTIME_MODES::SHOWTIME_SUMMARY));
}
Expand All @@ -192,7 +192,7 @@ class TestSingleExecutorBase : public TestFixture {
check(100, 100,
"int main()\n"
"{\n"
" char *a = malloc(10);\n"
" int i = *((int*)0);\n"
" return 0;\n"
"}", dinit(CheckOptions, $.plistOutput = plistOutput.c_str()));
}
Expand Down Expand Up @@ -225,7 +225,7 @@ class TestSingleExecutorBase : public TestFixture {
check(1, 1,
"int main()\n"
"{\n"
" {char *a = malloc(10);}\n"
" {int i = *((int*)0);}\n"
" return 0;\n"
"}");
}
Expand All @@ -234,7 +234,7 @@ class TestSingleExecutorBase : public TestFixture {
check(20, 20,
"int main()\n"
"{\n"
" {char *a = malloc(10);}\n"
" {int i = *((int*)0);}\n"
" return 0;\n"
"}");
}
Expand All @@ -252,7 +252,7 @@ class TestSingleExecutorBase : public TestFixture {
check(4, 2,
"int main()\n"
"{\n"
" char *a = malloc(10);\n"
" int i = *((int*)0);\n"
" return 0;\n"
"}",
dinit(CheckOptions,
Expand Down
14 changes: 7 additions & 7 deletions test/testthreadexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class TestThreadExecutorBase : public TestFixture {
oss << "int main()\n"
<< "{\n";
for (int i = 0; i < 500; i++)
oss << " {char *a = malloc(10);}\n";
oss << " {int i = *((int*)0);}\n";

oss << " return 0;\n"
<< "}\n";
Expand All @@ -172,7 +172,7 @@ class TestThreadExecutorBase : public TestFixture {
check(16, 100, 100,
"int main()\n"
"{\n"
" char *a = malloc(10);\n"
" int i = *((int*)0);\n"
" return 0;\n"
"}");
}
Expand All @@ -183,7 +183,7 @@ class TestThreadExecutorBase : public TestFixture {
check(16, 100, 100,
"int main()\n"
"{\n"
" char *a = malloc(10);\n"
" int i = *((int*)0);\n"
" return 0;\n"
"}", dinit(CheckOptions, $.showtime = SHOWTIME_MODES::SHOWTIME_SUMMARY));
}
Expand All @@ -195,7 +195,7 @@ class TestThreadExecutorBase : public TestFixture {
check(16, 100, 100,
"int main()\n"
"{\n"
" char *a = malloc(10);\n"
" int i = *((int*)0);\n"
" return 0;\n"
"}", dinit(CheckOptions, $.plistOutput = plistOutput.c_str()));
}
Expand Down Expand Up @@ -228,7 +228,7 @@ class TestThreadExecutorBase : public TestFixture {
check(2, 1, 1,
"int main()\n"
"{\n"
" {char *a = malloc(10);}\n"
" {int i = *((int*)0);}\n"
" return 0;\n"
"}");
}
Expand All @@ -237,7 +237,7 @@ class TestThreadExecutorBase : public TestFixture {
check(2, 20, 20,
"int main()\n"
"{\n"
" {char *a = malloc(10);}\n"
" {int i = *((int*)0);}\n"
" return 0;\n"
"}");
}
Expand All @@ -255,7 +255,7 @@ class TestThreadExecutorBase : public TestFixture {
check(2, 4, 2,
"int main()\n"
"{\n"
" char *a = malloc(10);\n"
" int i = *((int*)0);\n"
" return 0;\n"
"}",
dinit(CheckOptions,
Expand Down
Loading