Add fix vts fail when configureMonitorEvent

[Description]
VTS StartFilterInDemux failed when configureMonitorEvent is called

[Root Cause]
Scrambling status event is not notified when configureMonitorEvent is called
  so test case failed.

[Solution]
Scrambling status event is not notified because of no input data.
Add input setting and check event notified or not after data is input.

Test: Manual
bug: 288193021

Change-Id: If5875d064fd67b72f8299205a5e35b1a2bd61934
This commit is contained in:
mike liao 2023-06-26 14:12:48 +08:00 committed by Henry Fang
parent acd066c614
commit def4652792
3 changed files with 17 additions and 6 deletions

View file

@ -311,12 +311,6 @@ AssertionResult FilterTests::configureMonitorEvent(uint64_t filterId, uint32_t m
android::hardware::tv::tuner::V1_1::IFilter::castFrom(mFilters[filterId]);
if (filter_v1_1 != NULL) {
status = filter_v1_1->configureMonitorEvent(monitorEventTypes);
if (monitorEventTypes & DemuxFilterMonitorEventType::SCRAMBLING_STATUS) {
mFilterCallbacks[filterId]->testFilterScramblingEvent();
}
if (monitorEventTypes & DemuxFilterMonitorEventType::IP_CID_CHANGE) {
mFilterCallbacks[filterId]->testFilterIpCidEvent();
}
} else {
ALOGW("[vts] Can't cast IFilter into v1_1.");
return failure();
@ -324,6 +318,17 @@ AssertionResult FilterTests::configureMonitorEvent(uint64_t filterId, uint32_t m
return AssertionResult(status == Result::SUCCESS);
}
AssertionResult FilterTests::testMonitorEvent(uint64_t filterId, uint32_t monitorEventTypes) {
EXPECT_TRUE(mFilterCallbacks[filterId]) << "Test with getNewlyOpenedFilterId first.";
if (monitorEventTypes & DemuxFilterMonitorEventType::SCRAMBLING_STATUS) {
mFilterCallbacks[filterId]->testFilterScramblingEvent();
}
if (monitorEventTypes & DemuxFilterMonitorEventType::IP_CID_CHANGE) {
mFilterCallbacks[filterId]->testFilterIpCidEvent();
}
return AssertionResult(true);
}
AssertionResult FilterTests::startIdTest(uint64_t filterId) {
EXPECT_TRUE(mFilterCallbacks[filterId]) << "Test with getNewlyOpenedFilterId first.";
mFilterCallbacks[filterId]->testStartIdAfterReconfigure();

View file

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

View file

@ -48,6 +48,11 @@ void TunerFilterHidlTest::configSingleFilterInDemuxTest(FilterConfig1_1 filterCo
}
ASSERT_TRUE(mFilterTests.getFilterMQDescriptor(filterId, filterConf.config1_0.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());