mirror of
https://gitee.com/openharmony/msdp_device_status
synced 2024-11-27 01:30:57 +00:00
!1938 Vdevadm tool shield user
Merge pull request !1938 from 李少雄/master
This commit is contained in:
commit
209f1fcfc1
@ -23,7 +23,6 @@ group("device_status_fuzztest") {
|
||||
"addprivilegestub_fuzzer:fuzztest",
|
||||
"addsubscriptlistener_fuzzer:fuzztest",
|
||||
"devicegetcachestub_fuzzer:fuzztest",
|
||||
"devicemanager_fuzzer:fuzztest",
|
||||
"devicestatusagent_fuzzer:fuzztest",
|
||||
"devicestatusclient_fuzzer:fuzztest",
|
||||
"devicesubscribestub_fuzzer:fuzztest",
|
||||
@ -40,6 +39,7 @@ group("device_status_fuzztest") {
|
||||
"getudkey_fuzzer:fuzztest",
|
||||
"handleallocsocketfd_fuzzer:fuzztest",
|
||||
"ipcsocket_fuzzer:fuzztest",
|
||||
"msdpdevicemanager_fuzzer:fuzztest",
|
||||
"removedraglistener_fuzzer:fuzztest",
|
||||
"removehotarealistener_fuzzer:fuzztest",
|
||||
"removesubscriptlistener_fuzzer:fuzztest",
|
||||
|
@ -35,10 +35,10 @@ deps_ex = [
|
||||
]
|
||||
|
||||
###############################fuzztest#################################
|
||||
ohos_fuzztest("DeviceManagerFuzzTest") {
|
||||
ohos_fuzztest("MsdpDeviceManagerFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file =
|
||||
"${device_status_root_path}/test/fuzztest/devicemanager_fuzzer"
|
||||
"${device_status_root_path}/test/fuzztest/msdpdevicemanager_fuzzer"
|
||||
include_dirs = [
|
||||
"${device_status_root_path}/libs/interface",
|
||||
"${device_status_service_path}/interaction/drag/include",
|
||||
@ -54,7 +54,7 @@ ohos_fuzztest("DeviceManagerFuzzTest") {
|
||||
"-Dprotected=public",
|
||||
]
|
||||
|
||||
sources = [ "devicemanager_fuzzer.cpp" ]
|
||||
sources = [ "msdpdevicemanager_fuzzer.cpp" ]
|
||||
|
||||
deps = [
|
||||
"${device_status_interfaces_path}/innerkits:devicestatus_client",
|
||||
@ -72,5 +72,5 @@ ohos_fuzztest("DeviceManagerFuzzTest") {
|
||||
group("fuzztest") {
|
||||
testonly = true
|
||||
deps = []
|
||||
deps += [ ":DeviceManagerFuzzTest" ]
|
||||
deps += [ ":MsdpDeviceManagerFuzzTest" ]
|
||||
}
|
@ -13,12 +13,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "devicemanager_fuzzer.h"
|
||||
#include "msdpdevicemanager_fuzzer.h"
|
||||
#include "ddm_adapter.h"
|
||||
#include "devicestatus_define.h"
|
||||
|
||||
#undef LOG_TAG
|
||||
#define LOG_TAG "DeviceManagerFuzzTest"
|
||||
#define LOG_TAG "MsdpDeviceManagerFuzzTest"
|
||||
namespace OHOS {
|
||||
namespace Msdp {
|
||||
namespace DeviceStatus {
|
||||
@ -457,7 +457,7 @@ std::string GetStringFromData(int strlen)
|
||||
return str;
|
||||
}
|
||||
|
||||
bool DeviceManagerFuzzTest(const uint8_t* data, size_t size)
|
||||
bool MsdpDeviceManagerFuzzTest(const uint8_t* data, size_t size)
|
||||
{
|
||||
if ((data == nullptr) || (size < 1)) {
|
||||
return false;
|
||||
@ -494,7 +494,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
return 0;
|
||||
}
|
||||
|
||||
OHOS::Msdp::DeviceStatus::DeviceManagerFuzzTest(data, size);
|
||||
OHOS::Msdp::DeviceStatus::MsdpDeviceManagerFuzzTest(data, size);
|
||||
|
||||
return 0;
|
||||
}
|
@ -13,10 +13,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef DEVICEMANAGER_FUZZER_H
|
||||
#define DEVICEMANAGER_FUZZER_H
|
||||
#ifndef MSDPDEVICEMANAGER_FUZZER_H
|
||||
#define MSDPDEVICEMANAGER_FUZZER_H
|
||||
|
||||
#define FUZZ_PROJECT_NAME "devicemanager_fuzzer"
|
||||
#define FUZZ_PROJECT_NAME "msdpdevicemanager_fuzzer"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@ -107,4 +107,4 @@ private:
|
||||
} // namespace DeviceStatus
|
||||
} // namespace Msdp
|
||||
} // namespace OHOS
|
||||
#endif // DEVICEMANAGER_FUZZER_H
|
||||
#endif // MSDPDEVICEMANAGER_FUZZER_H
|
@ -101,7 +101,12 @@ ohos_executable("vdevadm") {
|
||||
"json:nlohmann_json_static",
|
||||
]
|
||||
|
||||
install_enable = true
|
||||
if (build_variant == "root" && root_perf_main != "root_main") {
|
||||
install_enable = true
|
||||
} else {
|
||||
install_enable = false
|
||||
}
|
||||
|
||||
subsystem_name = "${device_status_subsystem_name}"
|
||||
part_name = "${device_status_part_name}"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user