Merge "Effect: verify all AIDL IEffect versions are same as IFactory" into main
This commit is contained in:
commit
047484de60
1 changed files with 19 additions and 0 deletions
|
@ -296,6 +296,25 @@ TEST_P(EffectFactoryTest, QueryProcess) {
|
|||
[&](const auto& proc) { return processingSet.find(proc) != processingSet.end(); }));
|
||||
}
|
||||
|
||||
// Make sure all effect instances have same HAL version number as IFactory.
|
||||
TEST_P(EffectFactoryTest, VersionNumberForAllEffectsEqualsToIFactory) {
|
||||
std::vector<Descriptor> descs;
|
||||
EXPECT_IS_OK(mEffectFactory->queryEffects(std::nullopt, std::nullopt, std::nullopt, &descs));
|
||||
EXPECT_NE(descs.size(), 0UL);
|
||||
|
||||
std::vector<std::shared_ptr<IEffect>> effects = createWithDescs(descs);
|
||||
int factoryVersion = 0;
|
||||
EXPECT_IS_OK(mEffectFactory->getInterfaceVersion(&factoryVersion));
|
||||
|
||||
for (const auto& effect : effects) {
|
||||
int effectVersion = 0;
|
||||
EXPECT_NE(nullptr, effect);
|
||||
EXPECT_IS_OK(effect->getInterfaceVersion(&effectVersion));
|
||||
EXPECT_EQ(factoryVersion, effectVersion);
|
||||
}
|
||||
ASSERT_NO_FATAL_FAILURE(destroyEffects(effects));
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(EffectFactoryTest, EffectFactoryTest,
|
||||
testing::ValuesIn(android::getAidlHalInstanceNames(IFactory::descriptor)),
|
||||
android::PrintInstanceNameToString);
|
||||
|
|
Loading…
Reference in a new issue