Commit graph

539 commits

Author SHA1 Message Date
Treehugger Robot
ca384e0e4c Merge "Remove unnecessary type and dup for fd" am: 5428551ba9 am: f8f2391f8e am: 667ef2c4c7 am: 6f25e95bc8 am: 1d18ec8d96
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12346313

Change-Id: I884d9adcb9d8d5ded5beed8d39a38bd4a2859a27
2020-08-26 02:09:09 +00:00
Treehugger Robot
1d18ec8d96 Merge "Remove unnecessary type and dup for fd" am: 5428551ba9 am: f8f2391f8e am: 667ef2c4c7 am: 6f25e95bc8
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12346313

Change-Id: Ib984a5a049ff3cabbf7ae7b03b5a40ceab4d973c
2020-08-26 00:52:10 +00:00
Treehugger Robot
667ef2c4c7 Merge "Remove unnecessary type and dup for fd" am: 5428551ba9 am: f8f2391f8e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1374049

Change-Id: I4151bc9aa650bbdb5545875d14760455efe62fe7
2020-08-25 22:04:45 +00:00
TreeHugger Robot
2f9690c12a Merge "Fix double release of ScopedWakelock" into rvc-qpr-dev am: 74896bed49 am: 81259af583
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12351750

Change-Id: I9791bd07acc6c12fef71b2e14e05249f70ab7e26
2020-08-18 05:00:15 +00:00
TreeHugger Robot
81259af583 Merge "Fix double release of ScopedWakelock" into rvc-qpr-dev am: 74896bed49
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12351750

Change-Id: I2478bae593f72eec1f9722675226c39712aa306a
2020-08-12 14:40:42 +00:00
Anthony Stange
55a4f59fb8 Fix double release of ScopedWakelock
Today, when a ScopedWakelock is moved, the default move constructor
doesn't unlock the old wakelock instance. This results in the moved
ScopedWakelock instance decrementing the wakelock ref count which leaves
the multi-HAL out of sync from the sensor service.

Fix this by adding a custom move constructor / operator to ensure old
state is cleared on the moved instance.

Bug: 163468874
Test: Load multi-HAL and verify that it properly waits to release the
wakelock until the sensor service notifies that it has a lock held.
Test: Run unit tests

Change-Id: Ifd5a3c7596f78d7a756c4472f30efb625d670791
2020-08-11 21:43:09 +00:00
Dan Shi
ff985a85a8 Suppress gtest error for tests without any instance
Bug: 162052785
Test: m -j vts
Change-Id: I58bc808a82b2128bb8774f762f9b9fcecd2614fb
2020-07-29 09:46:36 -07:00
Dan Shi
9eaab747fe Suppress gtest error for tests without any instance am: ba4d532fee am: 73122cd284 am: e5c9b5e722 am: 1a52c0eb25 am: 1a3e0f86eb
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1374050

Change-Id: I6ddea2dcb636e3ba67ad11d53b9fe12c51314c7a
2020-07-29 06:36:31 +00:00
Dan Shi
e5c9b5e722 Suppress gtest error for tests without any instance am: ba4d532fee am: 73122cd284
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1374050

Change-Id: Ie5e956d4613f5e947c36ba4f1048f0c3aa8944ba
2020-07-29 05:45:58 +00:00
Dan Shi
ba4d532fee Suppress gtest error for tests without any instance
Bug: 162052785
Test: m -j vts
Change-Id: I8c1a48e6fbd7c8161137902b5332911fa0d7b8b3
2020-07-28 15:12:32 -07:00
Jooyung Han
d610435ac4 update hidl .bp
HIDL libs are not necessarily part of VNDK now. Because some are
used by VNDK libs, they are still VNDK. But rest are now just
vendor-available.

.hidl_for_test files are also removed because they are used to exclude
test-purpose hidl libs from VNDK libs.

Instead, .hidl_for_system_ext files are added to tests/lazy to
distinguish them from others which are installed /system.

Bug: 143933769
Test: update-makefiles.sh && m com.android.vndk.current
Merged-In: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
Change-Id: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
(cherry picked from commit b0907a6bb8)
2020-07-07 16:22:36 +09:00
Jooyung Han
d18cba85fe update hidl .bp
HIDL libs are not necessarily part of VNDK now. Because some are
used by VNDK libs, they are still VNDK. But rest are now just
vendor-available.

.hidl_for_test files are also removed because they are used to exclude
test-purpose hidl libs from VNDK libs.

