Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Stefano Garzarella and committed by
Jakub Kicinski
c39a6a27 e67c577d

+12
+12
tools/testing/vsock/util.c
··· 511 511 512 512 printf("ok\n"); 513 513 } 514 + 515 + printf("All tests have been executed. Waiting other peer..."); 516 + fflush(stdout); 517 + 518 + /* 519 + * Final full barrier, to ensure that all tests have been run and 520 + * that even the last one has been successful on both sides. 521 + */ 522 + control_writeln("COMPLETED"); 523 + control_expectln("COMPLETED"); 524 + 525 + printf("ok\n"); 514 526 } 515 527 516 528 void list_tests(const struct test_case *test_cases)