[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20260108114419.52747-1-sgarzare@redhat.com>
Date: Thu, 8 Jan 2026 12:44:19 +0100
From: Stefano Garzarella <sgarzare@...hat.com>
To: netdev@...r.kernel.org
Cc: virtualization@...ts.linux.dev,
"David S. Miller" <davem@...emloft.net>,
Stefan Hajnoczi <stefanha@...hat.com>,
linux-kernel@...r.kernel.org,
Stefano Garzarella <sgarzare@...hat.com>,
Luigi Leonardi <leonardi@...hat.com>
Subject: [PATCH net v2] vsock/test: add a final full barrier after run all tests
From: Stefano Garzarella <sgarzare@...hat.com>
If the last test fails, the other side still completes correctly,
which could lead to false positives.
Let's add a final barrier that ensures that the last test has finished
correctly on both sides, but also that the two sides agree on the
number of tests to be performed.
Fixes: 2f65b44e199c ("VSOCK: add full barrier between test cases")
Reviewed-by: Luigi Leonardi <leonardi@...hat.com>
Signed-off-by: Stefano Garzarella <sgarzare@...hat.com>
---
v2:
- code unchanged from v1
- target net tree and add fixes tag [Paolo]
- added Luigi's R-b
v1: https://lore.kernel.org/netdev/20251223162210.43976-1-sgarzare@redhat.com/
---
tools/testing/vsock/util.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tools/testing/vsock/util.c b/tools/testing/vsock/util.c
index d843643ced6b..9430ef5b8bc3 100644
--- a/tools/testing/vsock/util.c
+++ b/tools/testing/vsock/util.c
@@ -511,6 +511,18 @@ void run_tests(const struct test_case *test_cases,
printf("ok\n");
}
+
+ printf("All tests have been executed. Waiting other peer...");
+ fflush(stdout);
+
+ /*
+ * Final full barrier, to ensure that all tests have been run and
+ * that even the last one has been successful on both sides.
+ */
+ control_writeln("COMPLETED");
+ control_expectln("COMPLETED");
+
+ printf("ok\n");
}
void list_tests(const struct test_case *test_cases)
--
2.52.0
Powered by blists - more mailing lists