]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/mds: don't drop await_idle_v under NDEBUG 69157/head
authorSun Yuechi <sunyuechi@iscas.ac.cn>
Fri, 29 May 2026 08:15:27 +0000 (16:15 +0800)
committerSun Yuechi <sunyuechi@iscas.ac.cn>
Fri, 29 May 2026 08:24:39 +0000 (16:24 +0800)
await_idle_v() is wrapped in assert(), so with NDEBUG it is never
called and the test reads a default-constructed ack, racing the agent
thread. Use EXPECT_TRUE() like the rest of the file.

Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
src/test/mds/TestQuiesceAgent.cc

index aa108075faa59fec54bde8a62f4cb83caf9788b6..7940d8a500406189539cf53d2dabae90410c6f6b 100644 (file)
@@ -192,7 +192,7 @@ class QuiesceAgentTest : public testing::Test {
       if (WaitForAgent::No == wait) {
         return std::nullopt;
       } else {
-        assert(await_idle_v(v.set_version));
+        EXPECT_TRUE(await_idle_v(v.set_version));
         return async_ack;
       }
     }