Instead, .hidl_for_system_ext files are added to tests/lazy to
distinguish them from others which are installed /system.

Bug: 143933769
Test: update-makefiles.sh && m com.android.vndk.current
Merged-In: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
Change-Id: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
(cherry picked from commit b0907a6bb8)
2020-07-02 12:26:37 +09:00
Jooyung Han
b0907a6bb8 update hidl .bp
HIDL libs are not necessarily part of VNDK now. Because some are
used by VNDK libs, they are still VNDK. But rest are now just
vendor-available.

.hidl_for_test files are also removed because they are used to exclude
test-purpose hidl libs from VNDK libs.

Instead, .hidl_for_system_ext files are added to tests/lazy to
distinguish them from others which are installed /system.

Bug: 143933769
Test: update-makefiles.sh && m com.android.vndk.current
Change-Id: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
2020-07-02 09:18:17 +09:00
Brian Duddie
069d6dd8db Add support for IAllocator/IMapper v4.0 in sensors VTS am: 97f1a3aeaa am: b3cda9ef6d am: f6c5f764a4 am: 2492bd3251
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11744993

Change-Id: I6d81ed6a3326593ce1f3ac564fccec9a1caae96e
2020-06-05 18:25:16 +00:00
Brian Duddie
f6c5f764a4 Add support for IAllocator/IMapper v4.0 in sensors VTS am: 97f1a3aeaa am: b3cda9ef6d
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11744993

Change-Id: I91d85a478ce628fc80232d3caa6bf47a7217ff55
2020-06-05 14:52:17 +00:00
Brian Duddie
35a1cb8e00 Add support for IAllocator/IMapper v4.0 in sensors VTS am: 97f1a3aeaa
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11744993

Change-Id: Ia66309472684ff6552884ddd2ef0de8d1bd9a1bd
2020-06-05 14:38:42 +00:00
Brian Duddie
97f1a3aeaa Add support for IAllocator/IMapper v4.0 in sensors VTS
Also, pull in the static libs associated with the graphics HALs to
VtsHalSensorsTargetTestUtils so that the VTS binaries that depend on it
don't need to all pull them in themselves.

Fixes: 158018963
Test: VtsHalSensorsV2_0TargetTest on a device supporting the v4.0 HALs
Change-Id: Idc47ffb8cacd1ac84d45b979cd45fe630b6808f6
2020-06-04 16:33:09 -07:00
Dan Shi
268dab27f8 Merge "Use StopServicesSetup to stop/start framework." into rvc-dev am: e8f9e0959f am: f2956479e3 am: 603e12a745 am: 042001e278
Change-Id: Ice28fd6e459934e478ceef5d18cefd035f1b0f4b
2020-05-13 23:51:09 +00:00
Dan Shi
f2956479e3 Merge "Use StopServicesSetup to stop/start framework." into rvc-dev am: e8f9e0959f
Change-Id: I9b0e7c3c76a33526bd90730b1f775e29134d909e
2020-05-13 23:12:44 +00:00
Dan Shi
e8f9e0959f Merge "Use StopServicesSetup to stop/start framework." into rvc-dev 2020-05-13 22:52:20 +00:00
TreeHugger Robot
2e59c22326 Merge "Use StopServicesSetup to stop/start framework." into rvc-dev 2020-05-13 21:44:19 +00:00
Dan Shi
2d11037a0b Use StopServicesSetup to stop/start framework.
Bug: 155774142
Test: none
Change-Id: I3dfec18df478b0a4ae16c454d110e5c05f33cbca
2020-05-13 14:03:24 -07:00
Dan Shi
1a380f7b5b Use StopServicesSetup to stop/start framework.
Bug: 155774142
Test: none
Exempt-From-Owner-Approval: This CL replaces target preparer, shouldn't
change test behavior.

Change-Id: I83cffadfff15e6352a69641c3227efb63e7a34e4
Merged-In: I83cffadfff15e6352a69641c3227efb63e7a34e4
2020-05-13 14:02:04 -07:00
Dan Shi
ea682bae05 Use StopServicesSetup to stop/start framework. am: 8a648312f8 am: 95d430d6c8 am: 3b6534e36d am: f1e1ac586d am: 5ed212e3e4
Change-Id: I073f9338b844db98c920fba9b6cf312982c49ad1
2020-05-13 18:56:14 +00:00
Dan Shi
3b6534e36d Use StopServicesSetup to stop/start framework. am: 8a648312f8 am: 95d430d6c8
Change-Id: I96a02ab530d4efd386c5f835bbb932e62ea8ea7d
2020-05-13 18:19:37 +00:00
Dan Shi
95d430d6c8 Use StopServicesSetup to stop/start framework. am: 8a648312f8
Change-Id: I0a3f67e848b2452b1919ae0e26d69fc1a9a9ce15
2020-05-13 18:05:52 +00:00
Dan Shi
8a648312f8 Use StopServicesSetup to stop/start framework.
Bug: 155774142
Test: none
Exempt-From-Owner-Approval: This CL replaces target preparer, shouldn't
change test behavior.

