Skip to content

Commit

Permalink
Fix some tests that may stack overflow in aarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
Coldwings committed Apr 23, 2024
1 parent 81749a9 commit 11a09b2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions rpc/test/test-ooo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void* test_ooo_execution(void* args_)
TEST(OutOfOrder, Execution) {
OooEngine engine;
for (int i = 0; i < 5; ++i)
thread_create(test_ooo_execution, &engine, 64 * 1024);
thread_create(test_ooo_execution, &engine, DEFAULT_STACK_SIZE);

thread_yield();
wait_for_completion();
Expand Down Expand Up @@ -167,7 +167,7 @@ TEST(OutOfOrder, keep_same_tag) {
delete_ooo_execution_engine(engine);
});
for (int i=0;i<thread_num;i++) {
thread_create11(64*1024, test_ooo_same_tag, engine, &heavy_issue, &heavy_complete);
thread_create11(DEFAULT_STACK_SIZE, test_ooo_same_tag, engine, &heavy_issue, &heavy_complete);
}
thread_join(thread_enable_join(thread_create11(process_thread)));
}
Expand All @@ -181,7 +181,7 @@ TEST(OutOfOrder, heavy_test) {
delete_ooo_execution_engine(engine);
});
for (int i=0;i<thread_num;i++) {
thread_create11(64*1024, test_ooo, engine, &heavy_issue, &heavy_complete);
thread_create11(DEFAULT_STACK_SIZE, test_ooo, engine, &heavy_issue, &heavy_complete);
}
thread_join(thread_enable_join(thread_create11(process_thread)));
}
Expand Down Expand Up @@ -226,7 +226,7 @@ TEST(OutOfOrder, error_issue) {
delete_ooo_execution_engine(engine);
});
for (int i=0;i<thread_num;i++) {
thread_create11(64*1024, test_ooo, engine, &error_issue, &heavy_complete);
thread_create11(DEFAULT_STACK_SIZE, test_ooo, engine, &error_issue, &heavy_complete);
}
thread_join(thread_enable_join(thread_create11(process_thread)));
log_output = log_output_stdout;
Expand All @@ -247,7 +247,7 @@ TEST(OutOfOrder, error_complete) {
delete_ooo_execution_engine(engine);
});
for (int i=0;i<thread_num;i++) {
thread_create11(64*1024, test_ooo, engine, &heavy_issue, &error_complete);
thread_create11(DEFAULT_STACK_SIZE, test_ooo, engine, &heavy_issue, &error_complete);
}
thread_join(thread_enable_join(thread_create11(process_thread)));
thread_sleep(1);
Expand All @@ -267,7 +267,7 @@ TEST(OutOfOrder, error_process) {
delete_ooo_execution_engine(engine);
});
for (int i=0;i<thread_num;i++) {
thread_create11(64*1024, test_ooo, engine, &heavy_issue, &heavy_complete);
thread_create11(DEFAULT_STACK_SIZE, test_ooo, engine, &heavy_issue, &heavy_complete);
}
thread_join(thread_enable_join(thread_create11(error_process)));
thread_sleep(1);
Expand Down
6 changes: 3 additions & 3 deletions thread/test/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ void *func1(void *)

TEST(ThreadPool, test)
{
ThreadPool<64> pool(64*1024);
ThreadPool<64> pool(DEFAULT_STACK_SIZE);
vector<TPControl*> ths;
ths.resize(FLAGS_ths_total);
for (int i = 0; i<FLAGS_ths_total; i++)
Expand All @@ -733,7 +733,7 @@ TEST(ThreadPool, test)

TEST(ThreadPool, migrate) {
WorkPool wp(4, 0, 0, -1);
ThreadPool<64> pool(64 * 1024);
ThreadPool<64> pool(DEFAULT_STACK_SIZE);
vector<TPControl*> ths;
ths.resize(FLAGS_ths_total);
for (int i = 0; i < FLAGS_ths_total; i++) {
Expand All @@ -750,7 +750,7 @@ TEST(ThreadPool, migrate) {

TEST(ThreadPool, multithread) {
WorkPool wp(4, 0, 0, -1);
ThreadPool<64> pool(64 * 1024);
ThreadPool<64> pool(DEFAULT_STACK_SIZE);
vector<TPControl*> ths;
ths.resize(FLAGS_ths_total);
for (int i = 0; i < FLAGS_ths_total; i++) {
Expand Down

0 comments on commit 11a09b2

Please sign in to comment.