All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] testsuite/smokey: net: Ignore late or lost packets when running in VM
@ 2021-08-10 10:17 Jan Kiszka
  0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2021-08-10 10:17 UTC (permalink / raw)
  To: Xenomai

From: Jan Kiszka <jan.kiszka@siemens.com>

Do not fail the test if packets arrive late or are lost due to the
delays a VM, specifically an emulator like QEMU, may bring. Only if all
packets are lost, something is wrong and should be reported.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

This now replaces "testsuite/smokey: net_client: skip late packet error 
in vm mode" in next.

 testsuite/smokey/net_common/client.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/testsuite/smokey/net_common/client.c b/testsuite/smokey/net_common/client.c
index d13d72918a..914bda4a49 100644
--- a/testsuite/smokey/net_common/client.c
+++ b/testsuite/smokey/net_common/client.c
@@ -204,6 +204,12 @@ static int smokey_net_client_loop(struct smokey_net_client *client)
 		} while (err != -ETIMEDOUT);
 	}
 
+	if (smokey_on_vm) {
+		glate = 0; /* ignore late arrivals */
+		if (glost != limit)
+			glost = 0; /* ignore some lost packets, not all */
+	}
+
 	if (glost || glate)
 		fprintf(stderr, "RTnet %s test failed", client->name);
 	if (glost) {
-- 
2.31.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-10 10:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-10 10:17 [PATCH] testsuite/smokey: net: Ignore late or lost packets when running in VM Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.