Change-Id: I83cffadfff15e6352a69641c3227efb63e7a34e4
2020-05-12 14:07:30 -07:00
Treehugger Robot
552990ed42 Merge "Rename vts-core to vts" 2020-05-08 01:44:18 +00:00
Dan Shi
fcced28d93 Rename vts-core to vts
Bug: 151896491
Test: local build
Exempt-From-Owner-Approval: This CL update suite name vts-core to vts as
the suite name is updated. This CL won't change test logic or behavior.

Merged-In: I562b4dc50765e953800a814a8fd84a01c1b9352b
Change-Id: If871035f66631869d1082a557e2639a2766cd1de
2020-05-07 16:25:29 -07:00
Ahmad Rahmati
048b243436 Merge "Add SCOPED_TRACE to VTS tests that loop over all sensors" into rvc-dev am: 91c5deafc3 am: df10e7f247 am: 3b57b2cd1f am: 3a8fcbbff2
Change-Id: Ia32ecfbfe77069235d09c9e56e42d51ee31126ea
2020-05-07 23:07:39 +00:00
Ahmad Rahmati
3b57b2cd1f Merge "Add SCOPED_TRACE to VTS tests that loop over all sensors" into rvc-dev am: 91c5deafc3 am: df10e7f247
Change-Id: Ie497bbc585ba3718d80f05a2c2e5894782291821
2020-05-07 22:27:24 +00:00
Ahmad Rahmati
388e2efecc Merge "Add SCOPED_TRACE to VTS tests that loop over all sensors" into rvc-dev am: 91c5deafc3
Change-Id: I41aeba2fa41e10dad5ad05b6b87b89ea048bf58f
2020-05-07 22:16:17 +00:00
Treehugger Robot
1f65d20a39 Merge "sensors:2.0:vts fix functional test for typeAsString field" am: e3fc570d6d
Change-Id: Iec84bed4fe462001a577b382e4934b59b765017b
2020-05-07 16:50:25 +00:00
Treehugger Robot
e3fc570d6d Merge "sensors:2.0:vts fix functional test for typeAsString field" 2020-05-07 16:34:31 +00:00
Ahmad Rahmati
8276a3bb02 Add SCOPED_TRACE to VTS tests that loop over all sensors
SCOPED_TRACE enables the error message contains enough detail to
easily narrow down the root cause

Bug: 154357354
Test: atest VtsHalSensorsV2_0Target VtsHalSensorsV2_1Target
Change-Id: Id6dbbe8bd8617776efec383d5276e9e12006f27d
2020-05-07 02:45:30 +00:00
Stan Rokita
f26ba8c59f Search for subhal .so files in additional directories am: b42bde95cb
Change-Id: I1fb0ce977406e07a26278a2be0e2380ee7d677f4
2020-05-06 23:00:18 +00:00
Stan Rokita
b42bde95cb Search for subhal .so files in additional directories
Fixes: 154634207
Test: Load onto flame and confirm that subhal .so
android.hardware.sensors@2.X-fakesubhal-config3.so loads when it is
living in the /vendor/lib64/hw directory using
adb shell lshal debug android.hardware.sensors@2.0::ISensors/default

Change-Id: I8a676b97f6f6992e8937ecf31c3b7af06e676ebb
Merged-In: I8a676b97f6f6992e8937ecf31c3b7af06e676ebb
2020-05-06 15:02:42 -07:00
TreeHugger Robot
a55566d5e3 Merge "Fix Sensors VTS asserts for sensor type strings" into rvc-dev am: abc7986d1a am: 89519e760d am: 8feb1f8e87 am: 13006f8f60
Change-Id: Ia90d8cb90270912a180bdffb29053aae3f2da58b
2020-05-05 16:12:29 +00:00
Denis Ciocca
8ab752617f sensors:2.0:vts fix functional test for typeAsString field
For sensors of known type defined in SensorType (value <
DEVICE_PRIVATE_BASE), typeAsString field can be an empty string since
framework overrides it anyways.
The empty string test should fails only if type is >=
DEVICE_PRIVATE_BASE.
The matching type with typeAsString test is instead executed only if
the string is not empty (if it's not an empty string let's check that
at least is set to the right value).

