diff options
author | Peiyong Lin <lpy@google.com> | 2023-06-14 18:12:39 +0000 |
---|---|---|
committer | Peiyong Lin <lpy@google.com> | 2023-06-14 18:12:39 +0000 |
commit | 9fb755319bcca29be1470135c86da05290af3c29 (patch) | |
tree | a2678475ca0d9e8abbb770b19376f36171128c6f | |
parent | 51d7c99586acbdd7e274943d96dfd916c08ae703 (diff) |
Avoid skipping test if it's supported.
Previously the test will be skipped regardless whether setThreads is
supported, this patch moves the check below and check the returned
status code to determine whether the test should be skipped.
Bug: b/287282833
Test: atest VtsHalPowerTargetTest
Change-Id: I9ce6b4ead5e245478247903a75922ece74f38ee7
-rw-r--r-- | power/aidl/vts/VtsHalPowerTargetTest.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/power/aidl/vts/VtsHalPowerTargetTest.cpp b/power/aidl/vts/VtsHalPowerTargetTest.cpp index d14e7b61a6..c2216f8cf6 100644 --- a/power/aidl/vts/VtsHalPowerTargetTest.cpp +++ b/power/aidl/vts/VtsHalPowerTargetTest.cpp @@ -255,11 +255,10 @@ TEST_P(PowerAidl, setThreads) { } ASSERT_TRUE(status.isOk()); - if (mApiLevel < kCompatibilityMatrix8ApiLevel) { + status = session->setThreads(kEmptyTids); + if (mApiLevel < kCompatibilityMatrix8ApiLevel && isUnknownOrUnsupported(status)) { GTEST_SKIP() << "DEVICE not launching with Android 14 and beyond."; } - - status = session->setThreads(kEmptyTids); ASSERT_FALSE(status.isOk()); ASSERT_EQ(EX_ILLEGAL_ARGUMENT, status.getExceptionCode()); |