From c0b954febe7cba3a8a4970da6bba78cbfc139a55 Mon Sep 17 00:00:00 2001 From: xialiyun Date: Fri, 11 Jun 2021 14:36:04 +0800 Subject: [PATCH] hujixiang1@huawei.com Signed-off-by: xialiyun Change-Id: I4808bc61a0f10aa04a15a39fc473f880505ee4e4 --- .../permission_posix/capability/jffs/BUILD.gn | 19 +++++++++++++----- .../capability/src/ActsCapabilityTest.cpp | 6 ++++-- .../permission_posix/capability/vfat/BUILD.gn | 20 ++++++++++++++----- 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/security_lite/permission_posix/capability/jffs/BUILD.gn b/security_lite/permission_posix/capability/jffs/BUILD.gn index a4af1b5ec..e617ab4af 100755 --- a/security_lite/permission_posix/capability/jffs/BUILD.gn +++ b/security_lite/permission_posix/capability/jffs/BUILD.gn @@ -12,6 +12,7 @@ # limitations under the License. import("//test/xts/tools/lite/build/suite_lite.gni") +import("//build/lite/config/subsystem/aafwk/config.gni") hcpptest_suite("ActsJFFS2CapabilityTest") { suite_name = "acts" @@ -39,9 +40,17 @@ hcpptest_suite("ActsJFFS2CapabilityTest") { "-lpthread", ] - defines = [ - "LITE_FS_JFFS2", - "TOP_DIR=\"/storage\"", - "TOP_DIR_MOUNT_INFO=\"/storage jffs\"", - ] + if(enable_ohos_appexecfwk_feature_ability == true) { + defines = ["BOARD_HI3516_", + "LITE_FS_JFFS2", + "TOP_DIR=\"/storage\"", + "TOP_DIR_MOUNT_INFO=\"/storage jffs\"", + ] + } else { + defines = [ + "LITE_FS_JFFS2", + "TOP_DIR=\"/storage\"", + "TOP_DIR_MOUNT_INFO=\"/storage jffs\"", + ] + } } diff --git a/security_lite/permission_posix/capability/src/ActsCapabilityTest.cpp b/security_lite/permission_posix/capability/src/ActsCapabilityTest.cpp index 2f6098131..da2e4f8ce 100755 --- a/security_lite/permission_posix/capability/src/ActsCapabilityTest.cpp +++ b/security_lite/permission_posix/capability/src/ActsCapabilityTest.cpp @@ -1490,7 +1490,8 @@ HWTEST_F(CapabilityTestSuite, CapabilityTest2100, Reliability | MediumTest | Lev } #endif -#if defined(LITE_FS_JFFS2) +#ifndef _BOARD_HI3516_ +#if defined(LITE_FS_JFFS2) || defined(LITE_FS_VFAT) /* * @tc.number : SUB_SEC_AppSEC_PermissionMgmt_Capability_2200 * @tc.name : Check whether the default configuration of the system process capabilities @@ -1529,8 +1530,9 @@ HWTEST_F(CapabilityTestSuite, CapabilityTest2200, Security | MediumTest | Level1 EXPECT_EQ(ret, 0) << "ErrInfo: Pid = 9, process wms_server or ai_server has wrong capability"; } #endif +#endif -#if defined(LITE_FS_VFAT) +#if defined(LITE_FS_VFAT) && defined(_BOARD_HI3516_) /* * @tc.number : SUB_SEC_AppSEC_PermissionMgmt_Capability_2200 * @tc.name : Check whether the default configuration of the system process capabilities diff --git a/security_lite/permission_posix/capability/vfat/BUILD.gn b/security_lite/permission_posix/capability/vfat/BUILD.gn index 97fc283b9..a56a18a61 100755 --- a/security_lite/permission_posix/capability/vfat/BUILD.gn +++ b/security_lite/permission_posix/capability/vfat/BUILD.gn @@ -12,6 +12,7 @@ # limitations under the License. import("//test/xts/tools/lite/build/suite_lite.gni") +import("//build/lite/config/subsystem/aafwk/config.gni") hcpptest_suite("ActsVFATCapabilityTest") { suite_name = "acts" @@ -39,9 +40,18 @@ hcpptest_suite("ActsVFATCapabilityTest") { "-lpthread", ] - defines = [ - "LITE_FS_VFAT", - "TOP_DIR=\"/sdcard\"", - "TOP_DIR_MOUNT_INFO=\"/sdcard vfat\"", - ] + if(enable_ohos_appexecfwk_feature_ability == true) { + defines = ["BOARD_HI3516_", + "LITE_FS_JFFS2", + "TOP_DIR=\"/sdcard\"", + "TOP_DIR_MOUNT_INFO=\"/sdcard vfat\"", + ] + } else { + defines = [ + "LITE_FS_VFAT", + "TOP_DIR=\"/sdcard\"", + "TOP_DIR_MOUNT_INFO=\"/sdcard vfat\"", + ] + } } + -- GitLab