All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Xenomai <xenomai@xenomai.org>
Subject: [PATCH] testsuite/smokey: net: Ignore late or lost packets when running in VM
Date: Tue, 10 Aug 2021 12:17:27 +0200	[thread overview]
Message-ID: <ccc448d1-deb7-8c67-96b7-535e5b8b0176@siemens.com> (raw)

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


                 reply	other threads:[~2021-08-10 10:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ccc448d1-deb7-8c67-96b7-535e5b8b0176@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.