Merge "Update VTS test for the function hardwareReset()" into main am: 9be18fe082

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

Change-Id: I650ce485fca4ec122ff74ec7d80186664adcbc30
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Zhanglong Xia 2024-01-17 07:11:28 +00:00 committed by Automerger Merge Worker
commit e6d32f96ac

View file

@ -87,11 +87,16 @@ TEST_P(ThreadNetworkAidl, Close) {
}
TEST_P(ThreadNetworkAidl, Reset) {
ndk::ScopedAStatus status;
std::shared_ptr<ThreadChipCallback> callback =
ndk::SharedRefBase::make<ThreadChipCallback>([](auto /* data */) {});
EXPECT_TRUE(thread_chip->open(callback).isOk());
EXPECT_TRUE(thread_chip->hardwareReset().isOk());
status = thread_chip->hardwareReset();
EXPECT_TRUE(status.isOk() || (status.getExceptionCode() == EX_UNSUPPORTED_OPERATION));
if (status.getExceptionCode() == EX_UNSUPPORTED_OPERATION) {
GTEST_SKIP() << "Hardware reset is not supported";
}
}
TEST_P(ThreadNetworkAidl, SendSpinelFrame) {