From: Krzysztof Jackiewicz Date: Fri, 24 Apr 2020 19:51:37 +0000 (+0200) Subject: Use TemporaryTestUser::getUidString where applicable X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Ftest%2Fsecurity-tests.git;a=commitdiff_plain;h=744374c1343f5bc5ed8b13f65b2fd8996231c8d9 Use TemporaryTestUser::getUidString where applicable Change-Id: I0663b3a29ca74eea2f5019319d857d03a0562885 --- diff --git a/src/security-manager-tests/test_cases_prepare_app.cpp b/src/security-manager-tests/test_cases_prepare_app.cpp index 8d5b941..4ad16d4 100644 --- a/src/security-manager-tests/test_cases_prepare_app.cpp +++ b/src/security-manager-tests/test_cases_prepare_app.cpp @@ -234,7 +234,7 @@ RUNNER_CHILD_TEST(security_manager_101_create_namespace_test) synchPipe.claimChildEp(); synchPipe.wait(); - std::string appBindPath = std::string("/var/run/user/") + std::to_string(tmpUser.getUid()) + std::string appBindPath = std::string("/var/run/user/") + tmpUser.getUidString() + "/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"; @@ -333,11 +333,11 @@ RUNNER_CHILD_TEST(security_manager_103_policy_change_test) RUNNER_ASSERT_ERRNO_MSG(result == false, "path is bound"); PolicyRequest policyRequest; - PolicyEntry policyEntry(app.getAppId(), std::to_string(tmpUser.getUid()), PRIV_EXTERNALSTORAGE); + PolicyEntry policyEntry(app.getAppId(), tmpUser.getUidString(), PRIV_EXTERNALSTORAGE); policyEntry.setLevel(PolicyEntry::LEVEL_DENY); policyRequest.addEntry(policyEntry); - policyEntry = PolicyEntry(app.getAppId(), std::to_string(tmpUser.getUid()), PRIV_MEDIASTORAGE); + policyEntry = PolicyEntry(app.getAppId(), tmpUser.getUidString(), PRIV_MEDIASTORAGE); policyEntry.setLevel(PolicyEntry::LEVEL_DENY); policyRequest.addEntry(policyEntry); Api::sendPolicy(policyRequest); @@ -349,11 +349,11 @@ RUNNER_CHILD_TEST(security_manager_103_policy_change_test) result = isPathBound(ACCESS_DENIED_DIR_PATH, MEDIA_STORAGE_RO_DIR_PATH, pid); RUNNER_ASSERT_ERRNO_MSG(result == true, "path is not bound"); - policyEntry = PolicyEntry(app.getAppId(), std::to_string(tmpUser.getUid()), PRIV_EXTERNALSTORAGE); + policyEntry = PolicyEntry(app.getAppId(), tmpUser.getUidString(), PRIV_EXTERNALSTORAGE); policyEntry.setLevel(PolicyEntry::LEVEL_ALLOW); policyRequest.addEntry(policyEntry); - policyEntry = PolicyEntry(app.getAppId(), std::to_string(tmpUser.getUid()), PRIV_MEDIASTORAGE); + policyEntry = PolicyEntry(app.getAppId(), tmpUser.getUidString(), PRIV_MEDIASTORAGE); policyEntry.setLevel(PolicyEntry::LEVEL_ALLOW); policyRequest.addEntry(policyEntry); Api::sendPolicy(policyRequest);