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

Commit 1bd1c268 authored by Hui Peng's avatar Hui Peng Committed by Automerger Merge Worker
Browse files

Add regression test for b/260078907 am: 27200cfe

parents da78b64e 27200cfe
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -866,6 +866,7 @@ cc_test {
        "btm/btm_sec.cc",
        "metrics/stack_metrics_logging.cc",
        "test/btm/stack_btm_test.cc",
        "test/btm/stack_btm_regression_tests.cc",
        "test/btm/peer_packet_types_test.cc",
        "test/common/mock_eatt.cc",
    ],
+43 −0
Original line number Diff line number Diff line
/*
 *
 *  Copyright 2022 The Android Open Source Project
 *
 *  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.
 *
 */

#include <gtest/gtest.h>

#include "bt_hdr.h"
#include "btm_ble_api_types.h"
#include "hci_error_code.h"
#include "osi/include/allocator.h"
#include "ble_hci_link_interface.h"

namespace {

class StackBTMRegressionTests : public ::testing::Test {
 protected:
  void SetUp() override {}
  void TearDown() override {}
};

// regression test for b/260078907
TEST_F(StackBTMRegressionTests,
       OOB_in_btm_ble_add_resolving_list_entry_complete) {
  BT_HDR* pevent = (BT_HDR*)osi_calloc(sizeof(BT_HDR));
  btm_ble_add_resolving_list_entry_complete(pevent->data, 0);
  osi_free(pevent);
}

}  // namespace