Remove tests that use deprecated libprivilege-control API.
[platform/core/test/security-tests.git] / tests / libprivilege-control-tests / libprivilege-control_test_common.cpp
index ac3e0c7..117331b 100644 (file)
@@ -276,45 +276,6 @@ int nftw_check_labels_non_app_dir(const char *fpath, const struct stat* /*sb*/,
     return 0;
 }
 
-void checkOnlyAvAccess(const char *av_id, const char *app_id, const char *comment)
-{
-    int result;
-    result = smack_have_access(av_id, app_id, "rwx");
-    RUNNER_ASSERT_MSG_BT(result == 1,
-        "Error while checking " << av_id << " rwx access to "
-        << app_id << " " << comment << " Result: " << result);
-    result = smack_have_access(av_id, app_id, "a");
-    RUNNER_ASSERT_MSG_BT(result == 0,
-        "Error while checking " << av_id << " a access to "
-        << app_id << " " << comment << " Result: " << result);
-    result = smack_have_access(av_id, app_id, "t");
-    RUNNER_ASSERT_MSG_BT(result == 0,
-        "Error while checking " << av_id << " t access to "
-        << app_id << " " << comment << " Result: " << result);
-}
-
-/**
- * NOSMACK version of checkOnlyAvAccess function.
- *
- * Expects error instead of access granted/forbidden from smack_have_access.
- */
-void checkOnlyAvAccessNosmack(const char *av_id, const char *app_id, const char *comment)
-{
-    int result;
-    result = smack_have_access(av_id, app_id, "rwx");
-    RUNNER_ASSERT_MSG_BT(result == -1,
-            "smack_have_access should return error (SMACK is off). Result: " << result
-            << " when testing " << comment);
-    result = smack_have_access(av_id, app_id, "a");
-    RUNNER_ASSERT_MSG_BT(result == -1,
-            "smack_have_access should return error (SMACK is off). Result: " << result
-            << " when testing " << comment);
-    result = smack_have_access(av_id, app_id, "t");
-    RUNNER_ASSERT_MSG_BT(result == -1,
-            "smack_have_access should return error (SMACK is off). Result: " << result
-            << " when testing " << comment);
-}
-
 void test_revoke_permissions(int line_no, const char* app_id, const rules_t &rules, bool smack)
 {
     int result;