test_infra: make measure_virtio_net_throughput & co measure PPS too

While measuring UDP PPS, we saturate the link, so there are packets
lost. We only account for the packets that are not lost.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu
2023-01-05 20:52:41 +00:00
committed by Rob Bradford
parent d50a4cbb6b
commit 08e4d1f481
3 changed files with 60 additions and 17 deletions

View File

@@ -9423,7 +9423,8 @@ mod rate_limiter {
let r = std::panic::catch_unwind(|| {
guest.wait_vm_boot(None).unwrap();
let measured_bps =
measure_virtio_net_throughput(test_timeout, num_queues / 2, &guest, rx).unwrap();
measure_virtio_net_throughput(test_timeout, num_queues / 2, &guest, rx, true)
.unwrap();
assert!(check_rate_limit(measured_bps, limit_bps, 0.1));
});