From: Janusz Kozerski Date: Mon, 14 Apr 2014 14:02:25 +0000 (+0200) Subject: Adapt tizen.org tests to newest security-server changes X-Git-Tag: security-manager_5.5_testing~256 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3252f79d24725b1b03ab5f638c21047b8ad27dea;p=platform%2Fcore%2Ftest%2Fsecurity-tests.git Adapt tizen.org tests to newest security-server changes Mark all tests that check security-server functions: - security_server_check_privilege_by_sockfd, - security_server_check_privilege_by_pid, - security_server_check_privilege_by_cookie, as ignored. Verification: Build with the newest security-server. All security-server test should pass. Change-Id: I3eea20e03f4e0e7b31a9c18f6b75e9b650a4a517 Signed-off-by: Janusz Kozerski --- diff --git a/tests/security-server-tests/cookie_api.cpp b/tests/security-server-tests/cookie_api.cpp index bfae680..c53f833 100644 --- a/tests/security-server-tests/cookie_api.cpp +++ b/tests/security-server-tests/cookie_api.cpp @@ -87,6 +87,7 @@ RUNNER_CHILD_TEST(tc_arguments_02_01_security_server_check_privilege) //passing NULL as a cookie pointer RUNNER_CHILD_TEST(tc_arguments_03_01_security_server_check_privilege_by_cookie) { + RUNNER_IGNORED_MSG("security_server_check_privilege_by_cookie is temporarily disabled: always returns success"); int ret = security_server_check_privilege_by_cookie(NULL, "wiadro", "rwx"); RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "Error in security_server_check_privilege_by_cookie() argument checking: " @@ -96,6 +97,7 @@ RUNNER_CHILD_TEST(tc_arguments_03_01_security_server_check_privilege_by_cookie) //passing NULL as an object pointer RUNNER_CHILD_TEST(tc_arguments_03_02_security_server_check_privilege_by_cookie) { + RUNNER_IGNORED_MSG("security_server_check_privilege_by_cookie is temporarily disabled: always returns success"); Cookie cookie = getCookieFromSS(); int ret = security_server_check_privilege_by_cookie(cookie.data(), NULL, "rwx"); @@ -107,6 +109,7 @@ RUNNER_CHILD_TEST(tc_arguments_03_02_security_server_check_privilege_by_cookie) //passing NULL as an access pointer RUNNER_CHILD_TEST(tc_arguments_03_03_security_server_check_privilege_by_cookie) { + RUNNER_IGNORED_MSG("security_server_check_privilege_by_cookie is temporarily disabled: always returns success"); Cookie cookie = getCookieFromSS(); int ret = security_server_check_privilege_by_cookie(cookie.data(), "wiadro", NULL); @@ -485,6 +488,8 @@ RUNNER_CHILD_TEST_SMACK(tc_unit_09_01_app_user_cookie_API_access_allow) UniquePtrCstring ss_label(security_server_get_smacklabel_cookie(cookie.data()), free); RUNNER_ASSERT_MSG_BT(ss_label.get() != NULL, "ss_label: " << ss_label.get()); + RUNNER_IGNORED_MSG("security_server_check_privilege_by_cookie is temporarily disabled: always returns success"); + ret = security_server_check_privilege_by_pid(getpid(), "_", "rx"); RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret); } @@ -517,6 +522,8 @@ RUNNER_CHILD_TEST_SMACK(tc_unit_09_02_app_user_cookie_API_access_deny) RUNNER_ASSERT_MSG_BT(ss_label.get() == NULL, "access should be denied so label should be NULL: " << ss_label.get()); + RUNNER_IGNORED_MSG("security_server_check_privilege_by_sockfd is temporarily disabled: always returns success"); + ret = security_server_check_privilege_by_pid(getpid(), "_", "rx"); RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "security_server_check_privilege_by_pid should return access denied, " @@ -553,6 +560,8 @@ RUNNER_CHILD_TEST_NOSMACK(tc_unit_09_01_app_user_cookie_API_access_allow_nosmack UniquePtrCstring ss_label(security_server_get_smacklabel_cookie(cookie.data()), free); RUNNER_ASSERT_MSG_BT(ss_label.get() != NULL, "get_smacklabel_cookie failed."); + RUNNER_IGNORED_MSG("security_server_check_privilege_by_sockfd is temporarily disabled: always returns success"); + ret = security_server_check_privilege_by_pid(getpid(), "_", "rx"); RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "check_privilege_by_pid failed. Result: " << ret); diff --git a/tests/security-server-tests/security_server_measurer_API_speed.cpp b/tests/security-server-tests/security_server_measurer_API_speed.cpp index 1b73c87..c95c5a0 100644 --- a/tests/security-server-tests/security_server_measurer_API_speed.cpp +++ b/tests/security-server-tests/security_server_measurer_API_speed.cpp @@ -461,10 +461,12 @@ void testSecurityServerCheckPrivilegeByCookie(bool smack) { */ RUNNER_TEST_SMACK(m060_security_server_check_privilege_by_cookie_smack) { + RUNNER_IGNORED_MSG("security_server_check_privilege_by_cookie is temporarily disabled: always returns success"); testSecurityServerCheckPrivilegeByCookie(true); } RUNNER_TEST_NOSMACK(m060_security_server_check_privilege_by_cookie_nosmack) { + RUNNER_IGNORED_MSG("security_server_check_privilege_by_cookie is temporarily disabled: always returns success"); testSecurityServerCheckPrivilegeByCookie(false); } @@ -539,10 +541,12 @@ void testSecurityServerCheckPrivilegeBySockfd(bool smack) { */ RUNNER_MULTIPROCESS_TEST_SMACK(m070_security_server_check_privilege_by_sockfd_smack) { + RUNNER_IGNORED_MSG("security_server_check_privilege_by_sockfd is temporarily disabled: always returns success"); testSecurityServerCheckPrivilegeBySockfd(true); } RUNNER_MULTIPROCESS_TEST_NOSMACK(m070_security_server_check_privilege_by_sockfd_nosmack) { + RUNNER_IGNORED_MSG("security_server_check_privilege_by_sockfd is temporarily disabled: always returns success"); testSecurityServerCheckPrivilegeBySockfd(false); } @@ -704,6 +708,7 @@ RUNNER_TEST(m160_security_server_app_give_access) { */ RUNNER_TEST(m170_security_server_check_privilege_by_pid) { + RUNNER_IGNORED_MSG("security_server_check_privilege_by_pid is temporarily disabled: always returns success"); int ret; readwrite_stats stats; initialize_stats(&stats); diff --git a/tests/security-server-tests/security_server_tests_client_smack.cpp b/tests/security-server-tests/security_server_tests_client_smack.cpp index 9a9c783..1c9e133 100644 --- a/tests/security-server-tests/security_server_tests_client_smack.cpp +++ b/tests/security-server-tests/security_server_tests_client_smack.cpp @@ -79,6 +79,7 @@ RUNNER_CHILD_TEST_SMACK(tc04_security_server_get_gid) */ RUNNER_CHILD_TEST_SMACK(tc05_check_privilege_by_cookie) { + RUNNER_IGNORED_MSG("security_server_check_privilege_by_cookie is temporarily disabled: always returns success"); char cookie[20]; const char *object_label = "tc05objectlabel"; const char *access_rights = "r"; @@ -119,6 +120,7 @@ RUNNER_CHILD_TEST_SMACK(tc05_check_privilege_by_cookie) */ RUNNER_MULTIPROCESS_TEST_SMACK(tc06_check_privilege_by_sockfd) { + RUNNER_IGNORED_MSG("security_server_check_privilege_by_sockfd is temporarily disabled: always returns success"); const char *object_label = "tc06objectlabel"; const char *access_rights = "r"; const char *access_rights_ext = "rw"; @@ -211,6 +213,7 @@ RUNNER_MULTIPROCESS_TEST_SMACK(tc06_check_privilege_by_sockfd) */ RUNNER_MULTIPROCESS_TEST_SMACK(tc07_check_privilege_by_sockfd) { + RUNNER_IGNORED_MSG("security_server_check_privilege_by_sockfd is temporarily disabled: always returns success"); const char *object_label = "tc07objectlabel"; const char *access_rights = "r"; const char *access_rights_ext = "rw"; @@ -301,6 +304,7 @@ RUNNER_CHILD_TEST_NOSMACK(tc04_security_server_get_gid_nosmack) */ RUNNER_CHILD_TEST_NOSMACK(tc05_check_privilege_by_cookie_nosmack) { + RUNNER_IGNORED_MSG("security_server_check_privilege_by_cookie is temporarily disabled: always returns success"); char cookie[20]; const char* object_label = "tc05objectlabel"; @@ -333,6 +337,7 @@ RUNNER_CHILD_TEST_NOSMACK(tc05_check_privilege_by_cookie_nosmack) */ RUNNER_MULTIPROCESS_TEST_NOSMACK(tc06_check_privilege_by_sockfd_nosmack) { + RUNNER_IGNORED_MSG("security_server_check_privilege_by_sockfd is temporarily disabled: always returns success"); const char* object_label = "tc06objectlabel"; int result1 = -1; @@ -401,6 +406,7 @@ RUNNER_MULTIPROCESS_TEST_NOSMACK(tc06_check_privilege_by_sockfd_nosmack) */ RUNNER_MULTIPROCESS_TEST_NOSMACK(tc07_check_privilege_by_sockfd_nosmack) { + RUNNER_IGNORED_MSG("security_server_check_privilege_by_sockfd is temporarily disabled: always returns success"); const char* object_label = "tc07objectlabel"; int result1 = -1; diff --git a/tests/security-server-tests/server.cpp b/tests/security-server-tests/server.cpp index 0899f1b..fcbb478 100644 --- a/tests/security-server-tests/server.cpp +++ b/tests/security-server-tests/server.cpp @@ -219,6 +219,7 @@ RUNNER_CHILD_TEST_SMACK(tc01c_security_server_app_give_access_no_access) RUNNER_TEST_SMACK(tc02_check_privilege_by_pid) { + RUNNER_IGNORED_MSG("security_server_check_privilege_by_pid is temporarily disabled: always returns success"); int ret; int pid; @@ -349,6 +350,7 @@ RUNNER_CHILD_TEST_NOSMACK(tc01_security_server_app_give_access_nosmack) */ RUNNER_TEST_NOSMACK(tc02_check_privilege_by_pid_nosmack) { + RUNNER_IGNORED_MSG("security_server_check_privilege_by_pid is temporarily disabled: always returns success"); int ret; int pid; diff --git a/tests/security-server-tests/weird_arguments.cpp b/tests/security-server-tests/weird_arguments.cpp index 910ce3d..46df994 100644 --- a/tests/security-server-tests/weird_arguments.cpp +++ b/tests/security-server-tests/weird_arguments.cpp @@ -91,6 +91,7 @@ RUNNER_TEST(tc04_security_server_check_privilege_weird_input_case) } RUNNER_TEST(tc05_security_server_check_privilege_by_cookie_weird_input_case) { + RUNNER_IGNORED_MSG("security_server_check_privilege_by_cookie is temporarily disabled: always returns success"); int ret = 0; size_t cookie_size = security_server_get_cookie_size();; const char *object = "telephony_makecall"; @@ -119,6 +120,7 @@ RUNNER_TEST(tc05_security_server_check_privilege_by_cookie_weird_input_case) RUNNER_TEST_SMACK(tc06_security_server_check_privilege_by_sockfd_weird_input_case) { + RUNNER_IGNORED_MSG("security_server_check_privilege_by_sockfd is temporarily disabled: always returns success"); int ret = 0; int sockfd = -1; const char *object = "telephony_makecall"; @@ -163,6 +165,7 @@ RUNNER_TEST(tc07_security_server_get_cookie_pid_weird_input_case) RUNNER_TEST_NOSMACK(tc06_security_server_check_privilege_by_sockfd_weird_input_case_nosmack) { + RUNNER_IGNORED_MSG("security_server_check_privilege_by_sockfd is temporarily disabled: always returns success"); int ret = 0; int sockfd = -1; const char* object = "telephony_makecall";