Merge "Actually add DimmingStage to client target properties" into tm-dev am: a123e7688d am: fcf9d52f1f
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/17006809
Change-Id: Ic5328dce784a67a5326edba773bca9b353d01304
diff --git a/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/include/JsonFakeValueGenerator.h b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/include/JsonFakeValueGenerator.h
index 947eb4f..d421ac5 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/include/JsonFakeValueGenerator.h
+++ b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/include/JsonFakeValueGenerator.h
@@ -56,7 +56,7 @@
private:
size_t mEventIndex = 0;
std::vector<aidl::android::hardware::automotive::vehicle::VehiclePropValue> mEvents;
- long mLastEventTimestamp = 0;
+ int64_t mLastEventTimestamp = 0;
int32_t mNumOfIterations = 0;
void setBit(std::vector<uint8_t>& bytes, size_t idx);
diff --git a/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/src/JsonFakeValueGenerator.cpp b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/src/JsonFakeValueGenerator.cpp
index ae92797..d4d52a5 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/src/JsonFakeValueGenerator.cpp
+++ b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/src/JsonFakeValueGenerator.cpp
@@ -213,7 +213,7 @@
if (mLastEventTimestamp == 0) {
mLastEventTimestamp = elapsedRealtimeNano();
} else {
- long nextEventTime = 0;
+ int64_t nextEventTime = 0;
if (mEventIndex > 0) {
// All events (start from 2nd one) are supposed to happen in the future with a delay
// equals to the duration between previous and current event.
diff --git a/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/test/Android.bp b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/test/Android.bp
index ac8db44..2eef13c 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/test/Android.bp
+++ b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/test/Android.bp
@@ -41,6 +41,7 @@
name: "FakeVehicleHalValueGeneratorsTestFiles",
srcs: [
"prop.json",
+ "prop_different_types.json",
"prop_invalid.json",
],
}
diff --git a/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/test/FakeVehicleHalValueGeneratorsTest.cpp b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/test/FakeVehicleHalValueGeneratorsTest.cpp
index 21aa680..cdfa8b2 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/test/FakeVehicleHalValueGeneratorsTest.cpp
+++ b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/test/FakeVehicleHalValueGeneratorsTest.cpp
@@ -24,6 +24,7 @@
#include <utils/SystemClock.h>
#include <chrono>
+#include <condition_variable>
#include <memory>
#include <mutex>
#include <optional>
@@ -38,6 +39,9 @@
using ::aidl::android::hardware::automotive::vehicle::VehicleProperty;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropValue;
+using ::android::base::ScopedLockAssertion;
+
+using std::literals::chrono_literals::operator""s;
class FakeVehicleHalValueGeneratorsTest : public ::testing::Test {
protected:
@@ -58,6 +62,16 @@
mEvents.clear();
}
+ void waitForEvents(size_t count) {
+ std::unique_lock<std::mutex> uniqueLock(mEventsLock);
+ bool result = mCv.wait_for(uniqueLock, 10s, [this, count] {
+ ScopedLockAssertion lockAssertion(mEventsLock);
+ return mEvents.size() >= count;
+ });
+
+ ASSERT_TRUE(result) << "didn't receive enough events";
+ }
+
void TearDown() override {
// Generator callback uses mEvents, must stop generator before destroying mEvents.
mHub.reset();
@@ -71,12 +85,16 @@
private:
void onHalEvent(const VehiclePropValue& event) {
VehiclePropValue eventCopy = event;
- std::scoped_lock<std::mutex> lockGuard(mEventsLock);
- mEvents.push_back(std::move(eventCopy));
+ {
+ std::scoped_lock<std::mutex> lockGuard(mEventsLock);
+ mEvents.push_back(std::move(eventCopy));
+ }
+ mCv.notify_all();
}
std::unique_ptr<GeneratorHub> mHub;
std::mutex mEventsLock;
+ std::condition_variable mCv;
std::vector<VehiclePropValue> mEvents GUARDED_BY(mEventsLock);
};
@@ -108,15 +126,15 @@
for (size_t i = 0; i < eventCount; i++) {
events.push_back(VehiclePropValue{
.prop = static_cast<int32_t>(i),
- .timestamp = timestamp + static_cast<int64_t>(50 * i),
+ // Generate 1 event every 1ms.
+ .timestamp = timestamp + static_cast<int64_t>(1000000 * i),
});
}
generator->setEvents(events);
getHub()->registerGenerator(0, std::move(generator));
- // All the events require 500ms to generate, so waiting for 1000ms should be enough.
- std::this_thread::sleep_for(std::chrono::milliseconds(1000));
+ waitForEvents(events.size());
ASSERT_EQ(getEvents(), events);
@@ -131,17 +149,23 @@
for (size_t i = 0; i < eventCount; i++) {
events.push_back(VehiclePropValue{
.prop = static_cast<int32_t>(i),
- .timestamp = timestamp + static_cast<int64_t>(50 * i),
+ // Generate 1 event every 1ms.
+ .timestamp = timestamp + static_cast<int64_t>(1000000 * i),
});
}
generator->setEvents(events);
getHub()->registerGenerator(0, std::move(generator));
+
+ waitForEvents(1);
+
getHub()->unregisterGenerator(0);
+ clearEvents();
- std::this_thread::sleep_for(std::chrono::milliseconds(1000));
+ std::this_thread::sleep_for(std::chrono::milliseconds(100));
- ASSERT_LT(getEvents().size(), static_cast<size_t>(10))
+ // It is possible that one last event would be generated after unregistering.
+ ASSERT_LE(getEvents().size(), 1u)
<< "Must stop generating event after generator is unregistered";
}
@@ -155,13 +179,11 @@
/*interval=*/10000000);
getHub()->registerGenerator(0, std::move(generator));
- std::this_thread::sleep_for(std::chrono::milliseconds(100));
-
+ waitForEvents(10);
auto events = getEvents();
- // We should get 10 events ideally, but let's be safe here.
- ASSERT_LE((size_t)5, events.size());
+
int value = 30;
- for (size_t i = 0; i < 5; i++) {
+ for (size_t i = 0; i < 10; i++) {
EXPECT_EQ(std::vector<float>({static_cast<float>(value)}), events[i].value.floatValues);
value = (value + 20) % 100;
}
@@ -177,13 +199,11 @@
/*interval=*/10000000);
getHub()->registerGenerator(0, std::move(generator));
- std::this_thread::sleep_for(std::chrono::milliseconds(100));
-
+ waitForEvents(10);
auto events = getEvents();
- // We should get 10 events ideally, but let's be safe here.
- ASSERT_LE((size_t)5, events.size());
+
int value = 30;
- for (size_t i = 0; i < 5; i++) {
+ for (size_t i = 0; i < 10; i++) {
EXPECT_EQ(std::vector<int32_t>({value}), events[i].value.int32Values);
value = (value + 20) % 100;
}
@@ -199,13 +219,11 @@
/*interval=*/10000000);
getHub()->registerGenerator(0, std::move(generator));
- std::this_thread::sleep_for(std::chrono::milliseconds(100));
-
+ waitForEvents(10);
auto events = getEvents();
- // We should get 10 events ideally, but let's be safe here.
- ASSERT_LE((size_t)5, events.size());
+
int value = 30;
- for (size_t i = 0; i < 5; i++) {
+ for (size_t i = 0; i < 10; i++) {
EXPECT_EQ(std::vector<int64_t>({value}), events[i].value.int64Values);
value = (value + 20) % 100;
}
@@ -221,13 +239,11 @@
std::make_unique<LinearFakeValueGenerator>(request);
getHub()->registerGenerator(0, std::move(generator));
- std::this_thread::sleep_for(std::chrono::milliseconds(100));
-
+ waitForEvents(10);
auto events = getEvents();
- // We should get 10 events ideally, but let's be safe here.
- ASSERT_LE((size_t)5, events.size());
+
int value = 50;
- for (size_t i = 0; i < 5; i++) {
+ for (size_t i = 0; i < 10; i++) {
EXPECT_EQ(std::vector<float>({static_cast<float>(value)}), events[i].value.floatValues);
value = (value + 20) % 100;
}
@@ -244,30 +260,24 @@
/*interval=*/10000000);
getHub()->registerGenerator(0, std::move(generator));
- std::this_thread::sleep_for(std::chrono::milliseconds(100));
-
+ waitForEvents(10);
auto events = getEvents();
- // We should get 10 events ideally, but let's be safe here.
- ASSERT_LE((size_t)5, events.size());
// Init value would be set to middleValue if given initValue is not valid.
int value = 50;
- for (size_t i = 0; i < 5; i++) {
+ for (size_t i = 0; i < 10; i++) {
EXPECT_EQ(std::vector<float>({static_cast<float>(value)}), events[i].value.floatValues);
value = (value + 20) % 100;
}
}
TEST_F(FakeVehicleHalValueGeneratorsTest, testJsonFakeValueGenerator) {
- long currentTime = elapsedRealtimeNano();
+ int64_t currentTime = elapsedRealtimeNano();
std::unique_ptr<JsonFakeValueGenerator> generator =
std::make_unique<JsonFakeValueGenerator>(getTestFilePath("prop.json"), 2);
getHub()->registerGenerator(0, std::move(generator));
- // wait for some time.
- std::this_thread::sleep_for(std::chrono::milliseconds(100));
-
std::vector<VehiclePropValue> expectedValues = {
VehiclePropValue{
.areaId = 0,
@@ -296,9 +306,10 @@
expectedValues.push_back(expectedValues[i]);
}
+ waitForEvents(expectedValues.size());
auto events = getEvents();
- long lastEventTime = currentTime;
+ int64_t lastEventTime = currentTime;
for (auto& event : events) {
EXPECT_GT(event.timestamp, lastEventTime);
lastEventTime = event.timestamp;
@@ -313,18 +324,11 @@
std::make_unique<JsonFakeValueGenerator>(getTestFilePath("prop.json"), -1);
getHub()->registerGenerator(0, std::move(generator));
- // wait for some time.
- std::this_thread::sleep_for(std::chrono::milliseconds(100));
-
- auto events = getEvents();
-
- // Send 1 iteration takes 4ms + 1ms interval between iteration, so for 100ms we should get about
- // 20 iteration, which is 80 events.
- EXPECT_GT(events.size(), static_cast<size_t>(50));
+ waitForEvents(40);
}
TEST_F(FakeVehicleHalValueGeneratorsTest, testJsonFakeValueGeneratorUsingRequest) {
- long currentTime = elapsedRealtimeNano();
+ int64_t currentTime = elapsedRealtimeNano();
VehiclePropValue request = {.value = {
.stringValue = getTestFilePath("prop.json"),
@@ -335,9 +339,6 @@
std::make_unique<JsonFakeValueGenerator>(request);
getHub()->registerGenerator(0, std::move(generator));
- // wait for some time.
- std::this_thread::sleep_for(std::chrono::milliseconds(100));
-
std::vector<VehiclePropValue> expectedValues = {
VehiclePropValue{
.areaId = 0,
@@ -366,9 +367,10 @@
expectedValues.push_back(expectedValues[i]);
}
+ waitForEvents(expectedValues.size());
auto events = getEvents();
- long lastEventTime = currentTime;
+ int64_t lastEventTime = currentTime;
for (auto& event : events) {
EXPECT_GT(event.timestamp, lastEventTime);
lastEventTime = event.timestamp;
@@ -388,9 +390,6 @@
std::make_unique<JsonFakeValueGenerator>(request);
getHub()->registerGenerator(0, std::move(generator));
- // wait for some time.
- std::this_thread::sleep_for(std::chrono::milliseconds(100));
-
ASSERT_TRUE(getEvents().empty());
}
@@ -404,12 +403,79 @@
std::make_unique<JsonFakeValueGenerator>(request);
getHub()->registerGenerator(0, std::move(generator));
- // wait for some time.
- std::this_thread::sleep_for(std::chrono::milliseconds(100));
-
ASSERT_TRUE(getEvents().empty());
}
+TEST_F(FakeVehicleHalValueGeneratorsTest, testJsonFakeValueGeneratorDifferentTypes) {
+ std::unique_ptr<JsonFakeValueGenerator> generator = std::make_unique<JsonFakeValueGenerator>(
+ getTestFilePath("prop_different_types.json"), 1);
+ getHub()->registerGenerator(0, std::move(generator));
+
+ std::vector<VehiclePropValue> expectedValues = {
+ VehiclePropValue{
+ .areaId = 0,
+ .value.int32Values = {1},
+ .prop = 287310600,
+ },
+ VehiclePropValue{
+ .areaId = 0,
+ .value.int32Values = {2},
+ .prop = 289408000,
+ },
+ VehiclePropValue{
+ .areaId = 0,
+ .value.floatValues = {3.3},
+ .prop = 291504905,
+ },
+ VehiclePropValue{
+ .areaId = 0,
+ .value.int64Values = {4},
+ .prop = 290457096,
+ },
+ VehiclePropValue{
+ .areaId = 0,
+ .value.stringValue = "test",
+ .prop = 286265094,
+ },
+ VehiclePropValue{
+ .areaId = 0,
+ .value.int32Values = {1, 2},
+ .prop = 289476368,
+ },
+ VehiclePropValue{
+ .areaId = 0,
+ .value =
+ {
+ .int32Values = {1, 2},
+ .int64Values = {3, 4},
+ .floatValues = {5.5, 6.6},
+ .stringValue = "test",
+ },
+ .prop = 299896626,
+ },
+ VehiclePropValue{
+ .areaId = 0,
+ .value =
+ {
+ .int32Values = {1},
+ .floatValues = {1.0},
+ .byteValues = {0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00},
+ },
+ .prop = 299896064,
+ },
+ };
+
+ waitForEvents(expectedValues.size());
+ auto events = getEvents();
+
+ for (auto& event : events) {
+ event.timestamp = 0;
+ }
+
+ EXPECT_EQ(events, expectedValues);
+}
+
} // namespace fake
} // namespace vehicle
} // namespace automotive
diff --git a/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/test/prop_different_types.json b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/test/prop_different_types.json
new file mode 100644
index 0000000..0363ebd
--- /dev/null
+++ b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/test/prop_different_types.json
@@ -0,0 +1,58 @@
+[
+ {
+ "timestamp": 1000000,
+ "areaId": 0,
+ "value": 1,
+ "prop": 287310600
+ },
+ {
+ "timestamp": 1000000,
+ "areaId": 0,
+ "value": 2,
+ "prop": 289408000
+ },
+ {
+ "timestamp": 1000000,
+ "areaId": 0,
+ "value": 3.3,
+ "prop": 291504905
+ },
+ {
+ "timestamp": 1000000,
+ "areaId": 0,
+ "value": 4,
+ "prop": 290457096
+ },
+ {
+ "timestamp": 1000000,
+ "areaId": 0,
+ "value": "test",
+ "prop": 286265094
+ },
+ {
+ "timestamp": 1000000,
+ "areaId": 0,
+ "value": [1, 2],
+ "prop": 289476368
+ },
+ {
+ "timestamp": 1000000,
+ "areaId": 0,
+ "value": {
+ "int32Values": [1, 2],
+ "int64Values": [3, 4],
+ "floatValues": [5.5, 6.6],
+ "stringValue": "test"
+ },
+ "prop": 299896626
+ },
+ {
+ "timestamp": 1000000,
+ "areaId": 0,
+ "value": {
+ "int32Values": [1],
+ "floatValues": [1]
+ },
+ "prop": 299896064
+ }
+]
\ No newline at end of file
diff --git a/automotive/vehicle/aidl/impl/utils/common/test/Android.bp b/automotive/vehicle/aidl/impl/utils/common/test/Android.bp
index 5b41ff4..250b331 100644
--- a/automotive/vehicle/aidl/impl/utils/common/test/Android.bp
+++ b/automotive/vehicle/aidl/impl/utils/common/test/Android.bp
@@ -19,7 +19,7 @@
}
cc_test {
- name: "VehicleHalVehicleUtilsVendorTest",
+ name: "VehicleHalVehicleUtilsTest",
srcs: ["*.cpp"],
vendor: true,
static_libs: [
diff --git a/automotive/vehicle/aidl/impl/vhal/src/ConnectedClient.cpp b/automotive/vehicle/aidl/impl/vhal/src/ConnectedClient.cpp
index 098bfee..830b936 100644
--- a/automotive/vehicle/aidl/impl/vhal/src/ConnectedClient.cpp
+++ b/automotive/vehicle/aidl/impl/vhal/src/ConnectedClient.cpp
@@ -67,7 +67,8 @@
parcelableResults.payloads[0] = result;
if (ScopedAStatus callbackStatus = callCallback(callback, parcelableResults);
!callbackStatus.isOk()) {
- ALOGE("failed to call callback, error: %s, code: %d", callbackStatus.getMessage(),
+ ALOGE("failed to call callback, error: %s, exception: %d, service specific error: %d",
+ callbackStatus.getMessage(), callbackStatus.getExceptionCode(),
callbackStatus.getServiceSpecificError());
}
}
@@ -90,8 +91,9 @@
if (status.isOk()) {
if (ScopedAStatus callbackStatus = callCallback(callback, parcelableResults);
!callbackStatus.isOk()) {
- ALOGE("failed to call callback, error: %s, code: %d", status.getMessage(),
- status.getServiceSpecificError());
+ ALOGE("failed to call callback, error: %s, exception: %d, service specific error: %d",
+ callbackStatus.getMessage(), callbackStatus.getExceptionCode(),
+ callbackStatus.getServiceSpecificError());
}
return;
}
@@ -296,8 +298,10 @@
if (ScopedAStatus callbackStatus =
callback->onPropertyEvent(vehiclePropValues, sharedMemoryFileCount);
!callbackStatus.isOk()) {
- ALOGE("subscribe: failed to call callback, error: %s, code: %d", status.getMessage(),
- status.getServiceSpecificError());
+ ALOGE("subscribe: failed to call callback, error: %s, exception: %d, "
+ "service specific error: %d",
+ callbackStatus.getMessage(), callbackStatus.getExceptionCode(),
+ callbackStatus.getServiceSpecificError());
}
}
diff --git a/automotive/vehicle/aidl/impl/vhal/src/DefaultVehicleHal.cpp b/automotive/vehicle/aidl/impl/vhal/src/DefaultVehicleHal.cpp
index c0a66da..52f3631 100644
--- a/automotive/vehicle/aidl/impl/vhal/src/DefaultVehicleHal.cpp
+++ b/automotive/vehicle/aidl/impl/vhal/src/DefaultVehicleHal.cpp
@@ -218,6 +218,7 @@
}
void DefaultVehicleHal::onBinderDiedWithContext(const AIBinder* clientId) {
+ ALOGD("binder died");
std::scoped_lock<std::mutex> lockGuard(mLock);
mSetValuesClients.erase(clientId);
mGetValuesClients.erase(clientId);
@@ -232,6 +233,7 @@
}
void DefaultVehicleHal::onBinderUnlinkedWithContext(const AIBinder* clientId) {
+ ALOGD("binder unlinked");
std::scoped_lock<std::mutex> lockGuard(mLock);
mOnBinderDiedContexts.erase(clientId);
}
@@ -534,6 +536,10 @@
for (int32_t prop : props) {
if (mConfigsByPropId.find(prop) != mConfigsByPropId.end()) {
configs.push_back(mConfigsByPropId[prop]);
+ } else {
+ return ScopedAStatus::fromServiceSpecificErrorWithMessage(
+ toInt(StatusCode::INVALID_ARG),
+ StringPrintf("no config for property, ID: %" PRId32, prop).c_str());
}
}
return vectorToStableLargeParcelable(std::move(configs), output);
diff --git a/automotive/vehicle/aidl/impl/vhal/test/DefaultVehicleHalTest.cpp b/automotive/vehicle/aidl/impl/vhal/test/DefaultVehicleHalTest.cpp
index 178498b..aafa17e 100644
--- a/automotive/vehicle/aidl/impl/vhal/test/DefaultVehicleHalTest.cpp
+++ b/automotive/vehicle/aidl/impl/vhal/test/DefaultVehicleHalTest.cpp
@@ -514,6 +514,50 @@
ASSERT_EQ(result.value().getObject()->payloads, testConfigs);
}
+TEST_F(DefaultVehicleHalTest, testGetPropConfigs) {
+ auto testConfigs = std::vector<VehiclePropConfig>({
+ VehiclePropConfig{
+ .prop = 1,
+ },
+ VehiclePropConfig{
+ .prop = 2,
+ },
+ });
+
+ auto hardware = std::make_unique<MockVehicleHardware>();
+ hardware->setPropertyConfigs(testConfigs);
+ auto vhal = ndk::SharedRefBase::make<DefaultVehicleHal>(std::move(hardware));
+ std::shared_ptr<IVehicle> client = IVehicle::fromBinder(vhal->asBinder());
+
+ VehiclePropConfigs output;
+ auto status = client->getPropConfigs(std::vector<int32_t>({1, 2}), &output);
+
+ ASSERT_TRUE(status.isOk()) << "getPropConfigs failed: " << status.getMessage();
+ ASSERT_EQ(output.payloads, testConfigs);
+}
+
+TEST_F(DefaultVehicleHalTest, testGetPropConfigsInvalidArg) {
+ auto testConfigs = std::vector<VehiclePropConfig>({
+ VehiclePropConfig{
+ .prop = 1,
+ },
+ VehiclePropConfig{
+ .prop = 2,
+ },
+ });
+
+ auto hardware = std::make_unique<MockVehicleHardware>();
+ hardware->setPropertyConfigs(testConfigs);
+ auto vhal = ndk::SharedRefBase::make<DefaultVehicleHal>(std::move(hardware));
+ std::shared_ptr<IVehicle> client = IVehicle::fromBinder(vhal->asBinder());
+
+ VehiclePropConfigs output;
+ auto status = client->getPropConfigs(std::vector<int32_t>({1, 2, 3}), &output);
+
+ ASSERT_FALSE(status.isOk()) << "getPropConfigs must fail with invalid prop ID";
+ ASSERT_EQ(status.getServiceSpecificError(), toInt(StatusCode::INVALID_ARG));
+}
+
TEST_F(DefaultVehicleHalTest, testGetValuesSmall) {
GetValueRequests requests;
std::vector<GetValueResult> expectedResults;
diff --git a/automotive/vehicle/aidl/impl/vhal/vhal-default-service.xml b/automotive/vehicle/aidl/impl/vhal/vhal-default-service.xml
index 8d237b8..4d587ee 100644
--- a/automotive/vehicle/aidl/impl/vhal/vhal-default-service.xml
+++ b/automotive/vehicle/aidl/impl/vhal/vhal-default-service.xml
@@ -1,11 +1,7 @@
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.automotive.vehicle</name>
- <transport>hwbinder</transport>
<version>1</version>
- <interface>
- <name>IVehicle</name>
- <instance>default</instance>
- </interface>
+ <fqname>IVehicle/default</fqname>
</hal>
</manifest>
diff --git a/wifi/1.6/default/tests/wifi_chip_unit_tests.cpp b/wifi/1.6/default/tests/wifi_chip_unit_tests.cpp
index eaab211..81117c5 100644
--- a/wifi/1.6/default/tests/wifi_chip_unit_tests.cpp
+++ b/wifi/1.6/default/tests/wifi_chip_unit_tests.cpp
@@ -846,13 +846,15 @@
}
TEST_F(WifiChip_MultiIfaceTest, CreateApStartsWithIdx1) {
+ // WifiChip_MultiIfaceTest iface combo: STAx3 + APx1
+ // When the HAL support dual STAs, AP should start with idx 2.
findModeAndConfigureForIfaceType(IfaceConcurrencyType::STA);
// First AP will be slotted to wlan1.
- ASSERT_EQ(createIface(IfaceType::AP), "wlan1");
+ ASSERT_EQ(createIface(IfaceType::AP), "wlan2");
// First STA will be slotted to wlan0.
ASSERT_EQ(createIface(IfaceType::STA), "wlan0");
// All further STA will be slotted to the remaining free indices.
- ASSERT_EQ(createIface(IfaceType::STA), "wlan2");
+ ASSERT_EQ(createIface(IfaceType::STA), "wlan1");
ASSERT_EQ(createIface(IfaceType::STA), "wlan3");
}
} // namespace implementation