From efb3029763f0f7375a0f00c12174fa9474f88946 Mon Sep 17 00:00:00 2001 From: Rafal Krypa Date: Tue, 4 Nov 2014 19:21:08 +0100 Subject: [PATCH] Remove test for security_manager_set_process_label_from_binary() Removing test for security-manager function that is now being removed from security-manager (https://review.tizen.org/gerrit/27041). Change-Id: I879016d2d0e87b7d0e1eafe982d4e25e61b2f71e Signed-off-by: Rafal Krypa --- .../security_manager_tests.cpp | 45 ++-------------------- 1 file changed, 3 insertions(+), 42 deletions(-) diff --git a/tests/security-manager-tests/security_manager_tests.cpp b/tests/security-manager-tests/security_manager_tests.cpp index 59ece53..f98c697 100644 --- a/tests/security-manager-tests/security_manager_tests.cpp +++ b/tests/security-manager-tests/security_manager_tests.cpp @@ -18,8 +18,6 @@ DEFINE_SMARTPTR(security_manager_app_inst_req_free, app_inst_req, AppInstReqUniquePtr); -static const char *const LABELLED_BINARY_PATH = "/usr/bin/test-app-efl"; - static const char *const SM_APP_ID1 = "sm_test_app_id_double"; static const char *const SM_PKG_ID1 = "sm_test_pkg_id_double"; @@ -425,44 +423,7 @@ RUNNER_TEST(security_manager_02_app_install_uninstall_full) SM_ALLOWED_PRIVILEGES, TestSecurityManagerDatabase::REMOVED); } -RUNNER_CHILD_TEST_SMACK(security_manager_03_set_label_from_binary) -{ - const char *const testBinaryPath = LABELLED_BINARY_PATH; - const char *const expectedLabel = USER_APP_ID; - int result; - char *label = nullptr; - CStringPtr labelPtr; - - result = security_manager_set_process_label_from_binary(testBinaryPath); - RUNNER_ASSERT_MSG(result == SECURITY_MANAGER_SUCCESS, - "security_manager_set_process_label_from_binary(" << - testBinaryPath << ") failed. Result: " << result); - - result = smack_new_label_from_self(&label); - RUNNER_ASSERT_MSG(result >= 0, - " Error getting current process label"); - RUNNER_ASSERT_MSG(label != nullptr, - " Process label is not set"); - labelPtr.reset(label); - - result = strcmp(expectedLabel, label); - RUNNER_ASSERT_MSG(result == 0, - " Process label is incorrect. Expected: \"" << expectedLabel << "\" Actual: \"" - << label << "\""); -} - -RUNNER_CHILD_TEST_NOSMACK(security_manager_03_set_label_from_binary_nosmack) -{ - const char *const testBinaryPath = LABELLED_BINARY_PATH; - int result; - - result = security_manager_set_process_label_from_binary(testBinaryPath); - RUNNER_ASSERT_MSG(result == SECURITY_MANAGER_SUCCESS, - "security_manager_set_process_label_from_binary(" << - testBinaryPath << ") failed. Result: " << result); -} - -RUNNER_CHILD_TEST_SMACK(security_manager_04_set_label_from_appid) +RUNNER_CHILD_TEST_SMACK(security_manager_03_set_label_from_appid) { const char *const app_id = "sm_test_app_id_set_label_from_appid"; const char *const pkg_id = "sm_test_pkg_id_set_label_from_appid"; @@ -494,7 +455,7 @@ RUNNER_CHILD_TEST_SMACK(security_manager_04_set_label_from_appid) uninstall_app(app_id, pkg_id, true, true); } -RUNNER_CHILD_TEST_NOSMACK(security_manager_04_set_label_from_appid_nosmack) +RUNNER_CHILD_TEST_NOSMACK(security_manager_03_set_label_from_appid_nosmack) { const char *const app_id = "sm_test_app_id_set_label_from_appid"; const char *const pkg_id = "sm_test_pkg_id_set_label_from_appid"; @@ -546,7 +507,7 @@ static struct passwd* get_app_pw() return pw; } -RUNNER_CHILD_TEST(security_manager_05_app_install_uninstall_by_app_user) +RUNNER_CHILD_TEST(security_manager_04_app_install_uninstall_by_app_user) { int result; AppInstReqUniquePtr request; -- 2.7.4