提交 ae3997c2 编写于 作者: H harry-john

change gn and some warnings

Signed-off-by: Nharry-john <zhanghanlin9@huawei.com>
Change-Id: I2eacefb0b7ff44f46d29273ee11795906ad28ecb
上级 92d5da0f
...@@ -20,9 +20,7 @@ group("security") { ...@@ -20,9 +20,7 @@ group("security") {
# "authentication_standard/deviceauth_p2p:DeviceauthP2PFunctionCPPTest", # "authentication_standard/deviceauth_p2p:DeviceauthP2PFunctionCPPTest",
"dataprotect/huks_standard_adapter:huks_std_function_test", "dataprotect/huks_standard_adapter:huks_std_function_test",
"deviceauth/deviceauth_function:DeviceAuthFunctionTest", "deviceauth/deviceauth_function:DeviceAuthFunctionTest",
"permission/permissionkitcpp:PermissionKitFunctionCPPTest", "permission/permissionkitcpp:PermissionKitCPPTest",
"permission/permissionkitcpp:PermissionKitPerformanceCPPTest",
"permission/permissionkitcpp:PermissionKitReliabilityCPPTest",
] ]
} else { } else {
deps = deps =
......
...@@ -75,3 +75,25 @@ ohos_moduletest_suite("PermissionKitReliabilityCPPTest") { ...@@ -75,3 +75,25 @@ ohos_moduletest_suite("PermissionKitReliabilityCPPTest") {
"//utils/native/base:utils", "//utils/native/base:utils",
] ]
} }
##################################################################################
ohos_moduletest_suite("PermissionKitCPPTest") {
subsystem_name = "hits"
part_name = "permission_standard"
module_out_path = subsystem_name + "/" + part_name
configs = [ ":module_private_config" ]
cflags_cc = [ "-DHILOG_ENABLE" ]
sources = [
"src/PermissionKitFunctionCPPTest.cpp",
"src/PermissionKitPerformanceCPPTest.cpp",
"src/PermissionKitReliabilityCPPTest.cpp",
]
deps = [
"//base/security/permission/frameworks/permission_standard/permissioninfrastructure:permission_standard_infrastructure_cxx",
"//base/security/permission/interfaces/innerkits/permission_standard/permissionsdk:libpermissionsdk_standard",
"//utils/native/base:utils",
]
}
...@@ -2,9 +2,7 @@ ...@@ -2,9 +2,7 @@
"kits": [ "kits": [
{ {
"push": [ "push": [
"PermissionKitFunctionCPPTest->/data/local/tmp/PermissionKitFunctionCPPTest", "PermissionKitCPPTest->/data/local/tmp/PermissionKitCPPTest"
"PermissionKitPerformanceCPPTest->/data/local/tmp/PermissionKitPerformanceCPPTest",
"PermissionKitReliabilityCPPTest->/data/local/tmp/PermissionKitReliabilityCPPTest"
], ],
"type": "PushKit", "type": "PushKit",
"post-push": [ "post-push": [
......
...@@ -24,7 +24,15 @@ static vector<PermissionDef> permDefNormal; ...@@ -24,7 +24,15 @@ static vector<PermissionDef> permDefNormal;
static vector<PermissionDef> permDefAbnormal1; static vector<PermissionDef> permDefAbnormal1;
static vector<PermissionDef> permDefAbnormal2; static vector<PermissionDef> permDefAbnormal2;
void PermissionKitTest::SetUpTestCase() class PermissionKitFunctionTest : public testing::Test {
public:
static void SetUpTestCase();
static void TearDownTestCase();
void SetUp();
void TearDown();
};
void PermissionKitFunctionTest::SetUpTestCase()
{ {
vector<PermissionDef> permDefList1; vector<PermissionDef> permDefList1;
vector<PermissionDef> permDefList2; vector<PermissionDef> permDefList2;
...@@ -80,10 +88,10 @@ void PermissionKitTest::SetUpTestCase() ...@@ -80,10 +88,10 @@ void PermissionKitTest::SetUpTestCase()
permDefAbnormal2 = permDefList3; permDefAbnormal2 = permDefList3;
} }
void PermissionKitTest::TearDownTestCase() void PermissionKitFunctionTest::TearDownTestCase()
{} {}
void PermissionKitTest::SetUp() void PermissionKitFunctionTest::SetUp()
{ {
PermissionKit::RemoveDefPermissions(TEST_BUNDLE_NAME); PermissionKit::RemoveDefPermissions(TEST_BUNDLE_NAME);
PermissionKit::RemoveDefPermissions(ABNORMAL_BUNDLE_NAME); PermissionKit::RemoveDefPermissions(ABNORMAL_BUNDLE_NAME);
...@@ -96,7 +104,7 @@ void PermissionKitTest::SetUp() ...@@ -96,7 +104,7 @@ void PermissionKitTest::SetUp()
PermissionKit::RevokeSystemGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA); PermissionKit::RevokeSystemGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA);
} }
void PermissionKitTest::TearDown() void PermissionKitFunctionTest::TearDown()
{ {
PermissionKit::RemoveDefPermissions(TEST_BUNDLE_NAME); PermissionKit::RemoveDefPermissions(TEST_BUNDLE_NAME);
PermissionKit::RemoveDefPermissions(ABNORMAL_BUNDLE_NAME); PermissionKit::RemoveDefPermissions(ABNORMAL_BUNDLE_NAME);
...@@ -119,7 +127,7 @@ void PermissionKitTest::TearDown() ...@@ -119,7 +127,7 @@ void PermissionKitTest::TearDown()
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level0 * @tc.level Level0
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_001, TestSize.Level0) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_001, TestSize.Level0)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -141,7 +149,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_ ...@@ -141,7 +149,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_002, TestSize.Level3) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_002, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -162,7 +170,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_ ...@@ -162,7 +170,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_004, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_004, TestSize.Level4)
{ {
int ret = PermissionKit::AddDefPermissions(permDefAbnormal2); int ret = PermissionKit::AddDefPermissions(permDefAbnormal2);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -178,7 +186,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_ ...@@ -178,7 +186,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_005, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_005, TestSize.Level4)
{ {
int ret = PermissionKit::AddDefPermissions(permDefAbnormal1); int ret = PermissionKit::AddDefPermissions(permDefAbnormal1);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -194,7 +202,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_ ...@@ -194,7 +202,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level0 * @tc.level Level0
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveDefPer_001, TestSize.Level0) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RemoveDefPer_001, TestSize.Level0)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -221,7 +229,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveDefP ...@@ -221,7 +229,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveDefP
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveDefPer_002, TestSize.Level3) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RemoveDefPer_002, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -246,7 +254,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveDefP ...@@ -246,7 +254,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveDefP
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveDefPer_003, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RemoveDefPer_003, TestSize.Level4)
{ {
int ret = PermissionKit::RemoveDefPermissions(BUNDLE_NAME_NOT_EXIST); int ret = PermissionKit::RemoveDefPermissions(BUNDLE_NAME_NOT_EXIST);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -262,7 +270,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveDefP ...@@ -262,7 +270,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveDefP
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveDefPer_005, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RemoveDefPer_005, TestSize.Level4)
{ {
int ret = PermissionKit::RemoveDefPermissions(ABNORMAL_BUNDLE_NAME); int ret = PermissionKit::RemoveDefPermissions(ABNORMAL_BUNDLE_NAME);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -278,7 +286,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveDefP ...@@ -278,7 +286,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveDefP
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveDefPer_006, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RemoveDefPer_006, TestSize.Level4)
{ {
int ret = PermissionKit::RemoveDefPermissions(LONG_BUNDLE_NAME); int ret = PermissionKit::RemoveDefPermissions(LONG_BUNDLE_NAME);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -294,7 +302,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveDefP ...@@ -294,7 +302,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveDefP
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level0 * @tc.level Level0
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GetDefPer_001, TestSize.Level0) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_GetDefPer_001, TestSize.Level0)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -316,7 +324,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GetDefPer_ ...@@ -316,7 +324,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GetDefPer_
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GetDefPer_002, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_GetDefPer_002, TestSize.Level4)
{ {
PermissionDef permissionDefResultAlpha; PermissionDef permissionDefResultAlpha;
int ret = PermissionKit::GetDefPermission(PERMISSION_NAME_NOT_EXIST, permissionDefResultAlpha); int ret = PermissionKit::GetDefPermission(PERMISSION_NAME_NOT_EXIST, permissionDefResultAlpha);
...@@ -333,7 +341,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GetDefPer_ ...@@ -333,7 +341,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GetDefPer_
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GetDefPer_004, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_GetDefPer_004, TestSize.Level4)
{ {
PermissionDef permissionDefResultAlpha; PermissionDef permissionDefResultAlpha;
int ret = PermissionKit::GetDefPermission(ABNORMAL_BUNDLE_NAME, permissionDefResultAlpha); int ret = PermissionKit::GetDefPermission(ABNORMAL_BUNDLE_NAME, permissionDefResultAlpha);
...@@ -350,7 +358,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GetDefPer_ ...@@ -350,7 +358,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GetDefPer_
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level0 * @tc.level Level0
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGrantedPer_001, TestSize.Level0) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_AddUserGrantedPer_001, TestSize.Level0)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -374,7 +382,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra ...@@ -374,7 +382,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level1 * @tc.level Level1
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGrantedPer_002, TestSize.Level1) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_AddUserGrantedPer_002, TestSize.Level1)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -398,7 +406,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra ...@@ -398,7 +406,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGrantedPer_004, TestSize.Level3) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_AddUserGrantedPer_004, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -422,7 +430,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra ...@@ -422,7 +430,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level1 * @tc.level Level1
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGrantedPer_005, TestSize.Level1) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_AddUserGrantedPer_005, TestSize.Level1)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -444,7 +452,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra ...@@ -444,7 +452,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGrantedPer_006, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_AddUserGrantedPer_006, TestSize.Level4)
{ {
vector<string> permList; vector<string> permList;
permList.push_back(TEST_PERMISSION_NAME_ALPHA); permList.push_back(TEST_PERMISSION_NAME_ALPHA);
...@@ -466,7 +474,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra ...@@ -466,7 +474,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGrantedPer_007, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_AddUserGrantedPer_007, TestSize.Level4)
{ {
vector<string> permList; vector<string> permList;
permList.push_back(TEST_PERMISSION_NAME_ALPHA); permList.push_back(TEST_PERMISSION_NAME_ALPHA);
...@@ -484,7 +492,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra ...@@ -484,7 +492,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGrantedPer_008, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_AddUserGrantedPer_008, TestSize.Level4)
{ {
vector<string> permList; vector<string> permList;
int ret = PermissionKit::AddUserGrantedReqPermissions(TEST_BUNDLE_NAME, permList, TEST_USER_ID); int ret = PermissionKit::AddUserGrantedReqPermissions(TEST_BUNDLE_NAME, permList, TEST_USER_ID);
...@@ -501,7 +509,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra ...@@ -501,7 +509,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGrantedPer_010, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_AddUserGrantedPer_010, TestSize.Level4)
{ {
vector<string> permList; vector<string> permList;
permList.push_back(TEST_PERMISSION_NAME_ALPHA); permList.push_back(TEST_PERMISSION_NAME_ALPHA);
...@@ -519,7 +527,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra ...@@ -519,7 +527,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGrantedPer_011, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_AddUserGrantedPer_011, TestSize.Level4)
{ {
vector<string> permList; vector<string> permList;
permList.push_back(TEST_PERMISSION_NAME_ALPHA); permList.push_back(TEST_PERMISSION_NAME_ALPHA);
...@@ -537,7 +545,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra ...@@ -537,7 +545,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level0 * @tc.level Level0
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemGrantedPer_001, TestSize.Level0) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_AddSystemGrantedPer_001, TestSize.Level0)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -561,7 +569,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemG ...@@ -561,7 +569,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemG
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level1 * @tc.level Level1
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemGrantedPer_003, TestSize.Level1) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_AddSystemGrantedPer_003, TestSize.Level1)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -585,7 +593,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemG ...@@ -585,7 +593,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemG
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level1 * @tc.level Level1
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemGrantedPer_004, TestSize.Level1) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_AddSystemGrantedPer_004, TestSize.Level1)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -611,7 +619,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemG ...@@ -611,7 +619,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemG
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemGrantedPer_005, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_AddSystemGrantedPer_005, TestSize.Level4)
{ {
vector<string> permList; vector<string> permList;
permList.push_back(TEST_PERMISSION_NAME_BETA); permList.push_back(TEST_PERMISSION_NAME_BETA);
...@@ -629,7 +637,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemG ...@@ -629,7 +637,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemG
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemGrantedPer_006, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_AddSystemGrantedPer_006, TestSize.Level4)
{ {
vector<string> permList; vector<string> permList;
int ret = PermissionKit::AddSystemGrantedReqPermissions(TEST_BUNDLE_NAME, permList); int ret = PermissionKit::AddSystemGrantedReqPermissions(TEST_BUNDLE_NAME, permList);
...@@ -646,7 +654,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemG ...@@ -646,7 +654,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemG
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemGrantedPer_007, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_AddSystemGrantedPer_007, TestSize.Level4)
{ {
vector<string> permList; vector<string> permList;
permList.push_back(TEST_PERMISSION_NAME_BETA); permList.push_back(TEST_PERMISSION_NAME_BETA);
...@@ -664,7 +672,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemG ...@@ -664,7 +672,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemG
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemGrantedPer_008, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_AddSystemGrantedPer_008, TestSize.Level4)
{ {
vector<string> permList; vector<string> permList;
permList.push_back(TEST_PERMISSION_NAME_BETA); permList.push_back(TEST_PERMISSION_NAME_BETA);
...@@ -682,7 +690,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemG ...@@ -682,7 +690,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemG
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level0 * @tc.level Level0
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUserGrantedPer_001, TestSize.Level0) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RemoveUserGrantedPer_001, TestSize.Level0)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -718,7 +726,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUser ...@@ -718,7 +726,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUser
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level1 * @tc.level Level1
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUserGrantedPer_002, TestSize.Level1) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RemoveUserGrantedPer_002, TestSize.Level1)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -754,7 +762,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUser ...@@ -754,7 +762,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUser
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUserGrantedPer_003, TestSize.Level3) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RemoveUserGrantedPer_003, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -784,7 +792,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUser ...@@ -784,7 +792,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUser
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUserGrantedPer_004, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RemoveUserGrantedPer_004, TestSize.Level4)
{ {
int ret = PermissionKit::RemoveUserGrantedReqPermissions(BUNDLE_NAME_NOT_EXIST, TEST_USER_ID); int ret = PermissionKit::RemoveUserGrantedReqPermissions(BUNDLE_NAME_NOT_EXIST, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -800,7 +808,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUser ...@@ -800,7 +808,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUser
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUserGrantedPer_005, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RemoveUserGrantedPer_005, TestSize.Level4)
{ {
int ret = PermissionKit::RemoveUserGrantedReqPermissions(TEST_BUNDLE_NAME, USER_ID_NOT_EXIST); int ret = PermissionKit::RemoveUserGrantedReqPermissions(TEST_BUNDLE_NAME, USER_ID_NOT_EXIST);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -816,7 +824,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUser ...@@ -816,7 +824,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUser
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUserGrantedPer_006, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RemoveUserGrantedPer_006, TestSize.Level4)
{ {
int ret = PermissionKit::RemoveUserGrantedReqPermissions("", TEST_USER_ID); int ret = PermissionKit::RemoveUserGrantedReqPermissions("", TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -832,7 +840,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUser ...@@ -832,7 +840,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUser
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUserGrantedPer_008, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RemoveUserGrantedPer_008, TestSize.Level4)
{ {
int ret = PermissionKit::RemoveUserGrantedReqPermissions(ABNORMAL_BUNDLE_NAME, TEST_USER_ID); int ret = PermissionKit::RemoveUserGrantedReqPermissions(ABNORMAL_BUNDLE_NAME, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -848,7 +856,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUser ...@@ -848,7 +856,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUser
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUserGrantedPer_009, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RemoveUserGrantedPer_009, TestSize.Level4)
{ {
int ret = PermissionKit::RemoveUserGrantedReqPermissions(LONG_BUNDLE_NAME, TEST_USER_ID); int ret = PermissionKit::RemoveUserGrantedReqPermissions(LONG_BUNDLE_NAME, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -864,7 +872,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUser ...@@ -864,7 +872,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUser
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level0 * @tc.level Level0
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSystemGrantedPer_001, TestSize.Level0) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RemoveSystemGrantedPer_001, TestSize.Level0)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -892,7 +900,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSyst ...@@ -892,7 +900,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSyst
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSystemGrantedPer_002, TestSize.Level3) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RemoveSystemGrantedPer_002, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -920,7 +928,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSyst ...@@ -920,7 +928,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSyst
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSystemGrantedPer_003, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RemoveSystemGrantedPer_003, TestSize.Level4)
{ {
int ret = PermissionKit::RemoveSystemGrantedReqPermissions(BUNDLE_NAME_NOT_EXIST); int ret = PermissionKit::RemoveSystemGrantedReqPermissions(BUNDLE_NAME_NOT_EXIST);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -936,7 +944,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSyst ...@@ -936,7 +944,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSyst
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSystemGrantedPer_004, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RemoveSystemGrantedPer_004, TestSize.Level4)
{ {
int ret = PermissionKit::RemoveSystemGrantedReqPermissions(""); int ret = PermissionKit::RemoveSystemGrantedReqPermissions("");
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -952,7 +960,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSyst ...@@ -952,7 +960,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSyst
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSystemGrantedPer_005, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RemoveSystemGrantedPer_005, TestSize.Level4)
{ {
int ret = PermissionKit::RemoveSystemGrantedReqPermissions(ABNORMAL_BUNDLE_NAME); int ret = PermissionKit::RemoveSystemGrantedReqPermissions(ABNORMAL_BUNDLE_NAME);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -968,7 +976,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSyst ...@@ -968,7 +976,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSyst
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSystemGrantedPer_006, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RemoveSystemGrantedPer_006, TestSize.Level4)
{ {
int ret = PermissionKit::RemoveSystemGrantedReqPermissions(LONG_BUNDLE_NAME); int ret = PermissionKit::RemoveSystemGrantedReqPermissions(LONG_BUNDLE_NAME);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -984,7 +992,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSyst ...@@ -984,7 +992,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSyst
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level0 * @tc.level Level0
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserGrantedPer_001, TestSize.Level0) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_GrantUserGrantedPer_001, TestSize.Level0)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1008,7 +1016,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG ...@@ -1008,7 +1016,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level1 * @tc.level Level1
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserGrantedPer_002, TestSize.Level1) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_GrantUserGrantedPer_002, TestSize.Level1)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1032,7 +1040,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG ...@@ -1032,7 +1040,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserGrantedPer_005, TestSize.Level3) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_GrantUserGrantedPer_005, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1060,7 +1068,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG ...@@ -1060,7 +1068,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserGrantedPer_006, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_GrantUserGrantedPer_006, TestSize.Level4)
{ {
int ret = PermissionKit::GrantUserGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_INVALID_USER_ID); int ret = PermissionKit::GrantUserGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_INVALID_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1078,7 +1086,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG ...@@ -1078,7 +1086,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserGrantedPer_007, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_GrantUserGrantedPer_007, TestSize.Level4)
{ {
int ret = PermissionKit::GrantUserGrantedPermission("", TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID); int ret = PermissionKit::GrantUserGrantedPermission("", TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1094,7 +1102,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG ...@@ -1094,7 +1102,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserGrantedPer_008, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_GrantUserGrantedPer_008, TestSize.Level4)
{ {
int ret = PermissionKit::GrantUserGrantedPermission(TEST_BUNDLE_NAME, "", TEST_USER_ID); int ret = PermissionKit::GrantUserGrantedPermission(TEST_BUNDLE_NAME, "", TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1110,7 +1118,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG ...@@ -1110,7 +1118,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserGrantedPer_010, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_GrantUserGrantedPer_010, TestSize.Level4)
{ {
int ret = PermissionKit::GrantUserGrantedPermission(ABNORMAL_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_SUB_USER_ID); int ret = PermissionKit::GrantUserGrantedPermission(ABNORMAL_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_SUB_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1126,7 +1134,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG ...@@ -1126,7 +1134,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserGrantedPer_011, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_GrantUserGrantedPer_011, TestSize.Level4)
{ {
int ret = PermissionKit::GrantUserGrantedPermission(LONG_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_SUB_USER_ID); int ret = PermissionKit::GrantUserGrantedPermission(LONG_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_SUB_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1142,7 +1150,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG ...@@ -1142,7 +1150,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserGrantedPer_012, TestSize.Level3) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_GrantUserGrantedPer_012, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1166,7 +1174,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG ...@@ -1166,7 +1174,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level0 * @tc.level Level0
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSystemGrantedPer_001, TestSize.Level0) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_GrantSystemGrantedPer_001, TestSize.Level0)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1190,7 +1198,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSyste ...@@ -1190,7 +1198,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSyste
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSystemGrantedPer_004, TestSize.Level3) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_GrantSystemGrantedPer_004, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1216,7 +1224,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSyste ...@@ -1216,7 +1224,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSyste
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSystemGrantedPer_005, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_GrantSystemGrantedPer_005, TestSize.Level4)
{ {
int ret = PermissionKit::GrantSystemGrantedPermission("", TEST_PERMISSION_NAME_BETA); int ret = PermissionKit::GrantSystemGrantedPermission("", TEST_PERMISSION_NAME_BETA);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1232,7 +1240,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSyste ...@@ -1232,7 +1240,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSyste
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSystemGrantedPer_006, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_GrantSystemGrantedPer_006, TestSize.Level4)
{ {
int ret = PermissionKit::GrantSystemGrantedPermission(TEST_BUNDLE_NAME, ""); int ret = PermissionKit::GrantSystemGrantedPermission(TEST_BUNDLE_NAME, "");
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1248,7 +1256,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSyste ...@@ -1248,7 +1256,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSyste
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSystemGrantedPer_007, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_GrantSystemGrantedPer_007, TestSize.Level4)
{ {
int ret = PermissionKit::GrantSystemGrantedPermission(ABNORMAL_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA); int ret = PermissionKit::GrantSystemGrantedPermission(ABNORMAL_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1264,7 +1272,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSyste ...@@ -1264,7 +1272,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSyste
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSystemGrantedPer_008, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_GrantSystemGrantedPer_008, TestSize.Level4)
{ {
int ret = PermissionKit::GrantSystemGrantedPermission(LONG_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA); int ret = PermissionKit::GrantSystemGrantedPermission(LONG_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1280,7 +1288,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSyste ...@@ -1280,7 +1288,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSyste
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level0 * @tc.level Level0
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_001, TestSize.Level0) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_001, TestSize.Level0)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1316,7 +1324,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser ...@@ -1316,7 +1324,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level0 * @tc.level Level0
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_002, TestSize.Level0) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_002, TestSize.Level0)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1352,7 +1360,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser ...@@ -1352,7 +1360,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level1 * @tc.level Level1
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_003, TestSize.Level1) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_003, TestSize.Level1)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1380,7 +1388,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser ...@@ -1380,7 +1388,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_004, TestSize.Level3) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_004, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1412,7 +1420,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser ...@@ -1412,7 +1420,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_005, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_005, TestSize.Level4)
{ {
int ret = PermissionKit::RevokeUserGrantedPermission(BUNDLE_NAME_NOT_EXIST, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID); int ret = PermissionKit::RevokeUserGrantedPermission(BUNDLE_NAME_NOT_EXIST, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1428,7 +1436,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser ...@@ -1428,7 +1436,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_006, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_006, TestSize.Level4)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1446,7 +1454,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser ...@@ -1446,7 +1454,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_007, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_007, TestSize.Level4)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1464,7 +1472,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser ...@@ -1464,7 +1472,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_008, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_008, TestSize.Level4)
{ {
int ret = PermissionKit::RevokeUserGrantedPermission("", TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID); int ret = PermissionKit::RevokeUserGrantedPermission("", TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1480,7 +1488,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser ...@@ -1480,7 +1488,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_009, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_009, TestSize.Level4)
{ {
int ret = PermissionKit::RevokeUserGrantedPermission(TEST_BUNDLE_NAME, "", TEST_USER_ID); int ret = PermissionKit::RevokeUserGrantedPermission(TEST_BUNDLE_NAME, "", TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1496,7 +1504,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser ...@@ -1496,7 +1504,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_011, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_011, TestSize.Level4)
{ {
int ret = PermissionKit::RevokeUserGrantedPermission(ABNORMAL_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID); int ret = PermissionKit::RevokeUserGrantedPermission(ABNORMAL_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1512,7 +1520,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser ...@@ -1512,7 +1520,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_012, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_012, TestSize.Level4)
{ {
int ret = PermissionKit::RevokeUserGrantedPermission(LONG_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID); int ret = PermissionKit::RevokeUserGrantedPermission(LONG_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1528,7 +1536,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser ...@@ -1528,7 +1536,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level0 * @tc.level Level0
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSystemGrantedPer_001, TestSize.Level0) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RevokeSystemGrantedPer_001, TestSize.Level0)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1556,7 +1564,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst ...@@ -1556,7 +1564,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level0 * @tc.level Level0
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSystemGrantedPer_002, TestSize.Level0) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RevokeSystemGrantedPer_002, TestSize.Level0)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1584,7 +1592,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst ...@@ -1584,7 +1592,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level0 * @tc.level Level0
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSystemGrantedPer_003, TestSize.Level0) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RevokeSystemGrantedPer_003, TestSize.Level0)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1616,7 +1624,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst ...@@ -1616,7 +1624,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSystemGrantedPer_004, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RevokeSystemGrantedPer_004, TestSize.Level4)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1634,7 +1642,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst ...@@ -1634,7 +1642,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSystemGrantedPer_005, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RevokeSystemGrantedPer_005, TestSize.Level4)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1652,7 +1660,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst ...@@ -1652,7 +1660,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSystemGrantedPer_006, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RevokeSystemGrantedPer_006, TestSize.Level4)
{ {
int ret = PermissionKit::RevokeSystemGrantedPermission("", TEST_PERMISSION_NAME_BETA); int ret = PermissionKit::RevokeSystemGrantedPermission("", TEST_PERMISSION_NAME_BETA);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1668,7 +1676,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst ...@@ -1668,7 +1676,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSystemGrantedPer_007, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RevokeSystemGrantedPer_007, TestSize.Level4)
{ {
int ret = PermissionKit::RevokeSystemGrantedPermission(TEST_BUNDLE_NAME, ""); int ret = PermissionKit::RevokeSystemGrantedPermission(TEST_BUNDLE_NAME, "");
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1684,7 +1692,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst ...@@ -1684,7 +1692,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSystemGrantedPer_008, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RevokeSystemGrantedPer_008, TestSize.Level4)
{ {
int ret = PermissionKit::RevokeSystemGrantedPermission(ABNORMAL_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA); int ret = PermissionKit::RevokeSystemGrantedPermission(ABNORMAL_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1700,7 +1708,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst ...@@ -1700,7 +1708,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSystemGrantedPer_009, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_RevokeSystemGrantedPer_009, TestSize.Level4)
{ {
int ret = PermissionKit::RevokeSystemGrantedPermission(LONG_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA); int ret = PermissionKit::RevokeSystemGrantedPermission(LONG_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1716,7 +1724,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst ...@@ -1716,7 +1724,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level0 * @tc.level Level0
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_001, TestSize.Level0) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_001, TestSize.Level0)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1738,7 +1746,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest ...@@ -1738,7 +1746,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level0 * @tc.level Level0
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_002, TestSize.Level0) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_002, TestSize.Level0)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1760,7 +1768,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest ...@@ -1760,7 +1768,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level0 * @tc.level Level0
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_003, TestSize.Level0) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_003, TestSize.Level0)
{ {
int ret = PermissionKit::RemoveDefPermissions(TEST_BUNDLE_NAME); int ret = PermissionKit::RemoveDefPermissions(TEST_BUNDLE_NAME);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1788,7 +1796,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest ...@@ -1788,7 +1796,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level1 * @tc.level Level1
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_004, TestSize.Level1) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_004, TestSize.Level1)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1818,7 +1826,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest ...@@ -1818,7 +1826,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level1 * @tc.level Level1
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_005, TestSize.Level1) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_005, TestSize.Level1)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1850,7 +1858,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest ...@@ -1850,7 +1858,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_009, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_009, TestSize.Level4)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1870,7 +1878,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest ...@@ -1870,7 +1878,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_008, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_008, TestSize.Level4)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1892,7 +1900,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest ...@@ -1892,7 +1900,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_010, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_010, TestSize.Level4)
{ {
bool isCanRequest = PermissionKit::CanRequestPermission("", TEST_PERMISSION_NAME_BETA, TEST_USER_ID); bool isCanRequest = PermissionKit::CanRequestPermission("", TEST_PERMISSION_NAME_BETA, TEST_USER_ID);
ASSERT_FALSE(isCanRequest); ASSERT_FALSE(isCanRequest);
...@@ -1908,7 +1916,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest ...@@ -1908,7 +1916,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_011, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_011, TestSize.Level4)
{ {
bool isCanRequest = PermissionKit::CanRequestPermission(TEST_BUNDLE_NAME, "", TEST_USER_ID); bool isCanRequest = PermissionKit::CanRequestPermission(TEST_BUNDLE_NAME, "", TEST_USER_ID);
ASSERT_FALSE(isCanRequest); ASSERT_FALSE(isCanRequest);
...@@ -1924,7 +1932,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest ...@@ -1924,7 +1932,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_013, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_013, TestSize.Level4)
{ {
bool isCanRequest = PermissionKit::CanRequestPermission(ABNORMAL_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA, TEST_USER_ID); bool isCanRequest = PermissionKit::CanRequestPermission(ABNORMAL_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA, TEST_USER_ID);
ASSERT_FALSE(isCanRequest); ASSERT_FALSE(isCanRequest);
...@@ -1940,7 +1948,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest ...@@ -1940,7 +1948,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_014, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_014, TestSize.Level4)
{ {
bool isCanRequest = PermissionKit::CanRequestPermission(LONG_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA, TEST_USER_ID); bool isCanRequest = PermissionKit::CanRequestPermission(LONG_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA, TEST_USER_ID);
ASSERT_FALSE(isCanRequest); ASSERT_FALSE(isCanRequest);
...@@ -1956,7 +1964,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest ...@@ -1956,7 +1964,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level0 * @tc.level Level0
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_001, TestSize.Level0) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_001, TestSize.Level0)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -1982,7 +1990,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_ ...@@ -1982,7 +1990,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level1 * @tc.level Level1
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_002, TestSize.Level1) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_002, TestSize.Level1)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -2010,7 +2018,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_ ...@@ -2010,7 +2018,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level1 * @tc.level Level1
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_003, TestSize.Level1) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_003, TestSize.Level1)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -2038,7 +2046,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_ ...@@ -2038,7 +2046,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level1 * @tc.level Level1
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_004, TestSize.Level1) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_004, TestSize.Level1)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -2070,7 +2078,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_ ...@@ -2070,7 +2078,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_005, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_005, TestSize.Level4)
{ {
int ret = PermissionKit::VerifyPermission(BUNDLE_NAME_NOT_EXIST, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID); int ret = PermissionKit::VerifyPermission(BUNDLE_NAME_NOT_EXIST, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID);
ASSERT_EQ(PERMISSION_NOT_GRANTED, ret); ASSERT_EQ(PERMISSION_NOT_GRANTED, ret);
...@@ -2086,7 +2094,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_ ...@@ -2086,7 +2094,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_006, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_006, TestSize.Level4)
{ {
int ret = PermissionKit::VerifyPermission(TEST_BUNDLE_NAME, PERMISSION_NAME_NOT_EXIST, TEST_USER_ID); int ret = PermissionKit::VerifyPermission(TEST_BUNDLE_NAME, PERMISSION_NAME_NOT_EXIST, TEST_USER_ID);
ASSERT_EQ(PERMISSION_NOT_GRANTED, ret); ASSERT_EQ(PERMISSION_NOT_GRANTED, ret);
...@@ -2102,7 +2110,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_ ...@@ -2102,7 +2110,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_007, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_007, TestSize.Level4)
{ {
int ret = PermissionKit::VerifyPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, USER_ID_NOT_EXIST); int ret = PermissionKit::VerifyPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, USER_ID_NOT_EXIST);
ASSERT_EQ(PERMISSION_NOT_GRANTED, ret); ASSERT_EQ(PERMISSION_NOT_GRANTED, ret);
...@@ -2118,7 +2126,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_ ...@@ -2118,7 +2126,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_008, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_008, TestSize.Level4)
{ {
int ret = PermissionKit::VerifyPermission("", TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID); int ret = PermissionKit::VerifyPermission("", TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID);
ASSERT_EQ(PERMISSION_NOT_GRANTED, ret); ASSERT_EQ(PERMISSION_NOT_GRANTED, ret);
...@@ -2134,7 +2142,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_ ...@@ -2134,7 +2142,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_009, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_009, TestSize.Level4)
{ {
int ret = PermissionKit::VerifyPermission(TEST_BUNDLE_NAME, "", TEST_USER_ID); int ret = PermissionKit::VerifyPermission(TEST_BUNDLE_NAME, "", TEST_USER_ID);
ASSERT_EQ(PERMISSION_NOT_GRANTED, ret); ASSERT_EQ(PERMISSION_NOT_GRANTED, ret);
...@@ -2150,7 +2158,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_ ...@@ -2150,7 +2158,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_011, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_011, TestSize.Level4)
{ {
int ret = PermissionKit::VerifyPermission(ABNORMAL_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID); int ret = PermissionKit::VerifyPermission(ABNORMAL_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID);
ASSERT_EQ(PERMISSION_NOT_GRANTED, ret); ASSERT_EQ(PERMISSION_NOT_GRANTED, ret);
...@@ -2166,7 +2174,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_ ...@@ -2166,7 +2174,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level4 * @tc.level Level4
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_012, TestSize.Level4) HWTEST_F(PermissionKitFunctionTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_012, TestSize.Level4)
{ {
int ret = PermissionKit::VerifyPermission(LONG_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID); int ret = PermissionKit::VerifyPermission(LONG_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID);
ASSERT_EQ(PERMISSION_NOT_GRANTED, ret); ASSERT_EQ(PERMISSION_NOT_GRANTED, ret);
......
...@@ -23,6 +23,7 @@ using namespace testing::ext; ...@@ -23,6 +23,7 @@ using namespace testing::ext;
using namespace OHOS::Security::Permission; using namespace OHOS::Security::Permission;
const int TIME_MILLIS = 1000; const int TIME_MILLIS = 1000;
const int RUNNING_TIMES = 10000;
static vector<PermissionDef> permDefNormal; static vector<PermissionDef> permDefNormal;
static vector<PermissionDef> permDefAbnormal1; static vector<PermissionDef> permDefAbnormal1;
static vector<PermissionDef> permDefAbnormal2; static vector<PermissionDef> permDefAbnormal2;
...@@ -32,6 +33,14 @@ PermissionDef permissionDefBeta; ...@@ -32,6 +33,14 @@ PermissionDef permissionDefBeta;
PermissionDef permissionDefAbnormal1; PermissionDef permissionDefAbnormal1;
PermissionDef permissionDefAbnormal2; PermissionDef permissionDefAbnormal2;
class PermissionKitPerformanceTest : public testing::Test {
public:
static void SetUpTestCase();
static void TearDownTestCase();
void SetUp();
void TearDown();
};
void initPermissionDef() void initPermissionDef()
{ {
permissionDefAlpha = { permissionDefAlpha = {
...@@ -77,7 +86,7 @@ void initPermissionDef() ...@@ -77,7 +86,7 @@ void initPermissionDef()
}; };
} }
void PermissionKitTest::SetUpTestCase() void PermissionKitPerformanceTest::SetUpTestCase()
{ {
vector<PermissionDef> permDefList1; vector<PermissionDef> permDefList1;
vector<PermissionDef> permDefList2; vector<PermissionDef> permDefList2;
...@@ -122,7 +131,7 @@ void PermissionKitTest::SetUpTestCase() ...@@ -122,7 +131,7 @@ void PermissionKitTest::SetUpTestCase()
} }
} }
void PermissionKitTest::TearDownTestCase() void PermissionKitPerformanceTest::TearDownTestCase()
{ {
PermissionKit::RemoveDefPermissions(TEST_BUNDLE_NAME); PermissionKit::RemoveDefPermissions(TEST_BUNDLE_NAME);
PermissionKit::RemoveDefPermissions(ABNORMAL_BUNDLE_NAME); PermissionKit::RemoveDefPermissions(ABNORMAL_BUNDLE_NAME);
...@@ -139,7 +148,7 @@ void PermissionKitTest::TearDownTestCase() ...@@ -139,7 +148,7 @@ void PermissionKitTest::TearDownTestCase()
} }
} }
void PermissionKitTest::SetUp() void PermissionKitPerformanceTest::SetUp()
{ {
PermissionKit::RemoveDefPermissions(TEST_BUNDLE_NAME); PermissionKit::RemoveDefPermissions(TEST_BUNDLE_NAME);
PermissionKit::RemoveDefPermissions(ABNORMAL_BUNDLE_NAME); PermissionKit::RemoveDefPermissions(ABNORMAL_BUNDLE_NAME);
...@@ -152,7 +161,7 @@ void PermissionKitTest::SetUp() ...@@ -152,7 +161,7 @@ void PermissionKitTest::SetUp()
PermissionKit::RevokeSystemGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA); PermissionKit::RevokeSystemGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA);
} }
void PermissionKitTest::TearDown() void PermissionKitPerformanceTest::TearDown()
{ {
PermissionKit::RemoveDefPermissions(TEST_BUNDLE_NAME); PermissionKit::RemoveDefPermissions(TEST_BUNDLE_NAME);
PermissionKit::RemoveDefPermissions(ABNORMAL_BUNDLE_NAME); PermissionKit::RemoveDefPermissions(ABNORMAL_BUNDLE_NAME);
...@@ -182,10 +191,10 @@ long GetCurrentTimeMillis() ...@@ -182,10 +191,10 @@ long GetCurrentTimeMillis()
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_009, TestSize.Level3) HWTEST_F(PermissionKitPerformanceTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_009, TestSize.Level3)
{ {
long timeAll = 0; long timeAll = 0;
for (int i = 0; i < 10000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
long startTime = GetCurrentTimeMillis(); long startTime = GetCurrentTimeMillis();
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -194,8 +203,8 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_ ...@@ -194,8 +203,8 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_
ret = PermissionKit::RemoveDefPermissions(TEST_BUNDLE_NAME); ret = PermissionKit::RemoveDefPermissions(TEST_BUNDLE_NAME);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
} }
std::cout<<"Performance of AddDefPermissions interface is::"<<timeAll / 10000 <<"ms"<<std::endl; std::cout<<"Performance of AddDefPermissions interface is::"<<timeAll / RUNNING_TIMES <<"ms"<<std::endl;
ASSERT_LT(timeAll / 10000, 5); ASSERT_LT(timeAll / RUNNING_TIMES, 5);
} }
/** /**
...@@ -208,10 +217,10 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_ ...@@ -208,10 +217,10 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveDefPer_008, TestSize.Level3) HWTEST_F(PermissionKitPerformanceTest, Security_AppSecurity_PermissionManager_L2_RemoveDefPer_008, TestSize.Level3)
{ {
long timeAll = 0; long timeAll = 0;
for (int i = 0; i < 10000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
long startTime = GetCurrentTimeMillis(); long startTime = GetCurrentTimeMillis();
...@@ -220,8 +229,8 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveDefP ...@@ -220,8 +229,8 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveDefP
long timeCost = GetCurrentTimeMillis() - startTime; long timeCost = GetCurrentTimeMillis() - startTime;
timeAll = timeAll + timeCost; timeAll = timeAll + timeCost;
} }
std::cout<<"Performance of RemoveDefPermissions interface is::"<<timeAll / 10000 <<"ms"<<std::endl; std::cout<<"Performance of RemoveDefPermissions interface is::"<<timeAll / RUNNING_TIMES <<"ms"<<std::endl;
ASSERT_LT(timeAll / 10000, 5); ASSERT_LT(timeAll / RUNNING_TIMES, 5);
} }
/** /**
...@@ -234,19 +243,19 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveDefP ...@@ -234,19 +243,19 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveDefP
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GetDefPer_006, TestSize.Level3) HWTEST_F(PermissionKitPerformanceTest, Security_AppSecurity_PermissionManager_L2_GetDefPer_006, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
PermissionDef permissionDefResultAlpha; PermissionDef permissionDefResultAlpha;
long startTime = GetCurrentTimeMillis(); long startTime = GetCurrentTimeMillis();
for (int i = 0; i < 10000; i++) { for (int i = 0; i < RUNNING_TIMES; i++) {
ret = PermissionKit::GetDefPermission(TEST_PERMISSION_NAME_ALPHA, permissionDefResultAlpha); ret = PermissionKit::GetDefPermission(TEST_PERMISSION_NAME_ALPHA, permissionDefResultAlpha);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
} }
long timeAll = GetCurrentTimeMillis() - startTime; long timeAll = GetCurrentTimeMillis() - startTime;
std::cout<<"Performance of GetDefPermission interface is::"<<timeAll / 10000 <<"ms"<<std::endl; std::cout<<"Performance of GetDefPermission interface is::"<<timeAll / RUNNING_TIMES <<"ms"<<std::endl;
ASSERT_LT(timeAll / 10000, 5); ASSERT_LT(timeAll / RUNNING_TIMES, 5);
} }
/** /**
...@@ -259,14 +268,14 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GetDefPer_ ...@@ -259,14 +268,14 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GetDefPer_
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGrantedPer_014, TestSize.Level3) HWTEST_F(PermissionKitPerformanceTest, Security_AppSecurity_PermissionManager_L2_AddUserGrantedPer_014, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
vector<string> permList; vector<string> permList;
permList.push_back(TEST_PERMISSION_NAME_ALPHA); permList.push_back(TEST_PERMISSION_NAME_ALPHA);
long timeAll = 0; long timeAll = 0;
for (int i = 0; i < 10000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
long startTime = GetCurrentTimeMillis(); long startTime = GetCurrentTimeMillis();
ret = PermissionKit::AddUserGrantedReqPermissions(TEST_BUNDLE_NAME, permList, TEST_USER_ID); ret = PermissionKit::AddUserGrantedReqPermissions(TEST_BUNDLE_NAME, permList, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -275,8 +284,8 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra ...@@ -275,8 +284,8 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra
ret = PermissionKit::RemoveUserGrantedReqPermissions(TEST_BUNDLE_NAME, TEST_USER_ID); ret = PermissionKit::RemoveUserGrantedReqPermissions(TEST_BUNDLE_NAME, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
} }
std::cout<<"Performance of AddUserGrantedReqPermissions interface is::"<<timeAll / 10000 <<"ms"<<std::endl; std::cout<<"Performance of AddUserGrantedReqPermissions interface is::"<<timeAll / RUNNING_TIMES <<"ms"<<std::endl;
ASSERT_LT(timeAll / 10000, 5); ASSERT_LT(timeAll / RUNNING_TIMES, 5);
} }
/** /**
...@@ -289,14 +298,14 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra ...@@ -289,14 +298,14 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemGrantedPer_011, TestSize.Level3) HWTEST_F(PermissionKitPerformanceTest, Security_AppSecurity_PermissionManager_L2_AddSystemGrantedPer_011, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
vector<string> permList; vector<string> permList;
permList.push_back(TEST_PERMISSION_NAME_ALPHA); permList.push_back(TEST_PERMISSION_NAME_ALPHA);
long timeAll = 0; long timeAll = 0;
for (int i = 0; i < 10000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
long startTime = GetCurrentTimeMillis(); long startTime = GetCurrentTimeMillis();
ret = PermissionKit::AddSystemGrantedReqPermissions(TEST_BUNDLE_NAME, permList); ret = PermissionKit::AddSystemGrantedReqPermissions(TEST_BUNDLE_NAME, permList);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -305,8 +314,8 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemG ...@@ -305,8 +314,8 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemG
ret = PermissionKit::RemoveSystemGrantedReqPermissions(TEST_BUNDLE_NAME); ret = PermissionKit::RemoveSystemGrantedReqPermissions(TEST_BUNDLE_NAME);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
} }
std::cout<<"Performance of AddSystemGrantedReqPermissions interface is::"<<timeAll / 10000 <<"ms"<<std::endl; std::cout<<"Performance of AddSystemGrantedReqPermissions interface is::"<<timeAll / RUNNING_TIMES <<"ms"<<std::endl;
ASSERT_LT(timeAll / 10000, 5); ASSERT_LT(timeAll / RUNNING_TIMES, 5);
} }
/** /**
...@@ -319,14 +328,14 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemG ...@@ -319,14 +328,14 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemG
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUserGrantedPer_012, TestSize.Level3) HWTEST_F(PermissionKitPerformanceTest, Security_AppSecurity_PermissionManager_L2_RemoveUserGrantedPer_012, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
vector<string> permList; vector<string> permList;
permList.push_back(TEST_PERMISSION_NAME_ALPHA); permList.push_back(TEST_PERMISSION_NAME_ALPHA);
long timeAll = 0; long timeAll = 0;
for (int i = 0; i < 10000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
ret = PermissionKit::AddUserGrantedReqPermissions(TEST_BUNDLE_NAME, permList, TEST_USER_ID); ret = PermissionKit::AddUserGrantedReqPermissions(TEST_BUNDLE_NAME, permList, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
long startTime = GetCurrentTimeMillis(); long startTime = GetCurrentTimeMillis();
...@@ -335,8 +344,8 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUser ...@@ -335,8 +344,8 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUser
timeAll = timeAll + timeCost; timeAll = timeAll + timeCost;
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
} }
std::cout<<"Performance of RemoveUserGrantedReqPermissions interface is::"<<timeAll / 10000 <<"ms"<<std::endl; std::cout<<"Performance of RemoveUserGrantedReqPermissions interface is::"<<timeAll / RUNNING_TIMES <<"ms"<<std::endl;
ASSERT_LT(timeAll / 10000, 5); ASSERT_LT(timeAll / RUNNING_TIMES, 5);
} }
/** /**
...@@ -349,14 +358,14 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUser ...@@ -349,14 +358,14 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUser
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSystemGrantedPer_009, TestSize.Level3) HWTEST_F(PermissionKitPerformanceTest, Security_AppSecurity_PermissionManager_L2_RemoveSystemGrantedPer_009, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
vector<string> permList; vector<string> permList;
permList.push_back(TEST_PERMISSION_NAME_BETA); permList.push_back(TEST_PERMISSION_NAME_BETA);
long timeAll = 0; long timeAll = 0;
for (int i = 0; i < 10000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
ret = PermissionKit::AddSystemGrantedReqPermissions(TEST_BUNDLE_NAME, permList); ret = PermissionKit::AddSystemGrantedReqPermissions(TEST_BUNDLE_NAME, permList);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
long startTime = GetCurrentTimeMillis(); long startTime = GetCurrentTimeMillis();
...@@ -365,8 +374,8 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSyst ...@@ -365,8 +374,8 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSyst
long timeCost = GetCurrentTimeMillis() - startTime; long timeCost = GetCurrentTimeMillis() - startTime;
timeAll = timeAll + timeCost; timeAll = timeAll + timeCost;
} }
std::cout<<"Performance of RemoveSystemGrantedReqPermissions interface is::"<<timeAll / 10000 <<"ms"<<std::endl; std::cout<<"Performance of RemoveSystemGrantedReqPermissions interface is::"<<timeAll / RUNNING_TIMES <<"ms"<<std::endl;
ASSERT_LT(timeAll / 10000, 5); ASSERT_LT(timeAll / RUNNING_TIMES, 5);
} }
/** /**
...@@ -379,7 +388,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSyst ...@@ -379,7 +388,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSyst
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserGrantedPer_014, TestSize.Level3) HWTEST_F(PermissionKitPerformanceTest, Security_AppSecurity_PermissionManager_L2_GrantUserGrantedPer_014, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -388,7 +397,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG ...@@ -388,7 +397,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG
ret = PermissionKit::AddUserGrantedReqPermissions(TEST_BUNDLE_NAME, permList, TEST_USER_ID); ret = PermissionKit::AddUserGrantedReqPermissions(TEST_BUNDLE_NAME, permList, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
long timeAll = 0; long timeAll = 0;
for (int i = 0; i < 10000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
long startTime = GetCurrentTimeMillis(); long startTime = GetCurrentTimeMillis();
ret = PermissionKit::GrantUserGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID); ret = PermissionKit::GrantUserGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -397,8 +406,8 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG ...@@ -397,8 +406,8 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG
ret = PermissionKit::RevokeUserGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID); ret = PermissionKit::RevokeUserGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
} }
std::cout<<"Performance of GrantUserGrantedPermission interface is::"<<timeAll / 10000 <<"ms"<<std::endl; std::cout<<"Performance of GrantUserGrantedPermission interface is::"<<timeAll / RUNNING_TIMES <<"ms"<<std::endl;
ASSERT_LT(timeAll / 10000, 5); ASSERT_LT(timeAll / RUNNING_TIMES, 5);
} }
/** /**
...@@ -411,7 +420,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG ...@@ -411,7 +420,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSystemGrantedPer_011, TestSize.Level3) HWTEST_F(PermissionKitPerformanceTest, Security_AppSecurity_PermissionManager_L2_GrantSystemGrantedPer_011, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -420,7 +429,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSyste ...@@ -420,7 +429,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSyste
ret = PermissionKit::AddSystemGrantedReqPermissions(TEST_BUNDLE_NAME, permList); ret = PermissionKit::AddSystemGrantedReqPermissions(TEST_BUNDLE_NAME, permList);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
long timeAll = 0; long timeAll = 0;
for (int i = 0; i < 10000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
long startTime = GetCurrentTimeMillis(); long startTime = GetCurrentTimeMillis();
ret = PermissionKit::GrantSystemGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA); ret = PermissionKit::GrantSystemGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -429,8 +438,8 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSyste ...@@ -429,8 +438,8 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSyste
ret = PermissionKit::RevokeSystemGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA); ret = PermissionKit::RevokeSystemGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
} }
std::cout<<"Performance of GrantSystemGrantedPermission interface is::"<<timeAll / 10000 <<"ms"<<std::endl; std::cout<<"Performance of GrantSystemGrantedPermission interface is::"<<timeAll / RUNNING_TIMES <<"ms"<<std::endl;
ASSERT_LT(timeAll / 10000, 5); ASSERT_LT(timeAll / RUNNING_TIMES, 5);
} }
/** /**
...@@ -443,7 +452,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSyste ...@@ -443,7 +452,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSyste
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_015, TestSize.Level3) HWTEST_F(PermissionKitPerformanceTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_015, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -452,7 +461,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser ...@@ -452,7 +461,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser
ret = PermissionKit::AddUserGrantedReqPermissions(TEST_BUNDLE_NAME, permList, TEST_USER_ID); ret = PermissionKit::AddUserGrantedReqPermissions(TEST_BUNDLE_NAME, permList, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
long timeAll = 0; long timeAll = 0;
for (int i = 0; i < 10000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
ret = PermissionKit::GrantUserGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID); ret = PermissionKit::GrantUserGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
long startTime = GetCurrentTimeMillis(); long startTime = GetCurrentTimeMillis();
...@@ -461,8 +470,8 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser ...@@ -461,8 +470,8 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser
long timeCost = GetCurrentTimeMillis() - startTime; long timeCost = GetCurrentTimeMillis() - startTime;
timeAll = timeAll + timeCost; timeAll = timeAll + timeCost;
} }
std::cout<<"Performance of GrantUserGrantedPermission interface is::"<<timeAll / 10000 <<"ms"<<std::endl; std::cout<<"Performance of GrantUserGrantedPermission interface is::"<<timeAll / RUNNING_TIMES <<"ms"<<std::endl;
ASSERT_LT(timeAll / 10000, 5); ASSERT_LT(timeAll / RUNNING_TIMES, 5);
} }
/** /**
...@@ -475,7 +484,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser ...@@ -475,7 +484,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSystemGrantedPer_012, TestSize.Level3) HWTEST_F(PermissionKitPerformanceTest, Security_AppSecurity_PermissionManager_L2_RevokeSystemGrantedPer_012, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -484,7 +493,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst ...@@ -484,7 +493,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst
ret = PermissionKit::AddSystemGrantedReqPermissions(TEST_BUNDLE_NAME, permList); ret = PermissionKit::AddSystemGrantedReqPermissions(TEST_BUNDLE_NAME, permList);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
long timeAll = 0; long timeAll = 0;
for (int i = 0; i < 10000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
ret = PermissionKit::GrantSystemGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA); ret = PermissionKit::GrantSystemGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
long startTime = GetCurrentTimeMillis(); long startTime = GetCurrentTimeMillis();
...@@ -493,8 +502,8 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst ...@@ -493,8 +502,8 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst
long timeCost = GetCurrentTimeMillis() - startTime; long timeCost = GetCurrentTimeMillis() - startTime;
timeAll = timeAll + timeCost; timeAll = timeAll + timeCost;
} }
std::cout<<"Performance of RevokeSystemGrantedPermission interface is::"<<timeAll / 10000 <<"ms"<<std::endl; std::cout<<"Performance of RevokeSystemGrantedPermission interface is::"<<timeAll / RUNNING_TIMES <<"ms"<<std::endl;
ASSERT_LT(timeAll / 10000, 5); ASSERT_LT(timeAll / RUNNING_TIMES, 5);
} }
/** /**
...@@ -507,7 +516,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst ...@@ -507,7 +516,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_017, TestSize.Level3) HWTEST_F(PermissionKitPerformanceTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_017, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -516,13 +525,13 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest ...@@ -516,13 +525,13 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest
ret = PermissionKit::AddUserGrantedReqPermissions(TEST_BUNDLE_NAME, permList, TEST_USER_ID); ret = PermissionKit::AddUserGrantedReqPermissions(TEST_BUNDLE_NAME, permList, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
long startTime = GetCurrentTimeMillis(); long startTime = GetCurrentTimeMillis();
for (int i = 0; i < 10000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
bool isCanRequest = PermissionKit::CanRequestPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID); bool isCanRequest = PermissionKit::CanRequestPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID);
ASSERT_TRUE(isCanRequest); ASSERT_TRUE(isCanRequest);
} }
long timeAll = GetCurrentTimeMillis() - startTime; long timeAll = GetCurrentTimeMillis() - startTime;
std::cout<<"Performance of CanRequestPermission interface is::"<<timeAll / 10000 <<"ms"<<std::endl; std::cout<<"Performance of CanRequestPermission interface is::"<<timeAll / RUNNING_TIMES <<"ms"<<std::endl;
ASSERT_LT(timeAll / 10000, 5); ASSERT_LT(timeAll / RUNNING_TIMES, 5);
} }
/** /**
...@@ -535,7 +544,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest ...@@ -535,7 +544,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_015, TestSize.Level3) HWTEST_F(PermissionKitPerformanceTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_015, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -546,11 +555,11 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_ ...@@ -546,11 +555,11 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_
ret = PermissionKit::GrantSystemGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA); ret = PermissionKit::GrantSystemGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
long startTime = GetCurrentTimeMillis(); long startTime = GetCurrentTimeMillis();
for (int i = 0; i < 10000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
ret = PermissionKit::VerifyPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA, TEST_USER_ID); ret = PermissionKit::VerifyPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA, TEST_USER_ID);
ASSERT_EQ(PERMISSION_GRANTED, ret); ASSERT_EQ(PERMISSION_GRANTED, ret);
} }
long timeAll = GetCurrentTimeMillis() - startTime; long timeAll = GetCurrentTimeMillis() - startTime;
std::cout<<"Performance of VerifyPermission interface is::"<<timeAll / 10000 <<"ms"<<std::endl; std::cout<<"Performance of VerifyPermission interface is::"<<timeAll / RUNNING_TIMES <<"ms"<<std::endl;
ASSERT_LT(timeAll / 10000, 5); ASSERT_LT(timeAll / RUNNING_TIMES, 5);
} }
...@@ -20,11 +20,20 @@ ...@@ -20,11 +20,20 @@
using namespace testing::ext; using namespace testing::ext;
using namespace OHOS::Security::Permission; using namespace OHOS::Security::Permission;
const int RUNNING_TIMES = 5000;
static vector<PermissionDef> permDefNormal; static vector<PermissionDef> permDefNormal;
static vector<PermissionDef> permDefAbnormal1; static vector<PermissionDef> permDefAbnormal1;
static vector<PermissionDef> permDefAbnormal2; static vector<PermissionDef> permDefAbnormal2;
void PermissionKitTest::SetUpTestCase() class PermissionKitReliabilityTest : public testing::Test {
public:
static void SetUpTestCase();
static void TearDownTestCase();
void SetUp();
void TearDown();
};
void PermissionKitReliabilityTest::SetUpTestCase()
{ {
vector<PermissionDef> permDefList1; vector<PermissionDef> permDefList1;
vector<PermissionDef> permDefList2; vector<PermissionDef> permDefList2;
...@@ -80,10 +89,10 @@ void PermissionKitTest::SetUpTestCase() ...@@ -80,10 +89,10 @@ void PermissionKitTest::SetUpTestCase()
permDefAbnormal2 = permDefList3; permDefAbnormal2 = permDefList3;
} }
void PermissionKitTest::TearDownTestCase() void PermissionKitReliabilityTest::TearDownTestCase()
{} {}
void PermissionKitTest::SetUp() void PermissionKitReliabilityTest::SetUp()
{ {
PermissionKit::RemoveDefPermissions(TEST_BUNDLE_NAME); PermissionKit::RemoveDefPermissions(TEST_BUNDLE_NAME);
PermissionKit::RemoveDefPermissions(ABNORMAL_BUNDLE_NAME); PermissionKit::RemoveDefPermissions(ABNORMAL_BUNDLE_NAME);
...@@ -96,7 +105,7 @@ void PermissionKitTest::SetUp() ...@@ -96,7 +105,7 @@ void PermissionKitTest::SetUp()
PermissionKit::RevokeSystemGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA); PermissionKit::RevokeSystemGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA);
} }
void PermissionKitTest::TearDown() void PermissionKitReliabilityTest::TearDown()
{ {
PermissionKit::RemoveDefPermissions(TEST_BUNDLE_NAME); PermissionKit::RemoveDefPermissions(TEST_BUNDLE_NAME);
PermissionKit::RemoveDefPermissions(ABNORMAL_BUNDLE_NAME); PermissionKit::RemoveDefPermissions(ABNORMAL_BUNDLE_NAME);
...@@ -119,9 +128,9 @@ void PermissionKitTest::TearDown() ...@@ -119,9 +128,9 @@ void PermissionKitTest::TearDown()
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_008, TestSize.Level3) HWTEST_F(PermissionKitReliabilityTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_008, TestSize.Level3)
{ {
for (int i = 0; i < 5000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
int ret = PermissionKit::RemoveDefPermissions(TEST_BUNDLE_NAME); int ret = PermissionKit::RemoveDefPermissions(TEST_BUNDLE_NAME);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
ret = PermissionKit::AddDefPermissions(permDefNormal); ret = PermissionKit::AddDefPermissions(permDefNormal);
...@@ -139,9 +148,9 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_ ...@@ -139,9 +148,9 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddDefPer_
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveDefPer_007, TestSize.Level3) HWTEST_F(PermissionKitReliabilityTest, Security_AppSecurity_PermissionManager_L2_RemoveDefPer_007, TestSize.Level3)
{ {
for (int i = 0; i < 5000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
ret = PermissionKit::RemoveDefPermissions(TEST_BUNDLE_NAME); ret = PermissionKit::RemoveDefPermissions(TEST_BUNDLE_NAME);
...@@ -159,12 +168,12 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveDefP ...@@ -159,12 +168,12 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveDefP
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GetDefPer_005, TestSize.Level3) HWTEST_F(PermissionKitReliabilityTest, Security_AppSecurity_PermissionManager_L2_GetDefPer_005, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
PermissionDef permissionDefResultAlpha; PermissionDef permissionDefResultAlpha;
for (int i = 0; i < 5000; i++) { for (int i = 0; i < RUNNING_TIMES; i++) {
ret = PermissionKit::GetDefPermission(TEST_PERMISSION_NAME_ALPHA, permissionDefResultAlpha); ret = PermissionKit::GetDefPermission(TEST_PERMISSION_NAME_ALPHA, permissionDefResultAlpha);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
} }
...@@ -180,13 +189,13 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GetDefPer_ ...@@ -180,13 +189,13 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GetDefPer_
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGrantedPer_013, TestSize.Level3) HWTEST_F(PermissionKitReliabilityTest, Security_AppSecurity_PermissionManager_L2_AddUserGrantedPer_013, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
vector<string> permList; vector<string> permList;
permList.push_back(TEST_PERMISSION_NAME_ALPHA); permList.push_back(TEST_PERMISSION_NAME_ALPHA);
for (int i = 0; i < 5000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
ret = PermissionKit::AddUserGrantedReqPermissions(TEST_BUNDLE_NAME, permList, TEST_USER_ID); ret = PermissionKit::AddUserGrantedReqPermissions(TEST_BUNDLE_NAME, permList, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
ret = PermissionKit::RemoveUserGrantedReqPermissions(TEST_BUNDLE_NAME, TEST_USER_ID); ret = PermissionKit::RemoveUserGrantedReqPermissions(TEST_BUNDLE_NAME, TEST_USER_ID);
...@@ -204,13 +213,13 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra ...@@ -204,13 +213,13 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddUserGra
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemGrantedPer_010, TestSize.Level3) HWTEST_F(PermissionKitReliabilityTest, Security_AppSecurity_PermissionManager_L2_AddSystemGrantedPer_010, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
vector<string> permList; vector<string> permList;
permList.push_back(TEST_PERMISSION_NAME_ALPHA); permList.push_back(TEST_PERMISSION_NAME_ALPHA);
for (int i = 0; i < 5000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
ret = PermissionKit::AddSystemGrantedReqPermissions(TEST_BUNDLE_NAME, permList); ret = PermissionKit::AddSystemGrantedReqPermissions(TEST_BUNDLE_NAME, permList);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
ret = PermissionKit::RemoveSystemGrantedReqPermissions(TEST_BUNDLE_NAME); ret = PermissionKit::RemoveSystemGrantedReqPermissions(TEST_BUNDLE_NAME);
...@@ -228,13 +237,13 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemG ...@@ -228,13 +237,13 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_AddSystemG
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUserGrantedPer_011, TestSize.Level3) HWTEST_F(PermissionKitReliabilityTest, Security_AppSecurity_PermissionManager_L2_RemoveUserGrantedPer_011, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
vector<string> permList; vector<string> permList;
permList.push_back(TEST_PERMISSION_NAME_ALPHA); permList.push_back(TEST_PERMISSION_NAME_ALPHA);
for (int i = 0; i < 10000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
ret = PermissionKit::AddUserGrantedReqPermissions(TEST_BUNDLE_NAME, permList, TEST_USER_ID); ret = PermissionKit::AddUserGrantedReqPermissions(TEST_BUNDLE_NAME, permList, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
ret = PermissionKit::RemoveUserGrantedReqPermissions(TEST_BUNDLE_NAME, TEST_USER_ID); ret = PermissionKit::RemoveUserGrantedReqPermissions(TEST_BUNDLE_NAME, TEST_USER_ID);
...@@ -252,13 +261,13 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUser ...@@ -252,13 +261,13 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveUser
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSystemGrantedPer_008, TestSize.Level3) HWTEST_F(PermissionKitReliabilityTest, Security_AppSecurity_PermissionManager_L2_RemoveSystemGrantedPer_008, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
vector<string> permList; vector<string> permList;
permList.push_back(TEST_PERMISSION_NAME_BETA); permList.push_back(TEST_PERMISSION_NAME_BETA);
for (int i = 0; i < 5000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
ret = PermissionKit::AddSystemGrantedReqPermissions(TEST_BUNDLE_NAME, permList); ret = PermissionKit::AddSystemGrantedReqPermissions(TEST_BUNDLE_NAME, permList);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
ret = PermissionKit::RemoveSystemGrantedReqPermissions(TEST_BUNDLE_NAME); ret = PermissionKit::RemoveSystemGrantedReqPermissions(TEST_BUNDLE_NAME);
...@@ -276,7 +285,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSyst ...@@ -276,7 +285,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RemoveSyst
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserGrantedPer_013, TestSize.Level3) HWTEST_F(PermissionKitReliabilityTest, Security_AppSecurity_PermissionManager_L2_GrantUserGrantedPer_013, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -284,7 +293,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG ...@@ -284,7 +293,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG
permList.push_back(TEST_PERMISSION_NAME_ALPHA); permList.push_back(TEST_PERMISSION_NAME_ALPHA);
ret = PermissionKit::AddUserGrantedReqPermissions(TEST_BUNDLE_NAME, permList, TEST_USER_ID); ret = PermissionKit::AddUserGrantedReqPermissions(TEST_BUNDLE_NAME, permList, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
for (int i = 0; i < 5000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
ret = PermissionKit::GrantUserGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID); ret = PermissionKit::GrantUserGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
ret = PermissionKit::VerifyPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID); ret = PermissionKit::VerifyPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID);
...@@ -306,7 +315,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG ...@@ -306,7 +315,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantUserG
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSystemGrantedPer_010, TestSize.Level3) HWTEST_F(PermissionKitReliabilityTest, Security_AppSecurity_PermissionManager_L2_GrantSystemGrantedPer_010, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -314,7 +323,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSyste ...@@ -314,7 +323,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSyste
permList.push_back(TEST_PERMISSION_NAME_BETA); permList.push_back(TEST_PERMISSION_NAME_BETA);
ret = PermissionKit::AddSystemGrantedReqPermissions(TEST_BUNDLE_NAME, permList); ret = PermissionKit::AddSystemGrantedReqPermissions(TEST_BUNDLE_NAME, permList);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
for (int i = 0; i < 5000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
ret = PermissionKit::GrantSystemGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA); ret = PermissionKit::GrantSystemGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
ret = PermissionKit::VerifyPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA, TEST_USER_ID); ret = PermissionKit::VerifyPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA, TEST_USER_ID);
...@@ -336,7 +345,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSyste ...@@ -336,7 +345,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_GrantSyste
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_014, TestSize.Level3) HWTEST_F(PermissionKitReliabilityTest, Security_AppSecurity_PermissionManager_L2_RevokeUserGrantedPer_014, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -344,7 +353,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser ...@@ -344,7 +353,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser
permList.push_back(TEST_PERMISSION_NAME_ALPHA); permList.push_back(TEST_PERMISSION_NAME_ALPHA);
ret = PermissionKit::AddUserGrantedReqPermissions(TEST_BUNDLE_NAME, permList, TEST_USER_ID); ret = PermissionKit::AddUserGrantedReqPermissions(TEST_BUNDLE_NAME, permList, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
for (int i = 0; i < 10000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
ret = PermissionKit::GrantUserGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID); ret = PermissionKit::GrantUserGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
ret = PermissionKit::VerifyPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID); ret = PermissionKit::VerifyPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID);
...@@ -366,7 +375,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser ...@@ -366,7 +375,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeUser
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSystemGrantedPer_011, TestSize.Level3) HWTEST_F(PermissionKitReliabilityTest, Security_AppSecurity_PermissionManager_L2_RevokeSystemGrantedPer_011, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -374,7 +383,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst ...@@ -374,7 +383,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst
permList.push_back(TEST_PERMISSION_NAME_BETA); permList.push_back(TEST_PERMISSION_NAME_BETA);
ret = PermissionKit::AddSystemGrantedReqPermissions(TEST_BUNDLE_NAME, permList); ret = PermissionKit::AddSystemGrantedReqPermissions(TEST_BUNDLE_NAME, permList);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
for (int i = 0; i < 10000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
ret = PermissionKit::GrantSystemGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA); ret = PermissionKit::GrantSystemGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
ret = PermissionKit::VerifyPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA, TEST_USER_ID); ret = PermissionKit::VerifyPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA, TEST_USER_ID);
...@@ -396,7 +405,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst ...@@ -396,7 +405,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_RevokeSyst
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_016, TestSize.Level3) HWTEST_F(PermissionKitReliabilityTest, Security_AppSecurity_PermissionManager_L2_CanRequestPer_016, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -404,7 +413,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest ...@@ -404,7 +413,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest
permList.push_back(TEST_PERMISSION_NAME_ALPHA); permList.push_back(TEST_PERMISSION_NAME_ALPHA);
ret = PermissionKit::AddUserGrantedReqPermissions(TEST_BUNDLE_NAME, permList, TEST_USER_ID); ret = PermissionKit::AddUserGrantedReqPermissions(TEST_BUNDLE_NAME, permList, TEST_USER_ID);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
for (int i = 0; i < 5000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
bool isCanRequest = PermissionKit::CanRequestPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID); bool isCanRequest = PermissionKit::CanRequestPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_ALPHA, TEST_USER_ID);
ASSERT_TRUE(isCanRequest); ASSERT_TRUE(isCanRequest);
} }
...@@ -420,7 +429,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest ...@@ -420,7 +429,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_CanRequest
* @tc.type FUNC * @tc.type FUNC
* @tc.level Level3 * @tc.level Level3
*/ */
HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_014, TestSize.Level3) HWTEST_F(PermissionKitReliabilityTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_014, TestSize.Level3)
{ {
int ret = PermissionKit::AddDefPermissions(permDefNormal); int ret = PermissionKit::AddDefPermissions(permDefNormal);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
...@@ -430,7 +439,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_ ...@@ -430,7 +439,7 @@ HWTEST_F(PermissionKitTest, Security_AppSecurity_PermissionManager_L2_VerifyPer_
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
ret = PermissionKit::GrantSystemGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA); ret = PermissionKit::GrantSystemGrantedPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA);
ASSERT_EQ(RET_SUCCESS, ret); ASSERT_EQ(RET_SUCCESS, ret);
for (int i = 0; i < 10000; i++){ for (int i = 0; i < RUNNING_TIMES; i++){
ret = PermissionKit::VerifyPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA, TEST_USER_ID); ret = PermissionKit::VerifyPermission(TEST_BUNDLE_NAME, TEST_PERMISSION_NAME_BETA, TEST_USER_ID);
ASSERT_EQ(PERMISSION_GRANTED, ret); ASSERT_EQ(PERMISSION_GRANTED, ret);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册