提交 2f65b44e 编写于 作者: S Stefan Hajnoczi 提交者: David S. Miller

VSOCK: add full barrier between test cases

See code comment for details.
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: NStefano Garzarella <sgarzare@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 9bb8a29d
......@@ -161,10 +161,24 @@ void run_tests(const struct test_case *test_cases,
printf("%s...", test_cases[i].name);
fflush(stdout);
if (opts->mode == TEST_MODE_CLIENT)
if (opts->mode == TEST_MODE_CLIENT) {
/* Full barrier before executing the next test. This
* ensures that client and server are executing the
* same test case. In particular, it means whoever is
* faster will not see the peer still executing the
* last test. This is important because port numbers
* can be used by multiple test cases.
*/
control_expectln("NEXT");
control_writeln("NEXT");
run = test_cases[i].run_client;
else
} else {
control_writeln("NEXT");
control_expectln("NEXT");
run = test_cases[i].run_server;
}
if (run)
run(opts);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册