Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f7e8647 authored by Zhanglong Xia's avatar Zhanglong Xia
Browse files

fix the Thread Network fuzz testing error

The current fuzz testing comunicates with the Thread radio chip
simulation program `ot-rcp`. The 'ot-rcp' is not installed by all
devices, which causes the fuzz testing program is unable to find
the program '/vendor/bin/ot-rcp'.

This commit enables the HAL to talk to the '/dev/null' to avoid
'/vendor/bin/ot-rcp' not being found.

Bug: 289627270
Test: Run the fuzz test on cuttlefish
Change-Id: If410d7d75abe05c7c2d2c82fa0450e925b9a48bb
parent 59b01867
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -77,7 +77,6 @@ cc_fuzz {
        "fuzzer.cpp",
    ],

    required: ["ot-rcp"],
    fuzz_config: {
        cc: [
            "zhanglongxia@google.com",
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ using aidl::android::hardware::threadnetwork::ThreadChip;
using android::fuzzService;

extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
    char url[] = "spinel+hdlc+forkpty:///vendor/bin/ot-rcp?forkpty-arg=2";
    char url[] = "spinel+hdlc+null:///dev/null";
    auto service = ndk::SharedRefBase::make<ThreadChip>(url);

    fuzzService(service->asBinder().get(), FuzzedDataProvider(data, size));