Bug: 155514483
Test: atest VtsHalSensorsV2_0TargetTest
Signed-off-by: Denis Ciocca <denis.ciocca@gmail.com>
Merged-In: Ib5f8fd513313670e88c2b973c1ff724658914eb2
Change-Id: I4267ff6a158a571ff43122bdb7a38c9fa38f5900
2020-05-05 16:10:46 +00:00
TreeHugger Robot
8feb1f8e87 Merge "Fix Sensors VTS asserts for sensor type strings" into rvc-dev am: abc7986d1a am: 89519e760d
Change-Id: I1759a855ba720db4018ba4fdf9c40a371c319d56
2020-05-05 15:37:03 +00:00
TreeHugger Robot
f4ebf94103 Merge "Fix Sensors VTS asserts for sensor type strings" into rvc-dev am: abc7986d1a
Change-Id: Iaf3b7fd1de42a5e5665a5bd74bb9f49d7d13c2ec
2020-05-05 15:24:41 +00:00
Anthony Stange
908e4479dd Fix Sensors VTS asserts for sensor type strings
Private sensors are the only sensor types that must define a type
string. For public sensors, a type string can be left empty as it will
be overridden by the sensors frameork.

Bug: 155514483
Test: atest VtsHalSensorsV2_0Target
Change-Id: Ib5f8fd513313670e88c2b973c1ff724658914eb2
2020-05-04 14:54:19 -04:00
TreeHugger Robot
a470b95e39 Merge "Search for subhal .so files in additional directories" into rvc-dev am: 358db3b106 am: 08da8ed673 am: 6524d1e263 am: 2d54506196
Change-Id: Ifa6b0ac78a1ef9707e91c25bb539042c67a39f2f
2020-05-02 03:37:42 +00:00
TreeHugger Robot
6524d1e263 Merge "Search for subhal .so files in additional directories" into rvc-dev am: 358db3b106 am: 08da8ed673
Change-Id: I05c7361e983e95c6e2e6543b85a4af8d53766a93
2020-05-02 03:09:23 +00:00
TreeHugger Robot
da0ae1cfe4 Merge "Search for subhal .so files in additional directories" into rvc-dev am: 358db3b106
Change-Id: Id04399150e05bcc198ed8f9ccee9448e4a4a1581
2020-05-02 02:48:41 +00:00
Stan Rokita
c786dfc5b1 Search for subhal .so files in additional directories
Fixes: 154634207
Test: Load onto flame and confirm that subhal .so
android.hardware.sensors@2.X-fakesubhal-config3.so loads when it is
living in the /vendor/lib64/hw directory using
adb shell lshal debug android.hardware.sensors@2.0::ISensors/default

Change-Id: I8a676b97f6f6992e8937ecf31c3b7af06e676ebb
2020-05-02 00:03:27 +00:00
Anthony Stange
5c0072bdbb V2: Update tests for multihal to test HAL 2.1 am: 7a21c53268 am: 2dc496d9c2 am: e5552f1e47 am: ed6b30c495
Change-Id: Ie45294c0a5cd27cce799acad7283ee3444069f97
2020-04-30 22:42:27 +00:00
Anthony Stange
8f86dd1907 V2: Create Multi-HAL 2.1 service am: 199b5ff96a am: 2708e59bc3 am: 296f9e3d13 am: 47a2eb3b20
Change-Id: Ib58757d86120272059c4f7e7828ca508bb2efaf1
2020-04-30 22:42:25 +00:00
Anthony Stange
dee2a35507 V2: Set up Multi-HAL for Sensors HAL 2.1 am: 33acf9fb3a am: cca52d44da am: 488b752161 am: 3831c8f436
Change-Id: Ifc5c49249ac267aebe109562300d97ce639a1db9
2020-04-30 22:42:20 +00:00
Anthony Stange
e5552f1e47 V2: Update tests for multihal to test HAL 2.1 am: 7a21c53268 am: 2dc496d9c2
Change-Id: I307087c94c71a819375fc20c134c47f2fc9d03ce
2020-04-30 22:07:51 +00:00