Add warning on CKM TrustZone space leak
[platform/core/test/security-tests.git] / src / ckm / unprivileged / main.cpp
index 9964dfb..15e0a80 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2016 - 2019 Samsung Electronics Co., Ltd All Rights Reserved
+ *  Copyright (c) 2016-2020 Samsung Electronics Co., Ltd. All rights reserved
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@
 
 #include <tests_common.h>
 #include <test-certs.h>
+#include <ckm_helpers.h>
 
 #include <ckm-common.h>
 #include <ckm/ckm-manager.h>
@@ -1303,7 +1304,7 @@ RUNNER_TEST(T13129_get_chain)
     auto manager = CKM::Manager::create();
 
     RUNNER_ASSERT_MSG(NULL != cert.get(), "Certificate should not be empty");
-    RUNNER_ASSERT_MSG(false != cert1.get(), "Certificate should not be empty");
+    RUNNER_ASSERT_MSG(NULL != cert1.get(), "Certificate should not be empty");
 
     tmp = manager->getCertificateChain(cert,
                                        EMPTY_CERT_VECTOR,
@@ -2942,5 +2943,9 @@ int main(int argc, char *argv[])
         return -1;
     }
 
-    return DPL::Test::TestRunnerSingleton::Instance().ExecTestRunner(argc, argv);
+    int exitCode = DPL::Test::TestRunnerSingleton::Instance().ExecTestRunner(argc, argv);
+
+    detectCkmBugTrustzoneLeak();
+
+    return exitCode;
 }