From: Maciej J. Karpiuk Date: Wed, 27 May 2015 07:07:53 +0000 (+0200) Subject: Fix tests: ignore those that are not supported on Tizen 3.0 (labeled sockets). X-Git-Tag: security-manager_5.5_testing~114^2~6 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Ftest%2Fsecurity-tests.git;a=commitdiff_plain;h=9385c40ae2306048e4fb03a2077d08639aead9f8 Fix tests: ignore those that are not supported on Tizen 3.0 (labeled sockets). Change-Id: I21af3336feef57b9b81af72e776c9e520dc6e34b --- diff --git a/src/ckm/async-api.cpp b/src/ckm/async-api.cpp index 7e790f0..1f678f2 100644 --- a/src/ckm/async-api.cpp +++ b/src/ckm/async-api.cpp @@ -319,31 +319,12 @@ class CKMAsyncAPIEnv { public: void init(const std::string &) { - int temp; - ControlShPtr control = Control::create(); - - RUNNER_ASSERT_MSG(CKM_API_SUCCESS == (temp = control->removeUserData(0)), - "Error=" << CKM::ErrorToString(temp)); - RUNNER_ASSERT_MSG(CKM_API_SUCCESS == (temp = control->unlockUserKey(0, TEST_PASS)), - "Error=" << CKM::ErrorToString(temp)); - - RUNNER_ASSERT_MSG(CKM_API_SUCCESS == (temp = control->removeUserData(APP_UID)), - "Error=" << ErrorToString(temp)); - RUNNER_ASSERT_MSG(CKM_API_SUCCESS == (temp = control->unlockUserKey(APP_UID, TEST_PASS)), - "Error=" << ErrorToString(temp)); + reset_user_data(0, TEST_PASS); + reset_user_data(APP_UID, TEST_PASS); } void finish() { - int temp; - ControlShPtr control = Control::create(); - RUNNER_ASSERT_MSG(CKM_API_SUCCESS == (temp = control->lockUserKey(APP_UID)), - "Error=" << ErrorToString(temp)); - RUNNER_ASSERT_MSG(CKM_API_SUCCESS == (temp = control->removeUserData(APP_UID)), - "Error=" << ErrorToString(temp)); - - RUNNER_ASSERT_MSG(CKM_API_SUCCESS == (temp = control->lockUserKey(0)), - "Error=" << ErrorToString(temp)); - RUNNER_ASSERT_MSG(CKM_API_SUCCESS == (temp = control->removeUserData(0)), - "Error=" << ErrorToString(temp)); + remove_user_data(APP_UID); + remove_user_data(0); } }; diff --git a/src/ckm/capi-access_control.cpp b/src/ckm/capi-access_control.cpp index b985503..6d8b7d0 100644 --- a/src/ckm/capi-access_control.cpp +++ b/src/ckm/capi-access_control.cpp @@ -671,6 +671,8 @@ RUNNER_TEST(T3106_control_allow_access_to_myself) // tries to use admin API as a user RUNNER_CHILD_TEST(T3110_control_allow_access_as_user) { + RUNNER_IGNORED_MSG("Disabled until labeled sockets not available"); + switch_to_storage_user(TEST_LABEL); int ret = ckmc_set_permission_by_adm(USER_ROOT, aliasWithLabel("owner", "alias").c_str(), "accessor", CKMC_PERMISSION_READ); RUNNER_ASSERT_MSG(CKMC_ERROR_PERMISSION_DENIED == ret, @@ -680,6 +682,8 @@ RUNNER_CHILD_TEST(T3110_control_allow_access_as_user) // tries to use admin API as a user RUNNER_CHILD_TEST(T3111_control_allow_access_as_user) { + RUNNER_IGNORED_MSG("Disabled until labeled sockets not available"); + switch_to_storage_user(TEST_LABEL); int ret = ckmc_set_permission_by_adm(USER_ROOT, aliasWithLabel("owner", "alias").c_str(), "accessor", CKMC_PERMISSION_NONE); RUNNER_ASSERT_MSG(CKMC_ERROR_PERMISSION_DENIED == ret,