]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test/msgr: fix ComplexTest fail when using DPDK protocal stack
authorChunsong Feng <fengchunsong@huawei.com>
Thu, 14 Nov 2019 06:58:30 +0000 (14:58 +0800)
committerluo rixin <luorixin@huawei.com>
Thu, 28 Nov 2019 03:39:43 +0000 (11:39 +0800)
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 <fengchunsong@huawei.com>
src/test/msgr/test_async_networkstack.cc

index fab2e33b3904d79bb49a7ff485f81eb52e6bb3f0..7ec68d304107b4b1b3550e9e8d1ea71bc2df5bad 100644 (file)
@@ -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;
       }
     }