From: Patrick Donnelly Date: Fri, 1 Feb 2019 18:07:58 +0000 (-0800) Subject: test/mds: fix Session cons call X-Git-Tag: v12.2.12~63^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5ed5c518a1a4bd12c02cbc81977c1a126c86e8ea;p=ceph.git test/mds: fix Session cons call Problem did not exist in master. Signed-off-by: Patrick Donnelly --- diff --git a/src/test/mds/TestSessionFilter.cc b/src/test/mds/TestSessionFilter.cc index 98e2212506f..d9f495fe8d0 100644 --- a/src/test/mds/TestSessionFilter.cc +++ b/src/test/mds/TestSessionFilter.cc @@ -74,8 +74,8 @@ TEST(MDSSessionFilter, IdEquality) SessionFilter filter; std::stringstream ss; filter.parse({"id=123"}, &ss); - Session *a = new Session();; - Session *b = new Session();; + Session *a = new Session(nullptr);; + Session *b = new Session(nullptr);; a->info.inst.name.parse("client.123"); b->info.inst.name.parse("client.456"); @@ -90,9 +90,9 @@ TEST(MDSSessionFilter, StateEquality) SessionFilter filter; std::stringstream ss; filter.parse({"state=closing"}, &ss); - Session *a = new Session(); + Session *a = new Session(nullptr); a->set_state(Session::STATE_CLOSING); - Session *b = new Session(); + Session *b = new Session(nullptr); b->set_state(Session::STATE_OPENING); ASSERT_TRUE(filter.match(*a, [](client_t c) -> bool {return false;})); @@ -106,9 +106,9 @@ TEST(MDSSessionFilter, AuthEquality) SessionFilter filter; std::stringstream ss; filter.parse({"auth_name=rhubarb"}, &ss); - Session *a = new Session(); + Session *a = new Session(nullptr); a->info.auth_name.set_id("rhubarb"); - Session *b = new Session(); + Session *b = new Session(nullptr); b->info.auth_name.set_id("custard"); ASSERT_TRUE(filter.match(*a, [](client_t c) -> bool {return false;})); @@ -123,9 +123,9 @@ TEST(MDSSessionFilter, MetadataEquality) std::stringstream ss; int r = filter.parse({"client_metadata.root=/rhubarb"}, &ss); ASSERT_EQ(r, 0); - Session *a = new Session(); + Session *a = new Session(nullptr); a->set_client_metadata(std::map({{"root", "/rhubarb"}})); - Session *b = new Session(); + Session *b = new Session(nullptr); b->set_client_metadata(std::map({{"root", "/custard"}})); ASSERT_TRUE(filter.match(*a, [](client_t c) -> bool {return false;})); @@ -140,7 +140,7 @@ TEST(MDSSessionFilter, ReconnectingEquality) std::stringstream ss; int r = filter.parse({"reconnecting=true"}, &ss); ASSERT_EQ(r, 0); - Session *a = new Session(); + Session *a = new Session(nullptr); ASSERT_TRUE(filter.match(*a, [](client_t c) -> bool {return true;})); ASSERT_FALSE(filter.match(*a, [](client_t c) -> bool {return false;}));