diff options
author | Omair Kamil <okamil@google.com> | 2024-04-25 19:21:35 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2024-04-25 19:21:35 +0000 |
commit | 62734b79cb995a24a5945efb2babc33398887a7e (patch) | |
tree | 6740f6c498ef6c724c320c8156f5a620111ccb80 | |
parent | f9fc955231198f4539efc9b988af35386d560332 (diff) | |
parent | 84a95be33bd2ddceac196e4f753706d8dba50191 (diff) | |
download | interfaces-62734b79cb995a24a5945efb2babc33398887a7e.tar.gz |
Merge "Add VTS requirement for concurrent LE connections." into main
-rw-r--r-- | bluetooth/aidl/vts/VtsHalBluetoothTargetTest.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/bluetooth/aidl/vts/VtsHalBluetoothTargetTest.cpp b/bluetooth/aidl/vts/VtsHalBluetoothTargetTest.cpp index 140b956043..aaf436f4aa 100644 --- a/bluetooth/aidl/vts/VtsHalBluetoothTargetTest.cpp +++ b/bluetooth/aidl/vts/VtsHalBluetoothTargetTest.cpp @@ -1095,6 +1095,37 @@ TEST_P(BluetoothAidlTest, Vsr_Bluetooth4_2Requirements) { } +/** + * VSR-5.3.14-012 MUST support at least eight LE concurrent connections with + * three in peripheral role. + */ +// @VsrTest = 5.3.14-012 +TEST_P(BluetoothAidlTest, Vsr_BlE_Connection_Requirement) { + std::vector<uint8_t> version_event; + send_and_wait_for_cmd_complete(ReadLocalVersionInformationBuilder::Create(), + version_event); + auto version_view = ReadLocalVersionInformationCompleteView::Create( + CommandCompleteView::Create(EventView::Create(PacketView<true>( + std::make_shared<std::vector<uint8_t>>(version_event))))); + ASSERT_TRUE(version_view.IsValid()); + ASSERT_EQ(::bluetooth::hci::ErrorCode::SUCCESS, version_view.GetStatus()); + auto version = version_view.GetLocalVersionInformation(); + if (version.hci_version_ < ::bluetooth::hci::HciVersion::V_5_0) { + // This test does not apply to controllers below 5.0 + return; + }; + + int max_connections = ::android::base::GetIntProperty( + "bluetooth.core.le.max_number_of_concurrent_connections", -1); + if (max_connections == -1) { + // With the property not set the default minimum of 8 will be used + ALOGI("Max number of LE concurrent connections isn't set"); + return; + } + ALOGI("Max number of LE concurrent connections = %d", max_connections); + ASSERT_GE(max_connections, 8); +} + GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(BluetoothAidlTest); INSTANTIATE_TEST_SUITE_P(PerInstance, BluetoothAidlTest, testing::ValuesIn(android::getAidlHalInstanceNames( |