Merge "Add fix vts fail when configureMonitorEvent" into android14-tests-dev am: 7bb2ce9795

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2807334

Change-Id: I6cf77e7655b3ee02514743610be2b285cf7bde35
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Henry Fang 2023-11-01 01:03:26 +00:00 committed by Automerger Merge Worker
commit 0804e9f8b2
3 changed files with 12 additions and 1 deletions

View file

@ -305,13 +305,18 @@ AssertionResult FilterTests::configureMonitorEvent(int64_t filterId, int32_t mon
ndk::ScopedAStatus status;
status = mFilters[filterId]->configureMonitorEvent(monitorEventTypes);
return AssertionResult(status.isOk());
}
AssertionResult FilterTests::testMonitorEvent(uint64_t filterId, uint32_t monitorEventTypes) {
EXPECT_TRUE(mFilterCallbacks[filterId]) << "Test with getNewlyOpenedFilterId first.";
if (monitorEventTypes & static_cast<int32_t>(DemuxFilterMonitorEventType::SCRAMBLING_STATUS)) {
mFilterCallbacks[filterId]->testFilterScramblingEvent();
}
if (monitorEventTypes & static_cast<int32_t>(DemuxFilterMonitorEventType::IP_CID_CHANGE)) {
mFilterCallbacks[filterId]->testFilterIpCidEvent();
}
return AssertionResult(status.isOk());
return AssertionResult(true);
}
AssertionResult FilterTests::startIdTest(int64_t filterId) {

View file

@ -124,6 +124,7 @@ class FilterTests {
AssertionResult configAvFilterStreamType(AvStreamType type, int64_t filterId);
AssertionResult configIpFilterCid(int32_t ipCid, int64_t filterId);
AssertionResult configureMonitorEvent(int64_t filterId, int32_t monitorEventTypes);
AssertionResult testMonitorEvent(uint64_t filterId, uint32_t monitorEventTypes);
AssertionResult getFilterMQDescriptor(int64_t filterId, bool getMqDesc);
AssertionResult startFilter(int64_t filterId);
AssertionResult stopFilter(int64_t filterId);

View file

@ -60,6 +60,11 @@ void TunerFilterAidlTest::configSingleFilterInDemuxTest(FilterConfig filterConf,
}
ASSERT_TRUE(mFilterTests.getFilterMQDescriptor(filterId, filterConf.getMqDesc));
ASSERT_TRUE(mFilterTests.startFilter(filterId));
ASSERT_TRUE(mFrontendTests.tuneFrontend(frontendConf, true /*testWithDemux*/));
if (filterConf.monitorEventTypes > 0) {
ASSERT_TRUE(mFilterTests.testMonitorEvent(filterId, filterConf.monitorEventTypes));
}
ASSERT_TRUE(mFrontendTests.stopTuneFrontend(true /*testWithDemux*/));
ASSERT_TRUE(mFilterTests.stopFilter(filterId));
ASSERT_TRUE(mFilterTests.closeFilter(filterId));
ASSERT_TRUE(mDemuxTests.closeDemux());