Skip to content

Commit

Permalink
Fix fallback logic
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinav92003 committed Dec 19, 2024
1 parent 35ab162 commit 9093753
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions clients/drcachesim/tests/scheduler_unit_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1509,7 +1509,7 @@ test_synthetic_with_syscall_seq()
// precise output for this test on Windows.
if (sched_as_string[0] != CORE0_SCHED_STRING ||
sched_as_string[1] != CORE1_SCHED_STRING) {
bool found_single_A = false, found_single_B = false, found_single_C = false;
bool found_single_A = false, found_single_B = false, found_single_D = false;
for (int cpu = 0; cpu < NUM_OUTPUTS; ++cpu) {
for (size_t i = 1; i < sched_as_string[cpu].size() - 1; ++i) {
if (sched_as_string[cpu][i] == 'A' &&
Expand All @@ -1520,10 +1520,10 @@ test_synthetic_with_syscall_seq()
sched_as_string[cpu][i - 1] != 'B' &&
sched_as_string[cpu][i + 1] != 'B')
found_single_B = true;
if (sched_as_string[cpu][i] == 'C' &&
sched_as_string[cpu][i - 1] != 'C' &&
sched_as_string[cpu][i + 1] != 'C')
found_single_C = true;
if (sched_as_string[cpu][i] == 'D' &&
sched_as_string[cpu][i - 1] != 'D' &&
sched_as_string[cpu][i + 1] != 'D')
found_single_D = true;
}
}
bool found_syscall_a = false, found_syscall_b = false,
Expand All @@ -1542,7 +1542,7 @@ test_synthetic_with_syscall_seq()
found_syscall_d = true;
}
}
assert(found_single_A && found_single_B && found_single_C);
assert(found_single_A && found_single_B && found_single_D);
assert(found_syscall_a && found_syscall_b && found_syscall_c &&
found_syscall_d);
}
Expand Down

0 comments on commit 9093753

Please sign in to comment.