Merge "Camera: Expect physical results in the last partial notification" into android11-tests-dev
diff --git a/health/2.1/vts/functional/VtsHalHealthV2_1TargetTest.cpp b/health/2.1/vts/functional/VtsHalHealthV2_1TargetTest.cpp
index deb1a29..06c4fea 100644
--- a/health/2.1/vts/functional/VtsHalHealthV2_1TargetTest.cpp
+++ b/health/2.1/vts/functional/VtsHalHealthV2_1TargetTest.cpp
@@ -233,16 +233,17 @@
ASSERT_EQ(Result::SUCCESS, result);
EXPECT_TRUE(IsEnum(value.batteryCapacityLevel)) << " BatteryCapacityLevel";
- EXPECT_GE(value.batteryChargeTimeToFullNowSeconds, 0);
+ EXPECT_GE(value.batteryChargeTimeToFullNowSeconds, -1);
- EXPECT_GE(value.batteryFullChargeDesignCapacityUah, 0)
- << "batteryFullChargeDesignCapacityUah should not be negative";
+ if (value.batteryFullChargeDesignCapacityUah != 0) {
+ EXPECT_GT((long)value.batteryFullChargeDesignCapacityUah, FULL_CHARGE_DESIGN_CAP_MIN)
+ << "batteryFullChargeDesignCapacityUah should be greater than 100 mAh, or 0 if "
+ "unknown";
- EXPECT_GT((long)value.batteryFullChargeDesignCapacityUah, FULL_CHARGE_DESIGN_CAP_MIN)
- << "batteryFullChargeDesignCapacityUah should be greater than 100 mAh";
-
- EXPECT_LT((long)value.batteryFullChargeDesignCapacityUah, FULL_CHARGE_DESIGN_CAP_MAX)
- << "batteryFullChargeDesignCapacityUah should be less than 100,000 mAh";
+ EXPECT_LT((long)value.batteryFullChargeDesignCapacityUah, FULL_CHARGE_DESIGN_CAP_MAX)
+ << "batteryFullChargeDesignCapacityUah should be less than 100,000 mAh, or 0 "
+ "if unknown";
+ }
})));
}
diff --git a/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp b/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp
index d669667..f196928 100644
--- a/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp
+++ b/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp
@@ -4564,7 +4564,7 @@
* that aborting the operations clears the operations.
*
*/
-TEST_P(ClearOperationsTest, TooManyOperations) {
+TEST_P(ClearOperationsTest, DISABLED_TooManyOperations) {
ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
.Authorization(TAG_NO_AUTH_REQUIRED)
.RsaEncryptionKey(2048, 65537)
diff --git a/wifi/hostapd/1.0/vts/functional/hostapd_hidl_test.cpp b/wifi/hostapd/1.0/vts/functional/hostapd_hidl_test.cpp
index 21d2064..2b46058 100644
--- a/wifi/hostapd/1.0/vts/functional/hostapd_hidl_test.cpp
+++ b/wifi/hostapd/1.0/vts/functional/hostapd_hidl_test.cpp
@@ -145,8 +145,8 @@
stopHostapd(wifi_instance_name_);
startHostapdAndWaitForHidlService(wifi_instance_name_,
hostapd_instance_name_);
- sp<IHostapd> hostapd = IHostapd::getService(hostapd_instance_name_);
- EXPECT_NE(nullptr, hostapd.get());
+ hostapd_ = IHostapd::getService(hostapd_instance_name_);
+ EXPECT_NE(nullptr, hostapd_.get());
}
/**
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp
index da3996b..be6aad9 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp
@@ -52,6 +52,10 @@
// Helper function to initialize the driver and firmware to STA mode
// using the vendor HAL HIDL interface.
void initilializeDriverAndFirmware(const std::string& wifi_instance_name) {
+ // Skip if wifi instance is not set.
+ if (wifi_instance_name == "") {
+ return;
+ }
if (getWifi(wifi_instance_name) != nullptr) {
sp<IWifiChip> wifi_chip = getWifiChip(wifi_instance_name);
ChipModeId mode_id;
@@ -65,6 +69,10 @@
// Helper function to deinitialize the driver and firmware
// using the vendor HAL HIDL interface.
void deInitilializeDriverAndFirmware(const std::string& wifi_instance_name) {
+ // Skip if wifi instance is not set.
+ if (wifi_instance_name == "") {
+ return;
+ }
if (getWifi(wifi_instance_name) != nullptr) {
stopWifi(wifi_instance_name);
} else {
diff --git a/wifi/supplicant/1.1/vts/functional/supplicant_hidl_test.cpp b/wifi/supplicant/1.1/vts/functional/supplicant_hidl_test.cpp
index 4d952e4..0b56957 100644
--- a/wifi/supplicant/1.1/vts/functional/supplicant_hidl_test.cpp
+++ b/wifi/supplicant/1.1/vts/functional/supplicant_hidl_test.cpp
@@ -33,6 +33,7 @@
using ::android::hardware::wifi::supplicant::V1_0::SupplicantStatusCode;
using ::android::hardware::wifi::supplicant::V1_0::IfaceType;
using ::android::hardware::wifi::supplicant::V1_1::ISupplicant;
+using ::android::hardware::wifi::V1_0::IWifi;
using ::android::sp;
class SupplicantHidlTest : public SupplicantHidlTestBaseV1_1 {
@@ -139,20 +140,11 @@
*/
TEST_P(SupplicantHidlTest, Terminate) { supplicant_->terminate(); }
-static std::vector<std::string> get_wifi_instances() {
- std::vector<std::string> instances =
- android::hardware::getAllHalInstanceNames(
- android::hardware::wifi::V1_0::IWifi::descriptor);
- // Also test when wifi instance is not set.
- instances.push_back("");
-
- return instances;
-}
-
INSTANTIATE_TEST_CASE_P(
PerInstance, SupplicantHidlTest,
testing::Combine(
- testing::ValuesIn(get_wifi_instances()),
+ testing::ValuesIn(
+ android::hardware::getAllHalInstanceNames(IWifi::descriptor)),
testing::ValuesIn(android::hardware::getAllHalInstanceNames(
android::hardware::wifi::supplicant::V1_1::ISupplicant::
descriptor))),