]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1282] Final cleanups
authorFrancis Dupont <fdupont@isc.org>
Fri, 26 Jun 2020 14:14:31 +0000 (16:14 +0200)
committerFrancis Dupont <fdupont@isc.org>
Sat, 27 Jun 2020 15:59:10 +0000 (17:59 +0200)
src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc
src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc
src/lib/dhcpsrv/tests/alloc_engine_expiration_unittest.cc
src/lib/dhcpsrv/tests/cb_ctl_dhcp_unittest.cc
src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc

index 9c403d382ff42244d4997dc36716380ccf7a1b6e..0f194833ceed48dcc9af09a70d1d0fa07f81fb84 100644 (file)
@@ -203,7 +203,7 @@ public:
     /// that no libraries are loaded and that any marker files are deleted.
     void reset() {
         // Unload any previously-loaded libraries.
-        HooksManager::unloadLibraries();
+        EXPECT_TRUE(HooksManager::unloadLibraries());
 
         // Get rid of any marker files.
         static_cast<void>(remove(LOAD_MARKER_FILE));
index a90978dff23113a334b83c313b90596ae87f7e5e..081b78f494c9121d28684fc907715e06b995fa60 100644 (file)
@@ -118,7 +118,7 @@ public:
     /// that no libraries are loaded and that any marker files are deleted.
     virtual void reset() {
         // Unload any previously-loaded libraries.
-        HooksManager::unloadLibraries();
+        EXPECT_TRUE(HooksManager::unloadLibraries());
 
         // Get rid of any marker files.
         static_cast<void>(remove(LOAD_MARKER_FILE));
index 1519163b236c26279871c805f23190bc653d928d..bcb5526b951100f930e624bf2756c7cfe86115eb 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2015-2019 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2015-2020 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -217,6 +217,12 @@ public:
 
         // Remove callouts executed.
         callouts_.clear();
+
+        // Unload libraries.
+        bool status = HooksManager::unloadLibraries();
+        if (!status) {
+            cerr << "(fixture dtor) unloadLibraries failed" << endl;
+        }
     }
 
     /// @brief Starts D2 client.
index ee54d2de7ac6911847e4d7d9afe32b60109dfd9c..fac44f8163ce7105878820e89519da4b6a2d13ee 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2019-2020 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -20,6 +20,7 @@
 #include <hooks/hooks_manager.h>
 #include <boost/date_time/posix_time/posix_time.hpp>
 #include <gtest/gtest.h>
+#include <iostream>
 #include <map>
 #include <string>
 
@@ -54,6 +55,10 @@ public:
         // Unregister hooks.
         HooksManager::preCalloutsLibraryHandle().deregisterAllCallouts("cb4_updated");
         HooksManager::preCalloutsLibraryHandle().deregisterAllCallouts("cb6_updated");
+        bool status = HooksManager::unloadLibraries();
+        if (!status) {
+            std::cerr << "(fixture dtor) unloadLibraries failed" << std::endl;
+        }
     }
 
     /// @brief Creates new CREATE audit entry.
index b316e6e50a9e13620c852c8cdbcc3e39d4116deb..3f0da194624eba893bd8511aefa128e172225114 100644 (file)
@@ -468,7 +468,7 @@ public:
         family_ = family;
 
         // Ensure no hooks libraries are loaded.
-        HooksManager::unloadLibraries();
+        EXPECT_TRUE(HooksManager::unloadLibraries());
 
         // Set it to minimal, disabled config
         D2ClientConfigPtr tmp(new D2ClientConfig());