From c98af339b789ba503cde31038d449b73f4774b40 Mon Sep 17 00:00:00 2001 From: Christian Geddes Date: Mon, 12 Aug 2019 15:59:36 -0500 Subject: Do not unload modules loaded for unit tests For some of the unit tests we must load in .so modules that were unloaded during the boot. Modules must get loaded and unloaded during the boot, especially before we expand from cache containment to over come size limitations. We were seeing issues were test case A and B both relied on a module and attempted to load it when the test case was instantiated then tried to unload the module when the test case was completed. This was causing issues if two tests were using the same loaded module and one test finished early and unloaded it. Test cases are run on simics after memory is expanded so there is no reason unload the extra modules we load in so we will leave them loaded. Change-Id: Ia41d38da11400f54ee2e59e497b9610ac24f1629 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/82099 Reviewed-by: Matt Derksen Reviewed-by: Glenn Miles Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Daniel M Crowell --- src/usr/fapi2/test/fapi2MmioAccessTest.H | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'src/usr/fapi2') diff --git a/src/usr/fapi2/test/fapi2MmioAccessTest.H b/src/usr/fapi2/test/fapi2MmioAccessTest.H index 7290364ba..a724f2f21 100644 --- a/src/usr/fapi2/test/fapi2MmioAccessTest.H +++ b/src/usr/fapi2/test/fapi2MmioAccessTest.H @@ -254,13 +254,11 @@ void test_fapi2MmioAccess() */ Fapi2MmioAccessTest() : CxxTest::TestSuite() { - mss_module_loaded = false; - // All modules are loaded by runtime, // so testcase loading of modules is not required #ifndef __HOSTBOOT_RUNTIME errlHndl_t err = nullptr; - err = exptest::loadModule(mss_module_loaded, exptest::MSS_LIBRARY_NAME); + err = exptest::loadModule(exptest::MSS_LIBRARY_NAME); if(err) { TS_FAIL("Fapi2MmioAccessTest() - Constuctor: failed to load MSS module"); @@ -275,22 +273,10 @@ Fapi2MmioAccessTest() : CxxTest::TestSuite() */ ~Fapi2MmioAccessTest() { - errlHndl_t err = nullptr; - if (mss_module_loaded) - { - err = exptest::unloadModule(exptest::MSS_LIBRARY_NAME); - if(err) - { - TS_FAIL("~Fapi2MmioAccessTest() - Destructor: failed to unload MSS module"); - errlCommit( err, TARG_COMP_ID ); - } - } } private: - // keep track if this test loaded mss_module - bool mss_module_loaded; // This is used for tests that need to not run operations at the same time TARGETING::HB_MUTEX_SERIALIZE_TEST_LOCK_ATTR iv_serializeTestMutex; -- cgit v1.2.3