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

Commit 7edc29a6 authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Automerger Merge Worker
Browse files
parents 041bdb0a 218ce852
Loading
Loading
Loading
Loading
+0 −10
Original line number Original line Diff line number Diff line
@@ -143,12 +143,10 @@ cc_defaults {
        ":BluetoothDumpsysSources",
        ":BluetoothDumpsysSources",
        ":BluetoothHalSources",
        ":BluetoothHalSources",
        ":BluetoothHciSources",
        ":BluetoothHciSources",
        ":BluetoothL2capSources",
        ":BluetoothMetricsSources",
        ":BluetoothMetricsSources",
        ":BluetoothNeighborSources",
        ":BluetoothNeighborSources",
        ":BluetoothOsSources",
        ":BluetoothOsSources",
        ":BluetoothPacketSources",
        ":BluetoothPacketSources",
        ":BluetoothSecuritySources",
        ":BluetoothStorageSources",
        ":BluetoothStorageSources",
        "module.cc",
        "module.cc",
        "module_dumper.cc",
        "module_dumper.cc",
@@ -298,7 +296,6 @@ cc_binary {
    srcs: [
    srcs: [
        ":BluetoothFacade_hci_hal",
        ":BluetoothFacade_hci_hal",
        ":BluetoothFacade_hci_layer",
        ":BluetoothFacade_hci_layer",
        ":BluetoothFacade_l2cap_layer",
        ":BluetoothFacade_neighbor",
        ":BluetoothFacade_neighbor",
        ":TestMockMainShimStack",
        ":TestMockMainShimStack",
        "facade/facade_main.cc",
        "facade/facade_main.cc",
@@ -476,11 +473,9 @@ cc_test {
        ":BluetoothCryptoToolboxTestSources",
        ":BluetoothCryptoToolboxTestSources",
        ":BluetoothHalTestSources",
        ":BluetoothHalTestSources",
        ":BluetoothHciUnitTestSources",
        ":BluetoothHciUnitTestSources",
        ":BluetoothL2capUnitTestSources",
        ":BluetoothMetricsTestSources",
        ":BluetoothMetricsTestSources",
        ":BluetoothOsTestSources",
        ":BluetoothOsTestSources",
        ":BluetoothPacketTestSources",
        ":BluetoothPacketTestSources",
        ":BluetoothSecurityUnitTestSources",
        ":BluetoothStorageUnitTestSources",
        ":BluetoothStorageUnitTestSources",
        "module_unittest.cc",
        "module_unittest.cc",
        "stack_manager_unittest.cc",
        "stack_manager_unittest.cc",
@@ -699,7 +694,6 @@ cc_fuzz {
    defaults: ["gd_fuzz_defaults"],
    defaults: ["gd_fuzz_defaults"],
    srcs: [
    srcs: [
        ":BluetoothHciFuzzTestSources",
        ":BluetoothHciFuzzTestSources",
        ":BluetoothL2capFuzzTestSources",
        "fuzz_test.cc",
        "fuzz_test.cc",
    ],
    ],
    fuzz_config: {
    fuzz_config: {
@@ -767,7 +761,6 @@ genrule {
        "dumpsys_data.fbs",
        "dumpsys_data.fbs",
        "hci/hci_acl_manager.fbs",
        "hci/hci_acl_manager.fbs",
        "hci/hci_controller.fbs",
        "hci/hci_controller.fbs",
        "l2cap/classic/l2cap_classic_module.fbs",
        "module_unittest.fbs",
        "module_unittest.fbs",
        "os/wakelock_manager.fbs",
        "os/wakelock_manager.fbs",
        "shim/dumpsys.fbs",
        "shim/dumpsys.fbs",
@@ -778,7 +771,6 @@ genrule {
        "hci_acl_manager.bfbs",
        "hci_acl_manager.bfbs",
        "hci_controller.bfbs",
        "hci_controller.bfbs",
        "init_flags.bfbs",
        "init_flags.bfbs",
        "l2cap_classic_module.bfbs",
        "wakelock_manager.bfbs",
        "wakelock_manager.bfbs",
    ],
    ],
}
}
@@ -794,7 +786,6 @@ genrule {
        "dumpsys_data.fbs",
        "dumpsys_data.fbs",
        "hci/hci_acl_manager.fbs",
        "hci/hci_acl_manager.fbs",
        "hci/hci_controller.fbs",
        "hci/hci_controller.fbs",
        "l2cap/classic/l2cap_classic_module.fbs",
        "module_unittest.fbs",
        "module_unittest.fbs",
        "os/wakelock_manager.fbs",
        "os/wakelock_manager.fbs",
        "shim/dumpsys.fbs",
        "shim/dumpsys.fbs",
@@ -805,7 +796,6 @@ genrule {
        "hci_acl_manager_generated.h",
        "hci_acl_manager_generated.h",
        "hci_controller_generated.h",
        "hci_controller_generated.h",
        "init_flags_generated.h",
        "init_flags_generated.h",
        "l2cap_classic_module_generated.h",
        "wakelock_manager_generated.h",
        "wakelock_manager_generated.h",
    ],
    ],
}
}
+0 −4
Original line number Original line Diff line number Diff line
@@ -83,10 +83,8 @@ static_library("libbluetooth_gd") {
    "//bt/system/gd/hal:BluetoothHalSources",
    "//bt/system/gd/hal:BluetoothHalSources",
    "//bt/system/gd/hal:BluetoothHalSources_hci_host",
    "//bt/system/gd/hal:BluetoothHalSources_hci_host",
    "//bt/system/gd/hal:BluetoothHalSources_ranging_host",
    "//bt/system/gd/hal:BluetoothHalSources_ranging_host",
    "//bt/system/gd/l2cap:BluetoothL2capSources",
    "//bt/system/gd/metrics:BluetoothMetricsSources",
    "//bt/system/gd/metrics:BluetoothMetricsSources",
    "//bt/system/gd/neighbor:BluetoothNeighborSources",
    "//bt/system/gd/neighbor:BluetoothNeighborSources",
    "//bt/system/gd/security:BluetoothSecuritySources",
    "//bt/system/gd/shim:BluetoothShimSources",
    "//bt/system/gd/shim:BluetoothShimSources",
    "//bt/system/gd/storage:BluetoothStorageSources",
    "//bt/system/gd/storage:BluetoothStorageSources",
    "//bt/system/gd/sysprops:BluetoothSyspropsSources",
    "//bt/system/gd/sysprops:BluetoothSyspropsSources",
@@ -100,7 +98,6 @@ flatbuffer("BluetoothGeneratedDumpsysDataSchema_h") {
    "dumpsys_data.fbs",
    "dumpsys_data.fbs",
    "hci/hci_acl_manager.fbs",
    "hci/hci_acl_manager.fbs",
    "hci/hci_controller.fbs",
    "hci/hci_controller.fbs",
    "l2cap/classic/l2cap_classic_module.fbs",
    "os/wakelock_manager.fbs",
    "os/wakelock_manager.fbs",
    "shim/dumpsys.fbs",
    "shim/dumpsys.fbs",
  ]
  ]
@@ -112,7 +109,6 @@ bt_flatc_binary_schema("BluetoothGeneratedDumpsysBinarySchema_bfbs") {
    "dumpsys_data.fbs",
    "dumpsys_data.fbs",
    "hci/hci_acl_manager.fbs",
    "hci/hci_acl_manager.fbs",
    "hci/hci_controller.fbs",
    "hci/hci_controller.fbs",
    "l2cap/classic/l2cap_classic_module.fbs",
    "os/wakelock_manager.fbs",
    "os/wakelock_manager.fbs",
    "shim/dumpsys.fbs",
    "shim/dumpsys.fbs",
  ]
  ]
+0 −2
Original line number Original line Diff line number Diff line
@@ -12,7 +12,6 @@
include "common/init_flags.fbs";
include "common/init_flags.fbs";
include "hci/hci_acl_manager.fbs";
include "hci/hci_acl_manager.fbs";
include "hci/hci_controller.fbs";
include "hci/hci_controller.fbs";
include "l2cap/classic/l2cap_classic_module.fbs";
include "module_unittest.fbs";
include "module_unittest.fbs";
include "os/wakelock_manager.fbs";
include "os/wakelock_manager.fbs";
include "shim/dumpsys.fbs";
include "shim/dumpsys.fbs";
@@ -26,7 +25,6 @@ table DumpsysData {
    init_flags:common.InitFlagsData (privacy:"Any");
    init_flags:common.InitFlagsData (privacy:"Any");
    wakelock_manager_data:bluetooth.os.WakelockManagerData (privacy:"Any");
    wakelock_manager_data:bluetooth.os.WakelockManagerData (privacy:"Any");
    shim_dumpsys_data:bluetooth.shim.DumpsysModuleData (privacy:"Any");
    shim_dumpsys_data:bluetooth.shim.DumpsysModuleData (privacy:"Any");
    l2cap_classic_dumpsys_data:bluetooth.l2cap.classic.L2capClassicModuleData (privacy:"Any");
    hci_acl_manager_dumpsys_data:bluetooth.hci.AclManagerData (privacy:"Any");
    hci_acl_manager_dumpsys_data:bluetooth.hci.AclManagerData (privacy:"Any");
    hci_controller_dumpsys_data:bluetooth.hci.ControllerData (privacy:"Any");
    hci_controller_dumpsys_data:bluetooth.hci.ControllerData (privacy:"Any");
    module_unittest_data:bluetooth.ModuleUnitTestData; // private
    module_unittest_data:bluetooth.ModuleUnitTestData; // private
+0 −22
Original line number Original line Diff line number Diff line
@@ -29,8 +29,6 @@
#include "hci/facade/le_advertising_manager_facade.h"
#include "hci/facade/le_advertising_manager_facade.h"
#include "hci/facade/le_initiator_address_facade.h"
#include "hci/facade/le_initiator_address_facade.h"
#include "hci/facade/le_scanning_manager_facade.h"
#include "hci/facade/le_scanning_manager_facade.h"
#include "l2cap/classic/facade.h"
#include "l2cap/le/facade.h"
#include "neighbor/facade/facade.h"
#include "neighbor/facade/facade.h"
#include "os/log.h"
#include "os/log.h"
#include "os/thread.h"
#include "os/thread.h"
@@ -77,26 +75,6 @@ public:
        modules.add<::bluetooth::hci::facade::LeScanningManagerFacadeModule>();
        modules.add<::bluetooth::hci::facade::LeScanningManagerFacadeModule>();
        modules.add<::bluetooth::neighbor::facade::NeighborFacadeModule>();
        modules.add<::bluetooth::neighbor::facade::NeighborFacadeModule>();
        break;
        break;
      case BluetoothModule::L2CAP:
        modules.add<::bluetooth::hci::facade::ControllerFacadeModule>();
        modules.add<::bluetooth::hci::facade::LeAdvertisingManagerFacadeModule>();
        modules.add<::bluetooth::hci::facade::LeInitiatorAddressFacadeModule>();
        modules.add<::bluetooth::neighbor::facade::NeighborFacadeModule>();
        modules.add<::bluetooth::facade::ReadOnlyPropertyServerModule>();
        modules.add<::bluetooth::l2cap::classic::L2capClassicModuleFacadeModule>();
        modules.add<::bluetooth::l2cap::le::L2capLeModuleFacadeModule>();
        modules.add<::bluetooth::hci::facade::HciFacadeModule>();
        break;
      case BluetoothModule::SECURITY:
        modules.add<::bluetooth::facade::ReadOnlyPropertyServerModule>();
        modules.add<::bluetooth::hci::facade::ControllerFacadeModule>();
        modules.add<::bluetooth::neighbor::facade::NeighborFacadeModule>();
        modules.add<::bluetooth::l2cap::classic::L2capClassicModuleFacadeModule>();
        modules.add<::bluetooth::hci::facade::HciFacadeModule>();
        modules.add<::bluetooth::hci::facade::ControllerFacadeModule>();
        modules.add<::bluetooth::hci::facade::LeAdvertisingManagerFacadeModule>();
        modules.add<::bluetooth::hci::facade::LeScanningManagerFacadeModule>();
        break;
      default:
      default:
        return ::grpc::Status(::grpc::StatusCode::INVALID_ARGUMENT, "invalid module under test");
        return ::grpc::Status(::grpc::StatusCode::INVALID_ARGUMENT, "invalid module under test");
    }
    }
+0 −4
Original line number Original line Diff line number Diff line
@@ -17,13 +17,9 @@
#include <stddef.h>
#include <stddef.h>
#include <stdint.h>
#include <stdint.h>


void RunL2capClassicDynamicChannelAllocatorFuzzTest(const uint8_t* data, size_t size);
void RunL2capPacketFuzzTest(const uint8_t* data, size_t size);
void RunHciPacketFuzzTest(const uint8_t* data, size_t size);
void RunHciPacketFuzzTest(const uint8_t* data, size_t size);


extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
  RunL2capClassicDynamicChannelAllocatorFuzzTest(data, size);
  RunL2capPacketFuzzTest(data, size);
  RunHciPacketFuzzTest(data, size);
  RunHciPacketFuzzTest(data, size);
  return 0;
  return 0;
}
}
Loading