From: Piotr Bartosiewicz
Date: Tue, 17 Dec 2013 13:34:40 +0000 (+0100)
Subject: Fix broken security server password tests
X-Git-Tag: security-manager_5.5_testing~312
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=328b1437a7768b7c743bc3f315211102abb6b7c7;p=platform%2Fcore%2Ftest%2Fsecurity-tests.git
Fix broken security server password tests
[Issue#] SSDWSSP-730
[Bug/Feature] N/A
[Cause] N/A
[Solution] Fix passwd_allow test. Enable previously ignored
password tests.
[Verification] Build tests and security-server from devel, install, run
tests. Tests that should pass:
- tc03_check_API_passwd_allow
- tc04_check_API_passwd_denied
- tc06_check_API_middleware_denied
Change-Id: Ia2cf3d5b542ddf8cbc332542500a5d99ced46687
---
diff --git a/tests/security-server-tests/server.cpp b/tests/security-server-tests/server.cpp
index 76f733bb..d2c26977 100644
--- a/tests/security-server-tests/server.cpp
+++ b/tests/security-server-tests/server.cpp
@@ -49,6 +49,7 @@ const char *TEST12_SUBJECT = "subject_sstest12";
const char *API_PASSWD_SET = "security-server::api-password-set";
const char *API_PASSWD_CHECK = "security-server::api-password-check";
+const char *API_PASSWD_RESET = "security-server::api-password-reset";
const char *API_RULE_REQUIRED = "w";
const char *PROC_AUDIO_GROUP_NAME = "audio";
@@ -320,6 +321,7 @@ RUNNER_CHILD_TEST_SMACK(tc03_check_API_passwd_allow)
SecurityServer::AccessProvider provider(TEST03_SUBJECT);
provider.allowAPI(API_PASSWD_CHECK, API_RULE_REQUIRED, TRACE_FROM_HERE);
provider.allowAPI(API_PASSWD_SET, API_RULE_REQUIRED, TRACE_FROM_HERE);
+ provider.allowAPI(API_PASSWD_RESET, API_RULE_REQUIRED, TRACE_FROM_HERE);
provider.applyAndSwithToUser(APP_UID, APP_GID, TRACE_FROM_HERE);
ret = security_server_set_pwd_validity(10);
@@ -350,8 +352,6 @@ RUNNER_CHILD_TEST_SMACK(tc03_check_API_passwd_allow)
RUNNER_CHILD_TEST(tc04_check_API_passwd_denied)
{
- RUNNER_IGNORED_MSG("SS API label checking not enabled yet.");
-
int ret = -1;
unsigned int attempt, max_attempt, expire_sec;
@@ -443,8 +443,6 @@ RUNNER_CHILD_TEST_SMACK(tc05_check_API_middleware_allow)
RUNNER_CHILD_TEST(tc06_check_API_middleware_denied)
{
- RUNNER_IGNORED_MSG("SS API label checking not enabled yet.");
-
int ret = -1;
size_t cookie_size = security_server_get_cookie_size();
char cookie[20];