diff options
| author | Stefano Garzarella <sgarzare@redhat.com> | 2026-01-08 12:44:19 +0100 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-01-10 12:07:25 -0800 |
| commit | c39a6a277e0e67ffff6a8efcbbf7e7e23ce9e38c (patch) | |
| tree | 77e9e41ba41331e4caa71b644b8f99f2247ee4c9 /tools | |
| parent | e67c577d89894811ce4dcd1a9ed29d8b63476667 (diff) | |
vsock/test: add a final full barrier after run all tests
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@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Link: https://patch.msgid.link/20260108114419.52747-1-sgarzare@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/testing/vsock/util.c | 12 |
1 files changed, 12 insertions, 0 deletions
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) |
