* [PATCH net-next] vsock/test: add a final full barrier after run all tests
@ 2025-12-23 16:22 Stefano Garzarella
2025-12-24 13:18 ` Luigi Leonardi
2025-12-30 11:08 ` Paolo Abeni
0 siblings, 2 replies; 3+ messages in thread
From: Stefano Garzarella @ 2025-12-23 16:22 UTC (permalink / raw)
To: netdev; +Cc: virtualization, linux-kernel, Stefano Garzarella
From: Stefano Garzarella <sgarzare@redhat.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.
Signed-off-by: Stefano Garzarella <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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] vsock/test: add a final full barrier after run all tests
2025-12-23 16:22 [PATCH net-next] vsock/test: add a final full barrier after run all tests Stefano Garzarella
@ 2025-12-24 13:18 ` Luigi Leonardi
2025-12-30 11:08 ` Paolo Abeni
1 sibling, 0 replies; 3+ messages in thread
From: Luigi Leonardi @ 2025-12-24 13:18 UTC (permalink / raw)
To: Stefano Garzarella; +Cc: netdev, virtualization, linux-kernel
On Tue, Dec 23, 2025 at 05:22:10PM +0100, Stefano Garzarella wrote:
>From: Stefano Garzarella <sgarzare@redhat.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.
>
>Signed-off-by: Stefano Garzarella <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
>
LGTM!
Reviewed-by: Luigi Leonardi <leonardi@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] vsock/test: add a final full barrier after run all tests
2025-12-23 16:22 [PATCH net-next] vsock/test: add a final full barrier after run all tests Stefano Garzarella
2025-12-24 13:18 ` Luigi Leonardi
@ 2025-12-30 11:08 ` Paolo Abeni
1 sibling, 0 replies; 3+ messages in thread
From: Paolo Abeni @ 2025-12-30 11:08 UTC (permalink / raw)
To: Stefano Garzarella, netdev; +Cc: virtualization, linux-kernel
On 12/23/25 5:22 PM, Stefano Garzarella wrote:
> From: Stefano Garzarella <sgarzare@redhat.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.
>
> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Net-next is currently closed; still this looks material suitable for
'net', with a proper Fixes tag.
Please repost for net if you agree.
Thanks,
Paolo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-12-30 11:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-23 16:22 [PATCH net-next] vsock/test: add a final full barrier after run all tests Stefano Garzarella
2025-12-24 13:18 ` Luigi Leonardi
2025-12-30 11:08 ` Paolo Abeni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).