From: Chunsong Feng Date: Thu, 14 Nov 2019 06:58:30 +0000 (+0800) Subject: test/msgr: fix ComplexTest fail when using DPDK protocal stack X-Git-Tag: v15.1.1~157^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=00b23d99551dbadf1daae1bf71904d883a5a5626;p=ceph.git test/msgr: fix ComplexTest fail when using DPDK protocal stack The DPDK protocol stack failed to run ComplexTest. When testing the DPDK protocol stack, the same session will be received by the same queue by the RSS. The test case ComplexTest uses two CPUs to run the server and client respectively. The message sent by the client cannot be forwarded to the server, so the test fails. When support_local_listen_table() is true, let the client connect to the server on the same CPU and the test pass. Signed-off-by: Chunsong Feng --- diff --git a/src/test/msgr/test_async_networkstack.cc b/src/test/msgr/test_async_networkstack.cc index fab2e33b3904..7ec68d304107 100644 --- a/src/test/msgr/test_async_networkstack.cc +++ b/src/test/msgr/test_async_networkstack.cc @@ -461,10 +461,12 @@ TEST_P(NetworkWorkerTest, ComplexTest) { } ConnectedSocket cli_socket, srv_socket; if (worker->id == 1) { - while (!*listen_p) { + while (!*listen_p || stack->support_local_listen_table()) { usleep(50); r = worker->connect(bind_addr, options, &cli_socket); ASSERT_EQ(0, r); + if (stack->support_local_listen_table()) + break; } }