add new fuzz test

Signed-off-by: Lkk <854071997@qq.com>
This commit is contained in:
Lkk
2025-11-20 15:14:07 +08:00
parent 02f2a9297f
commit 7737d8254f
2 changed files with 14 additions and 4 deletions
+12 -2
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2025 Huawei Device Co., Ltd.
# Copyright (c) 2021 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
@@ -56,4 +56,14 @@ ohos_fuzztest("QosManagerFuzzTest") {
"safwk:system_ability_fwk",
"samgr:samgr_proxy",
]
}
}
###############################################################################
group("fuzztest") {
testonly = true
deps = []
deps += [
# deps file
":QosManagerFuzzTest",
]
}
###############################################################################
@@ -495,7 +495,7 @@ void TestEdgeCases(const uint8_t* data, size_t size, size_t& offset)
} // namespace
void TestComprehensive(const uint8_t *data, size_t size, size_t &offset)
void TestDefault(const uint8_t *data, size_t size, size_t &offset)
{
if (offset + QOS_LEVEL_APIS_SIZE <= size) {
TestQosLevelApis(data, size, offset);
@@ -540,7 +540,7 @@ void RunTestCase(const uint8_t* data, size_t size, size_t& offset, uint8_t selec
break;
case TEST_CASE_COMPREHENSIVE: // Comprehensive test - execute multiple API groups
default:
TestComprehensive(data, size, offset);
TestDefault(data, size, offset);
break;
}
}