适配CFI出现unavailable的UT进行屏蔽

Signed-off-by: liuxiaowei <liuxiaowei45@huawei.com>
This commit is contained in:
liuxiaowei 2024-04-08 15:33:10 +08:00
parent 5c2072fe70
commit 46d2cdee52
2 changed files with 43 additions and 0 deletions

16
cfi_blocklist.txt Normal file
View File

@ -0,0 +1,16 @@
# Copyright (C) 2022-2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
[cfi]
src:*third_party/googletest/googlemock/include/gmock/*
src:*third_party/googletest/googletest/include/gtest/*

View File

@ -17,6 +17,7 @@ import("//foundation/filemanagement/user_file_service/filemanagement_aafwk.gni")
ohos_unittest("medialibrary_file_access_test") {
branch_protector_ret = "pac_ret"
sanitize = {
integer_overflow = true
cfi = true
cfi_cross_dso = true
debug = false
@ -68,6 +69,7 @@ ohos_unittest("medialibrary_file_access_test") {
ohos_unittest("external_file_access_test") {
branch_protector_ret = "pac_ret"
sanitize = {
integer_overflow = true
cfi = true
cfi_cross_dso = true
debug = false
@ -122,6 +124,7 @@ ohos_unittest("external_file_access_test") {
ohos_unittest("abnormal_file_access_test") {
branch_protector_ret = "pac_ret"
sanitize = {
integer_overflow = true
cfi = true
cfi_cross_dso = true
debug = false
@ -165,6 +168,14 @@ ohos_unittest("abnormal_file_access_test") {
}
ohos_unittest("file_access_ext_stub_impl_test") {
branch_protector_ret = "pac_ret"
sanitize = {
integer_overflow = true
cfi = true
cfi_cross_dso = true
debug = false
blocklist = "${user_file_service_path}/cfi_blocklist.txt"
}
module_out_path = "user_file_service/tests"
include_dirs = [
@ -202,6 +213,14 @@ ohos_unittest("file_access_ext_stub_impl_test") {
}
ohos_unittest("file_access_service_proxy_test") {
branch_protector_ret = "pac_ret"
sanitize = {
integer_overflow = true
cfi = true
cfi_cross_dso = true
debug = false
blocklist = "${user_file_service_path}/cfi_blocklist.txt"
}
module_out_path = "user_file_service/tests"
include_dirs = [
@ -246,6 +265,14 @@ ohos_unittest("file_access_service_proxy_test") {
}
ohos_unittest("js_file_access_ext_ability_test") {
branch_protector_ret = "pac_ret"
sanitize = {
integer_overflow = true
cfi = true
cfi_cross_dso = true
debug = false
blocklist = "${user_file_service_path}/cfi_blocklist.txt"
}
module_out_path = "user_file_service/tests"
include_dirs = [