From: Rafal Krypa Date: Wed, 22 May 2013 16:51:53 +0000 (+0200) Subject: Use new function app_setup_path() in place of old app_label_dir() and app_label_share... X-Git-Tag: security-manager_5.5_testing~403 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=62b9a3a2416783b7a4b28d626c819543c200c1d7;p=platform%2Fcore%2Ftest%2Fsecurity-tests.git Use new function app_setup_path() in place of old app_label_dir() and app_label_shared_dir(). Change-Id: I75538d3405337a23c307de526d9a68318cb26b68 --- diff --git a/tests/libprivilege-control-tests/test_cases.cpp b/tests/libprivilege-control-tests/test_cases.cpp index c8ecb56..91a30a5 100644 --- a/tests/libprivilege-control-tests/test_cases.cpp +++ b/tests/libprivilege-control-tests/test_cases.cpp @@ -491,17 +491,14 @@ RUNNER_TEST(privilege_control02_app_label_dir) { int result; - result = app_label_shared_dir(APP_ID, APP_ID, TEST_APP_DIR); - RUNNER_ASSERT_MSG(result != 0, "app_label_shared_dir(APP_ADD, APP_ID) == " << result); - result = nftw(TEST_APP_DIR, &nftw_remove_labels, FTW_MAX_FDS, FTW_PHYS); RUNNER_ASSERT_MSG(result == 0, "Unable to clean up Smack labels in " << TEST_APP_DIR); result = nftw(TEST_NON_APP_DIR, &nftw_set_labels_non_app_dir, FTW_MAX_FDS, FTW_PHYS); RUNNER_ASSERT_MSG(result == 0, "Unable to clean up Smack labels in " << TEST_NON_APP_DIR); - result = app_label_dir(APPID_DIR, TEST_APP_DIR); - RUNNER_ASSERT_MSG(result == 0, "app_label_dir() failed"); + result = app_setup_path(APPID_DIR, TEST_APP_DIR, APP_PATH_PRIVATE); + RUNNER_ASSERT_MSG(result == 0, "app_setup_path() failed"); result = nftw(TEST_APP_DIR, &nftw_check_labels_app_dir, FTW_MAX_FDS, FTW_PHYS); RUNNER_ASSERT_MSG(result == 0, "Unable to check Smack labels for app dir"); @@ -514,14 +511,17 @@ RUNNER_TEST(privilege_control03_app_label_shared_dir) { int result; + result = app_setup_path(APP_ID, TEST_APP_DIR, APP_PATH_GROUP_RW, APP_ID); + RUNNER_ASSERT_MSG(result != 0, "app_setup_path(APP_ID, APP_ID) didn't fail"); + result = nftw(TEST_APP_DIR, &nftw_remove_labels, FTW_MAX_FDS, FTW_PHYS); RUNNER_ASSERT_MSG(result == 0, "Unable to clean up Smack labels in " << TEST_APP_DIR); result = nftw(TEST_NON_APP_DIR, &nftw_set_labels_non_app_dir, FTW_MAX_FDS, FTW_PHYS); RUNNER_ASSERT_MSG(result == 0, "Unable to clean up Smack labels in " << TEST_NON_APP_DIR); - result = app_label_shared_dir(APP_ID, APPID_SHARED_DIR, TEST_APP_DIR); - RUNNER_ASSERT_MSG(result == 0, "app_label_shared_dir() failed"); + result = app_setup_path(APP_ID, TEST_APP_DIR, APP_PATH_GROUP_RW, APPID_SHARED_DIR); + RUNNER_ASSERT_MSG(result == 0, "app_setup_path() failed"); result = nftw(TEST_APP_DIR, &nftw_check_labels_app_shared_dir, FTW_MAX_FDS, FTW_PHYS); RUNNER_ASSERT_MSG(result == 0, "Unable to check Smack labels for shared app dir");