library_manager_unittest.cc 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  1. // Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
  2. //
  3. // Permission to use, copy, modify, and/or distribute this software for any
  4. // purpose with or without fee is hereby granted, provided that the above
  5. // copyright notice and this permission notice appear in all copies.
  6. //
  7. // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
  8. // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  9. // AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
  10. // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  11. // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  12. // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  13. // PERFORMANCE OF THIS SOFTWARE.
  14. #include <hooks/callout_handle.h>
  15. #include <hooks/callout_manager.h>
  16. #include <hooks/library_manager.h>
  17. #include <hooks/server_hooks.h>
  18. #include <hooks/tests/common_test_class.h>
  19. #include <hooks/tests/marker_file.h>
  20. #include <hooks/tests/test_libraries.h>
  21. #include <gtest/gtest.h>
  22. #include <algorithm>
  23. #include <fstream>
  24. #include <string>
  25. #include <unistd.h>
  26. using namespace isc;
  27. using namespace isc::hooks;
  28. using namespace std;
  29. namespace {
  30. /// @brief Library manager test class
  31. class LibraryManagerTest : public ::testing::Test,
  32. public HooksCommonTestClass {
  33. public:
  34. /// @brief Constructor
  35. ///
  36. /// Initializes the CalloutManager object used in the tests. It sets it
  37. /// up with the hooks initialized in the HooksCommonTestClass object and
  38. /// with four libraries.
  39. LibraryManagerTest() {
  40. callout_manager_.reset(new CalloutManager(4));
  41. // Ensure the marker file is not present at the start of a test.
  42. static_cast<void>(unlink(MARKER_FILE));
  43. }
  44. /// @brief Destructor
  45. ///
  46. /// Ensures a marker file is removed after each test.
  47. ~LibraryManagerTest() {
  48. static_cast<void>(unlink(MARKER_FILE));
  49. }
  50. /// @brief Marker file present
  51. ///
  52. /// Convenience function to check whether a marker file is present. It
  53. /// does this by opening the file.
  54. ///
  55. /// @return true if the marker file is present.
  56. bool markerFilePresent() const {
  57. // Try to open it.
  58. std::fstream marker;
  59. marker.open(MARKER_FILE, std::fstream::in);
  60. // Check if it is open and close it if so.
  61. bool exists = marker.is_open();
  62. if (exists) {
  63. marker.close();
  64. }
  65. return (exists);
  66. }
  67. /// @brief Call callouts test
  68. ///
  69. /// A wrapper around the method of the same name in the HooksCommonTestClass
  70. /// object, this passes this class's CalloutManager to that method.
  71. ///
  72. /// @param r0...r3, d1..d3 Values and intermediate values expected. They
  73. /// are ordered so that the variables appear in the argument list in
  74. /// the order they are used. See HooksCommonTestClass::execute for
  75. /// a full description. (rN is used to indicate an expected result,
  76. /// dN is data to be passed to the calculation.)
  77. void executeCallCallouts(int r0, int d1, int r1, int d2, int r2, int d3,
  78. int r3) {
  79. HooksCommonTestClass::executeCallCallouts(callout_manager_, r0, d1,
  80. r1, d2, r2, d3, r3);
  81. }
  82. /// Callout manager used for the test.
  83. boost::shared_ptr<CalloutManager> callout_manager_;
  84. };
  85. /// @brief Library manager class
  86. ///
  87. /// This is an instance of the LibraryManager class but with the protected
  88. /// methods made public for test purposes.
  89. class PublicLibraryManager : public isc::hooks::LibraryManager {
  90. public:
  91. /// @brief Constructor
  92. ///
  93. /// Stores the library name. The actual loading is done in loadLibrary().
  94. ///
  95. /// @param name Name of the library to load. This should be an absolute
  96. /// path name.
  97. /// @param index Index of this library. For all these tests, it will be
  98. /// zero, as we are only using one library.
  99. /// @param manager CalloutManager object
  100. PublicLibraryManager(const std::string& name, int index,
  101. const boost::shared_ptr<CalloutManager>& manager)
  102. : LibraryManager(name, index, manager)
  103. {}
  104. /// Public methods that call protected methods on the superclass.
  105. using LibraryManager::openLibrary;
  106. using LibraryManager::closeLibrary;
  107. using LibraryManager::checkVersion;
  108. using LibraryManager::registerStandardCallouts;
  109. using LibraryManager::runLoad;
  110. using LibraryManager::runUnload;
  111. };
  112. // Check that openLibrary() reports an error when it can't find the specified
  113. // library.
  114. TEST_F(LibraryManagerTest, NoLibrary) {
  115. PublicLibraryManager lib_manager(std::string(NOT_PRESENT_LIBRARY),
  116. 0, callout_manager_);
  117. EXPECT_FALSE(lib_manager.openLibrary());
  118. }
  119. // Check that the openLibrary() and closeLibrary() methods work.
  120. TEST_F(LibraryManagerTest, OpenClose) {
  121. PublicLibraryManager lib_manager(std::string(BASIC_CALLOUT_LIBRARY),
  122. 0, callout_manager_);
  123. // Open and close the library
  124. EXPECT_TRUE(lib_manager.openLibrary());
  125. EXPECT_TRUE(lib_manager.closeLibrary());
  126. // Check that a second close on an already closed library does not report
  127. // an error.
  128. EXPECT_TRUE(lib_manager.closeLibrary());
  129. }
  130. // Check that the code handles the case of a library with no version function.
  131. TEST_F(LibraryManagerTest, NoVersion) {
  132. PublicLibraryManager lib_manager(std::string(NO_VERSION_LIBRARY),
  133. 0, callout_manager_);
  134. // Open should succeed.
  135. EXPECT_TRUE(lib_manager.openLibrary());
  136. // Version check should fail.
  137. EXPECT_FALSE(lib_manager.checkVersion());
  138. // Tidy up.
  139. EXPECT_TRUE(lib_manager.closeLibrary());
  140. }
  141. // Check that the code handles the case of a library with a version function
  142. // that returns an incorrect version number.
  143. TEST_F(LibraryManagerTest, WrongVersion) {
  144. PublicLibraryManager lib_manager(std::string(INCORRECT_VERSION_LIBRARY),
  145. 0, callout_manager_);
  146. // Open should succeed.
  147. EXPECT_TRUE(lib_manager.openLibrary());
  148. // Version check should fail.
  149. EXPECT_FALSE(lib_manager.checkVersion());
  150. // Tidy up.
  151. EXPECT_TRUE(lib_manager.closeLibrary());
  152. }
  153. // Check that the code handles the case of a library where the version function
  154. // throws an exception.
  155. TEST_F(LibraryManagerTest, VersionException) {
  156. PublicLibraryManager lib_manager(std::string(FRAMEWORK_EXCEPTION_LIBRARY),
  157. 0, callout_manager_);
  158. // Open should succeed.
  159. EXPECT_TRUE(lib_manager.openLibrary());
  160. // Version check should fail.
  161. EXPECT_FALSE(lib_manager.checkVersion());
  162. // Tidy up.
  163. EXPECT_TRUE(lib_manager.closeLibrary());
  164. }
  165. // Tests that checkVersion() function succeeds in the case of a library with a
  166. // version function that returns the correct version number.
  167. TEST_F(LibraryManagerTest, CorrectVersionReturned) {
  168. PublicLibraryManager lib_manager(std::string(BASIC_CALLOUT_LIBRARY),
  169. 0, callout_manager_);
  170. // Open should succeed.
  171. EXPECT_TRUE(lib_manager.openLibrary());
  172. // Version check should succeed.
  173. EXPECT_TRUE(lib_manager.checkVersion());
  174. // Tidy up.
  175. EXPECT_TRUE(lib_manager.closeLibrary());
  176. }
  177. // Checks the registration of standard callouts.
  178. TEST_F(LibraryManagerTest, RegisterStandardCallouts) {
  179. // Load the only library, specifying the index of 0 as it's the only
  180. // library. This should load all callouts.
  181. PublicLibraryManager lib_manager(std::string(BASIC_CALLOUT_LIBRARY),
  182. 0, callout_manager_);
  183. EXPECT_TRUE(lib_manager.openLibrary());
  184. // Check the version of the library.
  185. EXPECT_TRUE(lib_manager.checkVersion());
  186. // Load the standard callouts
  187. EXPECT_NO_THROW(lib_manager.registerStandardCallouts());
  188. // Now execute the callouts in the order expected. The library performs
  189. // the calculation:
  190. //
  191. // r3 = (10 + d1) * d2 - d3
  192. executeCallCallouts(10, 5, 15, 7, 105, 17, 88);
  193. // Tidy up
  194. EXPECT_TRUE(lib_manager.closeLibrary());
  195. }
  196. // Test that the "load" function is called correctly.
  197. TEST_F(LibraryManagerTest, CheckLoadCalled) {
  198. // Load the only library, specifying the index of 0 as it's the only
  199. // library. This should load all callouts.
  200. PublicLibraryManager lib_manager(std::string(LOAD_CALLOUT_LIBRARY),
  201. 0, callout_manager_);
  202. EXPECT_TRUE(lib_manager.openLibrary());
  203. // Check the version of the library.
  204. EXPECT_TRUE(lib_manager.checkVersion());
  205. // Load the standard callouts
  206. EXPECT_NO_THROW(lib_manager.registerStandardCallouts());
  207. // Check that only context_create and hookpt_one have callouts registered.
  208. EXPECT_TRUE(callout_manager_->calloutsPresent(
  209. ServerHooks::CONTEXT_CREATE));
  210. EXPECT_TRUE(callout_manager_->calloutsPresent(hookpt_one_index_));
  211. EXPECT_FALSE(callout_manager_->calloutsPresent(hookpt_two_index_));
  212. EXPECT_FALSE(callout_manager_->calloutsPresent(hookpt_three_index_));
  213. EXPECT_FALSE(callout_manager_->calloutsPresent(
  214. ServerHooks::CONTEXT_DESTROY));
  215. // Call the runLoad() method to run the load() function.
  216. EXPECT_TRUE(lib_manager.runLoad());
  217. EXPECT_TRUE(callout_manager_->calloutsPresent(
  218. ServerHooks::CONTEXT_CREATE));
  219. EXPECT_TRUE(callout_manager_->calloutsPresent(hookpt_one_index_));
  220. EXPECT_TRUE(callout_manager_->calloutsPresent(hookpt_two_index_));
  221. EXPECT_TRUE(callout_manager_->calloutsPresent(hookpt_three_index_));
  222. EXPECT_FALSE(callout_manager_->calloutsPresent(
  223. ServerHooks::CONTEXT_DESTROY));
  224. // Now execute the callouts in the order expected. The library performs
  225. // the calculation:
  226. //
  227. // r3 = (5 * d1 + d2) * d3
  228. executeCallCallouts(5, 5, 25, 7, 32, 10, 320);
  229. // Tidy up
  230. EXPECT_TRUE(lib_manager.closeLibrary());
  231. }
  232. // Check handling of a "load" function that throws an exception
  233. TEST_F(LibraryManagerTest, CheckLoadException) {
  234. // Load the only library, specifying the index of 0 as it's the only
  235. // library. This should load all callouts.
  236. PublicLibraryManager lib_manager(std::string(FRAMEWORK_EXCEPTION_LIBRARY),
  237. 0, callout_manager_);
  238. EXPECT_TRUE(lib_manager.openLibrary());
  239. // Running the load function should fail.
  240. EXPECT_FALSE(lib_manager.runLoad());
  241. // Tidy up
  242. EXPECT_TRUE(lib_manager.closeLibrary());
  243. }
  244. // Check handling of a "load" function that returns an error.
  245. TEST_F(LibraryManagerTest, CheckLoadError) {
  246. // Load the only library, specifying the index of 0 as it's the only
  247. // library. This should load all callouts.
  248. PublicLibraryManager lib_manager(std::string(LOAD_ERROR_CALLOUT_LIBRARY),
  249. 0, callout_manager_);
  250. EXPECT_TRUE(lib_manager.openLibrary());
  251. // Check that we catch a load error
  252. EXPECT_FALSE(lib_manager.runLoad());
  253. // Tidy up
  254. EXPECT_TRUE(lib_manager.closeLibrary());
  255. }
  256. // No unload function
  257. TEST_F(LibraryManagerTest, CheckNoUnload) {
  258. // Load the only library, specifying the index of 0 as it's the only
  259. // library. This should load all callouts.
  260. PublicLibraryManager lib_manager(std::string(BASIC_CALLOUT_LIBRARY),
  261. 0, callout_manager_);
  262. EXPECT_TRUE(lib_manager.openLibrary());
  263. // Check that no unload function returns true.
  264. EXPECT_TRUE(lib_manager.runUnload());
  265. // Tidy up
  266. EXPECT_TRUE(lib_manager.closeLibrary());
  267. }
  268. // Unload function returns an error
  269. TEST_F(LibraryManagerTest, CheckUnloadError) {
  270. // Load the only library, specifying the index of 0 as it's the only
  271. // library. This should load all callouts.
  272. PublicLibraryManager lib_manager(std::string(LOAD_ERROR_CALLOUT_LIBRARY),
  273. 0, callout_manager_);
  274. EXPECT_TRUE(lib_manager.openLibrary());
  275. // Check that unload function returning an error returns false.
  276. EXPECT_FALSE(lib_manager.runUnload());
  277. // Tidy up
  278. EXPECT_TRUE(lib_manager.closeLibrary());
  279. }
  280. // Unload function throws an exception.
  281. TEST_F(LibraryManagerTest, CheckUnloadException) {
  282. // Load the only library, specifying the index of 0 as it's the only
  283. // library. This should load all callouts.
  284. PublicLibraryManager lib_manager(std::string(FRAMEWORK_EXCEPTION_LIBRARY),
  285. 0, callout_manager_);
  286. EXPECT_TRUE(lib_manager.openLibrary());
  287. // Check that we detect that the unload function throws an exception.
  288. EXPECT_FALSE(lib_manager.runUnload());
  289. // Tidy up
  290. EXPECT_TRUE(lib_manager.closeLibrary());
  291. }
  292. // Check that the case of the library's unload() function returning a
  293. // success is handled correcty.
  294. TEST_F(LibraryManagerTest, CheckUnload) {
  295. // Load the only library, specifying the index of 0 as it's the only
  296. // library. This should load all callouts.
  297. PublicLibraryManager lib_manager(std::string(UNLOAD_CALLOUT_LIBRARY),
  298. 0, callout_manager_);
  299. EXPECT_TRUE(lib_manager.openLibrary());
  300. // Check that the marker file is not present (at least that the file
  301. // open fails).
  302. EXPECT_FALSE(markerFilePresent());
  303. // Check that unload function runs and returns a success
  304. EXPECT_TRUE(lib_manager.runUnload());
  305. // Check that the marker file was created.
  306. EXPECT_TRUE(markerFilePresent());
  307. // Tidy up
  308. EXPECT_TRUE(lib_manager.closeLibrary());
  309. }
  310. // Test the operation of unloadLibrary(). We load a library with a set
  311. // of callouts then unload it. We need to check that the callouts have been
  312. // removed. We'll also check that the library's unload() function was called
  313. // as well.
  314. TEST_F(LibraryManagerTest, LibUnload) {
  315. // Load the only library, specifying the index of 0 as it's the only
  316. // library. This should load all callouts.
  317. PublicLibraryManager lib_manager(std::string(FULL_CALLOUT_LIBRARY),
  318. 0, callout_manager_);
  319. EXPECT_TRUE(lib_manager.openLibrary());
  320. // Check the version of the library.
  321. EXPECT_TRUE(lib_manager.checkVersion());
  322. // No callouts should be registered at the moment.
  323. EXPECT_FALSE(callout_manager_->calloutsPresent(hookpt_one_index_));
  324. EXPECT_FALSE(callout_manager_->calloutsPresent(hookpt_two_index_));
  325. EXPECT_FALSE(callout_manager_->calloutsPresent(hookpt_three_index_));
  326. // Load the single standard callout and check it is registered correctly.
  327. EXPECT_NO_THROW(lib_manager.registerStandardCallouts());
  328. EXPECT_TRUE(callout_manager_->calloutsPresent(hookpt_one_index_));
  329. EXPECT_FALSE(callout_manager_->calloutsPresent(hookpt_two_index_));
  330. EXPECT_FALSE(callout_manager_->calloutsPresent(hookpt_three_index_));
  331. // Call the load function to load the other callouts.
  332. EXPECT_TRUE(lib_manager.runLoad());
  333. EXPECT_TRUE(callout_manager_->calloutsPresent(hookpt_one_index_));
  334. EXPECT_TRUE(callout_manager_->calloutsPresent(hookpt_two_index_));
  335. EXPECT_TRUE(callout_manager_->calloutsPresent(hookpt_three_index_));
  336. // Unload the library and check that the callouts have been removed from
  337. // the CalloutManager.
  338. lib_manager.unloadLibrary();
  339. EXPECT_FALSE(callout_manager_->calloutsPresent(hookpt_one_index_));
  340. EXPECT_FALSE(callout_manager_->calloutsPresent(hookpt_two_index_));
  341. EXPECT_FALSE(callout_manager_->calloutsPresent(hookpt_three_index_));
  342. }
  343. // Now come the loadLibrary() tests that make use of all the methods tested
  344. // above. These tests are really to make sure that the methods have been
  345. // tied together correctly.
  346. // First test the basic error cases - no library, no version function, version
  347. // function returning an error.
  348. TEST_F(LibraryManagerTest, LoadLibraryNoLibrary) {
  349. LibraryManager lib_manager(std::string(NOT_PRESENT_LIBRARY), 0,
  350. callout_manager_);
  351. EXPECT_FALSE(lib_manager.loadLibrary());
  352. }
  353. // Check that the code handles the case of a library with no version function.
  354. TEST_F(LibraryManagerTest, LoadLibraryNoVersion) {
  355. LibraryManager lib_manager(std::string(NO_VERSION_LIBRARY), 0,
  356. callout_manager_);
  357. EXPECT_FALSE(lib_manager.loadLibrary());
  358. }
  359. // Check that the code handles the case of a library with a version function
  360. // that returns an incorrect version number.
  361. TEST_F(LibraryManagerTest, LoadLibraryWrongVersion) {
  362. LibraryManager lib_manager(std::string(INCORRECT_VERSION_LIBRARY), 0,
  363. callout_manager_);
  364. EXPECT_FALSE(lib_manager.loadLibrary());
  365. }
  366. // Check that the full loadLibrary call works.
  367. TEST_F(LibraryManagerTest, LoadLibrary) {
  368. LibraryManager lib_manager(std::string(FULL_CALLOUT_LIBRARY), 0,
  369. callout_manager_);
  370. EXPECT_TRUE(lib_manager.loadLibrary());
  371. // Now execute the callouts in the order expected. The library performs
  372. // the calculation:
  373. //
  374. // r3 = (7 * d1 - d2) * d3
  375. executeCallCallouts(7, 5, 35, 9, 26, 3, 78);
  376. EXPECT_TRUE(lib_manager.unloadLibrary());
  377. // Check that the callouts have been removed from the callout manager.
  378. EXPECT_FALSE(callout_manager_->calloutsPresent(hookpt_one_index_));
  379. EXPECT_FALSE(callout_manager_->calloutsPresent(hookpt_two_index_));
  380. EXPECT_FALSE(callout_manager_->calloutsPresent(hookpt_three_index_));
  381. }
  382. // Now test for multiple libraries. We'll load the full callout library
  383. // first, then load some of the libraries with missing framework functions.
  384. // This will check that when searching for framework functions, only the
  385. // specified library is checked, not other loaded libraries. We will
  386. // load a second library with suitable callouts and check that the callouts
  387. // are added correctly. Finally, we'll unload one of the libraries and
  388. // check that only the callouts belonging to that library were removed.
  389. TEST_F(LibraryManagerTest, LoadMultipleLibraries) {
  390. // Load a library with all framework functions.
  391. LibraryManager lib_manager_1(std::string(FULL_CALLOUT_LIBRARY), 0,
  392. callout_manager_);
  393. EXPECT_TRUE(lib_manager_1.loadLibrary());
  394. // Attempt to load a library with no version() function. We should detect
  395. // this and not end up calling the function from the already loaded
  396. // library.
  397. LibraryManager lib_manager_2(std::string(NO_VERSION_LIBRARY), 1,
  398. callout_manager_);
  399. EXPECT_FALSE(lib_manager_2.loadLibrary());
  400. // Attempt to load the library with an incorrect version. This should
  401. // be detected.
  402. LibraryManager lib_manager_3(std::string(INCORRECT_VERSION_LIBRARY), 1,
  403. callout_manager_);
  404. EXPECT_FALSE(lib_manager_3.loadLibrary());
  405. // Load the basic callout library. This only has standard callouts so,
  406. // if the first library's load() function gets called, some callouts
  407. // will be registered twice and lead to incorrect results.
  408. LibraryManager lib_manager_4(std::string(BASIC_CALLOUT_LIBRARY), 1,
  409. callout_manager_);
  410. EXPECT_TRUE(lib_manager_4.loadLibrary());
  411. // Execute the callouts. The first library implements the calculation.
  412. //
  413. // r3 = (7 * d1 - d2) * d3
  414. //
  415. // The last-loaded library implements the calculation
  416. //
  417. // r3 = (10 + d1) * d2 - d3
  418. //
  419. // Putting the processing for each library together in the appropriate
  420. // order, we get:
  421. //
  422. // r3 = ((10 * d1 + d1) - d2) * d2 * d3 - d3
  423. executeCallCallouts(10, 3, 33, 2, 62, 3, 183);
  424. // All done, so unload the first library.
  425. EXPECT_TRUE(lib_manager_1.unloadLibrary());
  426. // Now execute the callouts again and check that the results are as
  427. // expected for the new calculation.
  428. executeCallCallouts(10, 5, 15, 7, 105, 17, 88);
  429. // ... and tidy up.
  430. EXPECT_TRUE(lib_manager_4.unloadLibrary());
  431. }
  432. // Check that libraries can be validated.
  433. TEST_F(LibraryManagerTest, validateLibraries) {
  434. EXPECT_TRUE(LibraryManager::validateLibrary(BASIC_CALLOUT_LIBRARY));
  435. EXPECT_TRUE(LibraryManager::validateLibrary(FULL_CALLOUT_LIBRARY));
  436. EXPECT_FALSE(LibraryManager::validateLibrary(FRAMEWORK_EXCEPTION_LIBRARY));
  437. EXPECT_FALSE(LibraryManager::validateLibrary(INCORRECT_VERSION_LIBRARY));
  438. EXPECT_TRUE(LibraryManager::validateLibrary(LOAD_CALLOUT_LIBRARY));
  439. EXPECT_TRUE(LibraryManager::validateLibrary(LOAD_ERROR_CALLOUT_LIBRARY));
  440. EXPECT_FALSE(LibraryManager::validateLibrary(NOT_PRESENT_LIBRARY));
  441. EXPECT_FALSE(LibraryManager::validateLibrary(NO_VERSION_LIBRARY));
  442. EXPECT_TRUE(LibraryManager::validateLibrary(UNLOAD_CALLOUT_LIBRARY));
  443. }
  444. } // Anonymous namespace