Report delivery failures per scenario without hiding subsequent channel cases
This commit is contained in:
1 parent
439361cb52
commit
67322582f6
1 file changed
+8
-4
@@ -222,6 +222,8 @@ static void run_for(unsigned ms, int sending, const char* phase) {
|
||||
test_clock_poll(ua, 10);
|
||||
for (int i = 0; i < 2; i++) CHECK(ep[i].conn->state != 2 && !ep[i].conn->reinit_pending);
|
||||
if (get_time_us() >= next_snapshot) { snapshot(phase); next_snapshot = get_time_us() + 100000; }
|
||||
if (!sending && ep[0].sent == ep[1].received && ep[1].sent == ep[0].received &&
|
||||
!ep[0].conn->unacked_bytes && !ep[1].conn->unacked_bytes) break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,8 +293,9 @@ static uint64_t measure_rate(const struct profile* settings, unsigned count, uns
|
||||
expect(useful >= capacity * 85 / 100, "application goodput >=85% capacity", useful, capacity * 85 / 100);
|
||||
}
|
||||
measuring = 0;
|
||||
run_for(5000, 0, "drain");
|
||||
for (int i = 0; i < 2; i++) CHECK(ep[i].sent == ep[1-i].received);
|
||||
run_for(10000, 0, "drain");
|
||||
for (int i = 0; i < 2; i++) expect(ep[i].sent == ep[1-i].received, "complete ordered delivery after drain",
|
||||
ep[1-i].received, ep[i].sent);
|
||||
teardown(); return rate;
|
||||
}
|
||||
|
||||
@@ -354,8 +357,9 @@ static void stalled(const struct profile* settings, unsigned count, unsigned bro
|
||||
measuring = 0;
|
||||
for (unsigned p = 0; p < count; p++) if (broken & (1u << p))
|
||||
for (unsigned dir = 0; dir < 2; dir++) CHECK(dummynet_set_mode(channels[p], dir, DUMMYNET_RUN) == 0);
|
||||
run_for(3000, 1, "recovery"); run_for(5000, 0, "drain");
|
||||
for (int i = 0; i < 2; i++) CHECK(ep[i].sent == ep[1-i].received);
|
||||
run_for(3000, 1, "recovery"); run_for(10000, 0, "drain");
|
||||
for (int i = 0; i < 2; i++) expect(ep[i].sent == ep[1-i].received, "complete delivery after recovery",
|
||||
ep[1-i].received, ep[i].sent);
|
||||
teardown();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user