diff --git a/test/bus/list_names.cpp b/test/bus/list_names.cpp
index 65333b7..a1967d9 100644
--- a/test/bus/list_names.cpp
+++ b/test/bus/list_names.cpp
@@ -5,17 +5,15 @@
 
 class ListNames : public ::testing::Test
 {
-    protected:
-        decltype(sdbusplus::bus::new_default()) bus =
-                sdbusplus::bus::new_default();
+  protected:
+    decltype(sdbusplus::bus::new_default()) bus = sdbusplus::bus::new_default();
 };
 
 TEST_F(ListNames, NoServiceNameWithoutRequestName)
 {
     auto names = bus.list_names_acquired();
 
-    EXPECT_EQ(names.cend(),
-              std::find(names.cbegin(), names.cend(), this_name));
+    EXPECT_EQ(names.cend(), std::find(names.cbegin(), names.cend(), this_name));
 }
 
 TEST_F(ListNames, HasServiceNameAfterRequestName)
@@ -38,7 +36,6 @@
               std::find(names.cbegin(), names.cend(), bus.get_unique_name()));
 }
 
-
 TEST_F(ListNames, HasDbusServer)
 {
     auto names = bus.list_names_acquired();
diff --git a/test/bus/match.cpp b/test/bus/match.cpp
index c69c76b..80bc259 100644
--- a/test/bus/match.cpp
+++ b/test/bus/match.cpp
@@ -4,41 +4,37 @@
 
 class Match : public ::testing::Test
 {
-    protected:
-        decltype(sdbusplus::bus::new_default()) bus =
-                sdbusplus::bus::new_default();
+  protected:
+    decltype(sdbusplus::bus::new_default()) bus = sdbusplus::bus::new_default();
 
-        static constexpr auto busName =
-                "xyz.openbmc_project.sdbusplus.test.Match";
+    static constexpr auto busName = "xyz.openbmc_project.sdbusplus.test.Match";
 
+    static auto matchRule()
+    {
+        using namespace sdbusplus::bus::match::rules;
+        return nameOwnerChanged() + argN(0, busName);
+    }
 
-        static auto matchRule()
+    void waitForIt(bool& triggered)
+    {
+        for (size_t i = 0; (i < 16) && !triggered; ++i)
         {
-            using namespace sdbusplus::bus::match::rules;
-            return nameOwnerChanged() + argN(0, busName);
+            bus.wait(0);
+            bus.process_discard();
         }
-
-        void waitForIt(bool& triggered)
-        {
-            for (size_t i = 0; (i < 16) && !triggered; ++i)
-            {
-                bus.wait(0);
-                bus.process_discard();
-            }
-        }
+    }
 };
 
 TEST_F(Match, FunctorIs_sd_bus_message_handler_t)
 {
     bool triggered = false;
-    auto trigger = [](sd_bus_message *m, void* context, sd_bus_error* e)
-        {
-            *static_cast<bool*>(context) = true;
-            return 0;
-        };
+    auto trigger = [](sd_bus_message* m, void* context, sd_bus_error* e) {
+        *static_cast<bool*>(context) = true;
+        return 0;
+    };
 
     sdbusplus::bus::match_t m{bus, matchRule(), trigger, &triggered};
-    auto m2 = std::move(m);  // ensure match is move-safe.
+    auto m2 = std::move(m); // ensure match is move-safe.
 
     waitForIt(triggered);
     ASSERT_FALSE(triggered);
@@ -52,13 +48,12 @@
 TEST_F(Match, FunctorIs_LambdaTakingMessage)
 {
     bool triggered = false;
-    auto trigger = [&triggered](sdbusplus::message::message& m)
-        {
-            triggered = true;
-        };
+    auto trigger = [&triggered](sdbusplus::message::message& m) {
+        triggered = true;
+    };
 
     sdbusplus::bus::match_t m{bus, matchRule(), trigger};
-    auto m2 = std::move(m);  // ensure match is move-safe.
+    auto m2 = std::move(m); // ensure match is move-safe.
 
     waitForIt(triggered);
     ASSERT_FALSE(triggered);
@@ -74,20 +69,20 @@
 
     class BoolHolder
     {
-        public:
-            bool triggered = false;
+      public:
+        bool triggered = false;
 
-            void callback(sdbusplus::message::message& m)
-            {
-                triggered = true;
-            }
+        void callback(sdbusplus::message::message& m)
+        {
+            triggered = true;
+        }
     };
     BoolHolder b;
 
     sdbusplus::bus::match_t m{bus, matchRule(),
-                              std::bind(std::mem_fn(&BoolHolder::callback),
-                                        &b, std::placeholders::_1)};
-    auto m2 = std::move(m);  // ensure match is move-safe.
+                              std::bind(std::mem_fn(&BoolHolder::callback), &b,
+                                        std::placeholders::_1)};
+    auto m2 = std::move(m); // ensure match is move-safe.
 
     waitForIt(b.triggered);
     ASSERT_FALSE(b.triggered);
diff --git a/test/message/append.cpp b/test/message/append.cpp
index c3a06db..7782f02 100644
--- a/test/message/append.cpp
+++ b/test/message/append.cpp
@@ -6,7 +6,7 @@
 // Global to share the dbus type string between client and server.
 static std::string verifyTypeString;
 
-using verifyCallback_t = void(*)(sd_bus_message*);
+using verifyCallback_t = void (*)(sd_bus_message*);
 verifyCallback_t verifyCallback = nullptr;
 
 static constexpr auto SERVICE = "sdbusplus.test.message.append";
@@ -28,12 +28,12 @@
 {
     auto bus = sdbusplus::bus::bus(reinterpret_cast<sdbusplus::bus::busp_t>(b));
 
-    while(1)
+    while (1)
     {
         // Wait for messages.
         auto m = bus.process().release();
 
-        if(m == nullptr)
+        if (m == nullptr)
         {
             bus.wait();
             continue;
@@ -50,8 +50,8 @@
             }
             else
             {
-                std::cout << "Warning: No verification for "
-                          << verifyTypeString << std::endl;
+                std::cout << "Warning: No verification for " << verifyTypeString
+                          << std::endl;
             }
             // Reply to client.
             sd_bus_reply_method_return(m, nullptr);
@@ -233,8 +233,7 @@
         const char* str3 = "1234";
         const char* const str4 = "5678";
         const auto str5 = "!@#$";
-        m.append(1, "asdf", "ASDF"s, str,
-                 std::move(str2), str3, str4, str5, 5);
+        m.append(1, "asdf", "ASDF"s, str, std::move(str2), str3, str4, str5, 5);
         verifyTypeString = "isssssssi";
 
         struct verify
@@ -245,8 +244,8 @@
                 const char *s0 = nullptr, *s1 = nullptr, *s2 = nullptr,
                            *s3 = nullptr, *s4 = nullptr, *s5 = nullptr,
                            *s6 = nullptr;
-                sd_bus_message_read(m, "isssssssi", &a, &s0, &s1, &s2, &s3,
-                                    &s4, &s5, &s6, &b);
+                sd_bus_message_read(m, "isssssssi", &a, &s0, &s1, &s2, &s3, &s4,
+                                    &s5, &s6, &b);
                 assert(a == 1);
                 assert(b == 5);
                 assert(0 == strcmp("asdf", s0));
@@ -283,7 +282,6 @@
                 assert(b == 4);
                 assert(0 == strcmp("/asdf", s0));
                 assert(0 == strcmp("iii", s1));
-
             }
         };
         verifyCallback = &verify::op;
@@ -294,7 +292,7 @@
     // Test vector.
     {
         auto m = newMethodCall__test(b);
-        std::vector<std::string> s{ "1", "2", "3"};
+        std::vector<std::string> s{"1", "2", "3"};
         m.append(1, s, 2);
         verifyTypeString = "iasi";
 
@@ -306,9 +304,8 @@
                 sd_bus_message_read(m, "i", &a);
                 assert(a == 1);
 
-                auto rc = sd_bus_message_enter_container(m,
-                                                         SD_BUS_TYPE_ARRAY,
-                                                         "s");
+                auto rc =
+                    sd_bus_message_enter_container(m, SD_BUS_TYPE_ARRAY, "s");
                 assert(0 <= rc);
 
                 const char* s = nullptr;
@@ -324,19 +321,17 @@
 
                 sd_bus_message_read(m, "i", &a);
                 assert(a == 2);
-
             }
         };
         verifyCallback = &verify::op;
 
-
         b.call_noreply(m);
     }
 
     // Test map.
     {
         auto m = newMethodCall__test(b);
-        std::map<std::string, int> s = { { "asdf", 3 }, { "jkl;", 4 } };
+        std::map<std::string, int> s = {{"asdf", 3}, {"jkl;", 4}};
         m.append(1, s, 2);
         verifyTypeString = "ia{si}i";
 
@@ -348,13 +343,11 @@
                 sd_bus_message_read(m, "i", &a);
                 assert(a == 1);
 
-                auto rc = sd_bus_message_enter_container(m,
-                                                         SD_BUS_TYPE_ARRAY,
+                auto rc = sd_bus_message_enter_container(m, SD_BUS_TYPE_ARRAY,
                                                          "{si}");
                 assert(0 <= rc);
 
-                rc = sd_bus_message_enter_container(m,
-                                                    SD_BUS_TYPE_DICT_ENTRY,
+                rc = sd_bus_message_enter_container(m, SD_BUS_TYPE_DICT_ENTRY,
                                                     "si");
                 assert(0 <= rc);
 
@@ -367,8 +360,7 @@
                 assert(1 == sd_bus_message_at_end(m, false));
                 sd_bus_message_exit_container(m);
 
-                rc = sd_bus_message_enter_container(m,
-                                                    SD_BUS_TYPE_DICT_ENTRY,
+                rc = sd_bus_message_enter_container(m, SD_BUS_TYPE_DICT_ENTRY,
                                                     "si");
                 assert(0 <= rc);
 
@@ -395,7 +387,7 @@
     // Test tuple.
     {
         auto m = newMethodCall__test(b);
-        std::tuple<int, double, std::string> a{ 3, 4.1, "asdf" };
+        std::tuple<int, double, std::string> a{3, 4.1, "asdf"};
         m.append(1, a, 2);
         verifyTypeString = "i(ids)i";
 
@@ -410,8 +402,7 @@
                 sd_bus_message_read(m, "i", &a);
                 assert(a == 1);
 
-                auto rc = sd_bus_message_enter_container(m,
-                                                         SD_BUS_TYPE_STRUCT,
+                auto rc = sd_bus_message_enter_container(m, SD_BUS_TYPE_STRUCT,
                                                          "ids");
                 assert(0 <= rc);
 
@@ -470,8 +461,8 @@
     // Test map-variant.
     {
         auto m = newMethodCall__test(b);
-        std::map<std::string, sdbusplus::message::variant<int, double>> a1 =
-                { { "asdf", 3 }, { "jkl;", 4.1 } };
+        std::map<std::string, sdbusplus::message::variant<int, double>> a1 = {
+            {"asdf", 3}, {"jkl;", 4.1}};
         m.append(1, a1, 2);
         verifyTypeString = "ia{sv}i";
 
diff --git a/test/message/native_types.cpp b/test/message/native_types.cpp
index 3b46457..eed7669 100644
--- a/test/message/native_types.cpp
+++ b/test/message/native_types.cpp
@@ -28,24 +28,24 @@
 
 TEST(MessageNativeTypeConversions, SignatureInVector)
 {
-    std::vector<sdbusplus::message::signature> v =
-        { sdbusplus::message::signature("iii") };
+    std::vector<sdbusplus::message::signature> v = {
+        sdbusplus::message::signature("iii")};
 
     ASSERT_EQ(v.front(), "iii");
 }
 
 TEST(MessageNativeTypeConversions, SignatureInMap)
 {
-    std::map<sdbusplus::message::signature, int> m =
-        { { sdbusplus::message::signature("iii"), 1 } };
+    std::map<sdbusplus::message::signature, int> m = {
+        {sdbusplus::message::signature("iii"), 1}};
 
     ASSERT_EQ(m[sdbusplus::message::signature("iii")], 1);
 }
 
 TEST(MessageNativeTypeConversions, SignatureInUnorderedMap)
 {
-    std::unordered_map<sdbusplus::message::signature, int> u =
-        { { sdbusplus::message::signature("iii"), 2 } };
+    std::unordered_map<sdbusplus::message::signature, int> u = {
+        {sdbusplus::message::signature("iii"), 2}};
 
     ASSERT_EQ(u[sdbusplus::message::signature("iii")], 2);
 }
diff --git a/test/message/read.cpp b/test/message/read.cpp
index 2b137d7..8c2c4ea 100644
--- a/test/message/read.cpp
+++ b/test/message/read.cpp
@@ -6,7 +6,7 @@
 // Global to share the dbus type string between client and server.
 static std::string verifyTypeString;
 
-using verifyCallback_t = void(*)(sdbusplus::message::message&);
+using verifyCallback_t = void (*)(sdbusplus::message::message&);
 verifyCallback_t verifyCallback = nullptr;
 
 static constexpr auto SERVICE = "sdbusplus.test.message.read";
@@ -28,12 +28,12 @@
 {
     auto bus = sdbusplus::bus::bus(reinterpret_cast<sdbusplus::bus::busp_t>(b));
 
-    while(1)
+    while (1)
     {
         // Wait for messages.
         auto m = bus.process();
 
-        if(!m)
+        if (!m)
         {
             bus.wait();
             continue;
@@ -52,8 +52,8 @@
             }
             else
             {
-                std::cout << "Warning: No verification for "
-                          << verifyTypeString << std::endl;
+                std::cout << "Warning: No verification for " << verifyTypeString
+                          << std::endl;
             }
             // Reply to client.
             sd_bus_reply_method_return(m.release(), nullptr);
@@ -133,7 +133,7 @@
             static void op(sdbusplus::message::message& m)
             {
                 int32_t a = 0, b = 0, c = 0, d = 0, e = 0;
-                m.read(a,b,c,d,e);
+                m.read(a, b, c, d, e);
                 assert(a == 1);
                 assert(b == 2);
                 assert(c == 3);
@@ -200,8 +200,7 @@
         auto m = newMethodCall__test(b);
         auto str = "jkl;"s;
         auto str2 = "JKL:"s;
-        m.append(1, "asdf", "ASDF"s, str,
-                 std::move(str2), 5);
+        m.append(1, "asdf", "ASDF"s, str, std::move(str2), 5);
         verifyTypeString = "issssi";
 
         struct verify
@@ -251,11 +250,10 @@
         b.call_noreply(m);
     }
 
-
     // Test vector.
     {
         auto m = newMethodCall__test(b);
-        std::vector<std::string> s{ "1", "2", "3"};
+        std::vector<std::string> s{"1", "2", "3"};
         m.append(1, s, 2);
         verifyTypeString = "iasi";
 
@@ -270,7 +268,7 @@
                 assert(s[0] == "1");
                 assert(s[1] == "2");
                 assert(s[2] == "3");
-                decltype(s) s2 = { "1" , "2" , "3" };
+                decltype(s) s2 = {"1", "2", "3"};
                 assert(s == s2);
             }
         };
@@ -282,7 +280,7 @@
     // Test map.
     {
         auto m = newMethodCall__test(b);
-        std::map<std::string, int> s = { { "asdf", 3 }, { "jkl;", 4 } };
+        std::map<std::string, int> s = {{"asdf", 3}, {"jkl;", 4}};
         m.append(1, s, 2);
         verifyTypeString = "ia{si}i";
 
@@ -309,7 +307,7 @@
     // Test tuple.
     {
         auto m = newMethodCall__test(b);
-        std::tuple<int, double, std::string> a{ 3, 4.1, "asdf" };
+        std::tuple<int, double, std::string> a{3, 4.1, "asdf"};
         m.append(1, a, 2);
         verifyTypeString = "i(ids)i";
 
@@ -386,8 +384,8 @@
     // Test map-variant.
     {
         auto m = newMethodCall__test(b);
-        std::map<std::string, sdbusplus::message::variant<int, double>> a1 =
-                { { "asdf", 3 }, { "jkl;", 4.1 } };
+        std::map<std::string, sdbusplus::message::variant<int, double>> a1 = {
+            {"asdf", 3}, {"jkl;", 4.1}};
         m.append(1, a1, 2);
         verifyTypeString = "ia{sv}i";
 
@@ -396,8 +394,8 @@
             static void op(sdbusplus::message::message& m)
             {
                 int32_t a = 0, b = 0;
-                std::map<std::string,
-                         sdbusplus::message::variant<int, double>> a1{};
+                std::map<std::string, sdbusplus::message::variant<int, double>>
+                    a1{};
 
                 m.read(a, a1, b);
                 assert(a == 1);
@@ -411,7 +409,6 @@
         b.call_noreply(m);
     }
 
-
     // Shutdown server.
     {
         auto m = b.new_method_call(SERVICE, "/", INTERFACE, QUIT_METHOD);
diff --git a/test/message/types.cpp b/test/message/types.cpp
index 604996e..e779c79 100644
--- a/test/message/types.cpp
+++ b/test/message/types.cpp
@@ -2,17 +2,16 @@
 #include <sdbusplus/message/types.hpp>
 #include <sdbusplus/utility/tuple_to_array.hpp>
 
-template <typename ...Args>
-auto dbus_string(Args&& ... args)
+template <typename... Args> auto dbus_string(Args&&... args)
 {
-    return std::string(
-               sdbusplus::utility::tuple_to_array(
-                   sdbusplus::message::types::type_id<Args...>()).data());
+    return std::string(sdbusplus::utility::tuple_to_array(
+                           sdbusplus::message::types::type_id<Args...>())
+                           .data());
 }
 
 TEST(MessageTypes, Integer)
 {
-    ASSERT_EQ(dbus_string(1),"i");
+    ASSERT_EQ(dbus_string(1), "i");
 }
 
 TEST(MessageTypes, Double)
diff --git a/test/utility/type_traits.cpp b/test/utility/type_traits.cpp
index 3a31d06..f2beed7 100644
--- a/test/utility/type_traits.cpp
+++ b/test/utility/type_traits.cpp
@@ -4,17 +4,14 @@
 {
     using sdbusplus::utility::array_to_ptr_t;
 
-    static_assert(
-        std::is_same<char, array_to_ptr_t<char, char>>::value,
-        "array_to_ptr_t<char, char> != char");
+    static_assert(std::is_same<char, array_to_ptr_t<char, char>>::value,
+                  "array_to_ptr_t<char, char> != char");
 
-    static_assert(
-        std::is_same<char*, array_to_ptr_t<char, char*>>::value,
-        "array_to_ptr_t<char, char*> != char*");
+    static_assert(std::is_same<char*, array_to_ptr_t<char, char*>>::value,
+                  "array_to_ptr_t<char, char*> != char*");
 
-    static_assert(
-        std::is_same<char*, array_to_ptr_t<char, char[100]>>::value,
-        "array_to_ptr_t<char, char[100]> != char*");
+    static_assert(std::is_same<char*, array_to_ptr_t<char, char[100]>>::value,
+                  "array_to_ptr_t<char, char[100]> != char*");
 
     static_assert(
         std::is_same<char[100], array_to_ptr_t<int, char[100]>>::value,
diff --git a/test/vtable/vtable.cpp b/test/vtable/vtable.cpp
index ab1e34a..bc67382 100644
--- a/test/vtable/vtable.cpp
+++ b/test/vtable/vtable.cpp
@@ -1,22 +1,19 @@
 #include <sdbusplus/vtable.hpp>
 #include <gtest/gtest.h>
 
-static const sdbusplus::vtable::vtable_t example[] =
-    {
-        sdbusplus::vtable::start(),
-        sdbusplus::vtable::method((const char*)1, (const char*)2,
-                                  (const char*)3,
-                                  (sd_bus_message_handler_t)4),
-        sdbusplus::vtable::signal((const char*)5, (const char*)6),
-        sdbusplus::vtable::property((const char*)7, (const char*)8,
-                                    (sd_bus_property_get_t)9,
-                                    sdbusplus::vtable::property_::const_),
-        sdbusplus::vtable::property((const char*)10, (const char*)11,
-                                    (sd_bus_property_get_t)12,
-                                    (sd_bus_property_set_t)13),
-        sdbusplus::vtable::property_o((const char*)14, (const char*)15, 16),
-        sdbusplus::vtable::end()
-    };
+static const sdbusplus::vtable::vtable_t example[] = {
+    sdbusplus::vtable::start(),
+    sdbusplus::vtable::method((const char*)1, (const char*)2, (const char*)3,
+                              (sd_bus_message_handler_t)4),
+    sdbusplus::vtable::signal((const char*)5, (const char*)6),
+    sdbusplus::vtable::property((const char*)7, (const char*)8,
+                                (sd_bus_property_get_t)9,
+                                sdbusplus::vtable::property_::const_),
+    sdbusplus::vtable::property((const char*)10, (const char*)11,
+                                (sd_bus_property_get_t)12,
+                                (sd_bus_property_set_t)13),
+    sdbusplus::vtable::property_o((const char*)14, (const char*)15, 16),
+    sdbusplus::vtable::end()};
 
 extern const sd_bus_vtable example2[];
 extern const size_t example2_size;
diff --git a/test/vtable/vtable_c.c b/test/vtable/vtable_c.c
index 442d6c7..d01506b 100644
--- a/test/vtable/vtable_c.c
+++ b/test/vtable/vtable_c.c
@@ -1,21 +1,17 @@
 #include <systemd/sd-bus.h>
 
-
-const sd_bus_vtable example2[] =
-    {
-        SD_BUS_VTABLE_START(0),
-        SD_BUS_METHOD((const char*)1, (const char*)2,
-                      (const char*)3, (sd_bus_message_handler_t)4, 0),
-        SD_BUS_SIGNAL((const char*)5, (const char*)6, 0),
-        SD_BUS_PROPERTY((const char*)7, (const char*)8,
-                        (sd_bus_property_get_t)9, 0,
-                        SD_BUS_VTABLE_PROPERTY_CONST),
-        SD_BUS_WRITABLE_PROPERTY((const char*)10, (const char*)11,
-                                 (sd_bus_property_get_t)12,
-                                 (sd_bus_property_set_t)13, 0, 0),
-        SD_BUS_PROPERTY((const char*)14, (const char*)15, NULL, 16, 0),
-        SD_BUS_VTABLE_END,
-    };
+const sd_bus_vtable example2[] = {
+    SD_BUS_VTABLE_START(0),
+    SD_BUS_METHOD((const char*)1, (const char*)2, (const char*)3,
+                  (sd_bus_message_handler_t)4, 0),
+    SD_BUS_SIGNAL((const char*)5, (const char*)6, 0),
+    SD_BUS_PROPERTY((const char*)7, (const char*)8, (sd_bus_property_get_t)9, 0,
+                    SD_BUS_VTABLE_PROPERTY_CONST),
+    SD_BUS_WRITABLE_PROPERTY((const char*)10, (const char*)11,
+                             (sd_bus_property_get_t)12,
+                             (sd_bus_property_set_t)13, 0, 0),
+    SD_BUS_PROPERTY((const char*)14, (const char*)15, NULL, 16, 0),
+    SD_BUS_VTABLE_END,
+};
 
 const size_t example2_size = sizeof(example2);
-
