Adjust tests to security-manager API changes
[platform/core/test/security-tests.git] / src / security-manager-tests / test_cases_prepare_app.cpp
index 844c4dc..79f75ad 100644 (file)
@@ -198,7 +198,7 @@ RUNNER_CHILD_TEST(security_manager_100_synchronize_credentials_test)
         exit(0);
     } else {
         waitPid(pid);
-        Api::cleanupApp(app.getAppId().c_str(), tmpUser.getUid());
+        Api::cleanupApp(app.getAppId().c_str(), tmpUser.getUid(), pid);
     }
 }
 
@@ -227,7 +227,7 @@ RUNNER_CHILD_TEST(security_manager_101_create_namespace_test)
         synchPipe.wait();
 
         std::string appBindPath = std::string("/var/run/user/") + std::to_string(tmpUser.getUid())
-                                  + "/apps/" + app.generateAppLabel();
+                                  + "/apps/" + app.generateAppLabel() + "/" + std::to_string(pid);
         std::string appProcPath = std::string("/proc/") + std::to_string(pid) + "/ns/mnt";
         std::string launcherProcPath = std::string("/proc/") + std::to_string(getpid()) + "/ns/mnt";
 
@@ -244,7 +244,7 @@ RUNNER_CHILD_TEST(security_manager_101_create_namespace_test)
 
         synchPipe.post();
         waitPid(pid);
-        Api::cleanupApp(app.getAppId().c_str(), tmpUser.getUid());
+        Api::cleanupApp(app.getAppId().c_str(), tmpUser.getUid(), pid);
     }
 }
 
@@ -288,7 +288,7 @@ RUNNER_CHILD_TEST(security_manager_102_check_propagation_test)
 
         synchPipe.post();
         waitPid(pid);
-        Api::cleanupApp(app.getAppId().c_str(), tmpUser.getUid());
+        Api::cleanupApp(app.getAppId().c_str(), tmpUser.getUid(), pid);
     }
 }
 
@@ -360,6 +360,6 @@ RUNNER_CHILD_TEST(security_manager_103_policy_change_test)
 
         synchPipe.post();
         waitPid(pid);
-        Api::cleanupApp(app.getAppId().c_str(), tmpUser.getUid());
+        Api::cleanupApp(app.getAppId().c_str(), tmpUser.getUid(), pid);
     }
 }