Commit graph

3698 commits

Author SHA1 Message Date
Scott Randolph
8997880087 Use explicit .c_str() for hidl_string
hidl_string no longer will provide an implicit cast to const char* as it
interfers with other expected behaviors of the class.  It now emulated
std::string in requiring a call to .c_str() to get the same behavior.

Bug:  36532780
Test:  Build the tree
Change-Id: I265590c7c18f425e44863df062a56b67519a932a
2017-04-04 10:53:26 -07:00
TreeHugger Robot
da0bc84ec6 Merge "nfc: vts: Correct parameters going for CoreInitialized" into oc-dev 2017-04-04 03:06:50 +00:00
TreeHugger Robot
cff4cf89d8 Merge "Remove dependency to libbinder in VHAL" into oc-dev 2017-04-04 01:03:53 +00:00
TreeHugger Robot
b04aa8907a Merge "Test for getHashChain() in IBase." into oc-dev 2017-04-04 01:00:39 +00:00
Ruchi Kandoi
8a7ac5d399 nfc: vts: Correct parameters going for CoreInitialized
Core Initialized with parameters 1-3 leads the device into recovery
mode. Which causes the test to fail.

Bug: 36751759
Change-Id: If2b91237a445ce050b7da6be5f97dd8eea30046e
Merged-In: I1375546cc66c147f26c315a042ca0afb49f0ce06
Test: Test passes
2017-04-04 00:48:43 +00:00
TreeHugger Robot
2fc995846c Merge "Camera: add interface to evict obsolete buffer caches" into oc-dev 2017-04-04 00:31:01 +00:00
TreeHugger Robot
2b4e97be4d Merge "add components necessary for bootanim to animation class" into oc-dev 2017-04-03 23:51:42 +00:00
Pavel Maltsev
270aeae9f4 Remove dependency to libbinder in VHAL
Also, removed per property ACL as it was based on client UID

Test: mm -j ; verified Car Service works

Bug: b/36649684
Change-Id: I7625a013dda8e3ebce5b86a253a8c1befe267c11
(cherry picked from commit 72aebeb3ec)
2017-04-03 23:02:22 +00:00
Eino-Ville Talvala
4cea813a35 Merge "camera: Map between legacy gralloc0 usage, and HIDL gralloc1 usages" into oc-dev 2017-04-03 22:03:15 +00:00
Yin-Chia Yeh
28eebbfc41 Camera: add interface to evict obsolete buffer caches
Test: fix CTS ReprocessCaptureTest
Bug: 34461678
Change-Id: Icde654b0c8423c31d7d39d180913ffa374e7de3c
2017-04-03 14:41:23 -07:00
Yifan Hong
80471b04b0 Test for getHashChain() in IBase.
Each interface has a getHashChain() method that
returns the hash of all .hal files from the rtti
of the interface up to IBase.

Test: hidl_test

Bug: 36602587
Change-Id: I53a79ba69edd109f169c37dbe0fd10e302eb929c
2017-04-03 12:23:21 -07:00
TreeHugger Robot
f23752f82e Merge "Camera: add HAL1 recording batching support" into oc-dev 2017-04-03 07:34:07 +00:00
Yuexi Ma
9f7cd8e078 Updates bluetooth hal test to use VtsHalHidlTargetTestBase v3
Test: pass
Change-Id: Ia5237a27800010174f2b23a3a4b1157f1c48781f
(cherry picked from commit b8012eb907)
2017-04-02 16:53:43 -07:00
Yuexi Ma
859f18bec0 NFC VTS test use VtsHalHidlCallbackBase for callback wait and notify
VtsHalNfcV1_0TargetTest uses VtsHalHidlCallbackBase.
Callback class extends VtsHalHidlCallbackBase and use waitForCallback and notifyFromCallback

The original NFC test contains the following use cases:
  * Callback notify happens before wait
  * Multiple waiting in serial
The modified version added the following use cases:
  * Wait for specific callback function
  * Passing callback arg data along wait and notify functions

Bug: 36036059
Test: make VtsHalNfcV1_0TargetTest, adb push & adb shell
Change-Id: Ic6668a18254661d07c4ff37309cd96ea5f786d29
(cherry picked from commit bfefc5ef10)
2017-04-02 16:53:39 -07:00
Yuexi Ma
b8810a9e5d Bluetooth VTS test use VtsHalHidlCallbackBase for callback wait and notify
VtsHalBluetoothV1_0TargetTest uses VtsHalHidlCallbackBase.
Callback class extends VtsHalHidlCallbackBase and use waitForCallback, notifyFromCallback, and setWaitTimeout

The original Bluetooth test contains the following use cases:
  * Wait for specific callback
  * Set timeout for specific callback waiting
The modified version supports the above use cases.

Bug: 36036059
Test: Test pass locally
Change-Id: I961baaf7f1b09fa9c134629cc7280565a2664ed5
(cherry picked from commit 51d023c48e)
2017-04-02 06:22:45 +00:00
Yin-Chia Yeh
1ba83a9a28 Camera: add HAL1 recording batching support
Test: Angler HAL1 + set mBatchSize to 4 locally
Bug: 35997432
Change-Id: I6baf112f9da56534ae81008bad818fba1e76a294
2017-04-01 13:12:49 -07:00
TreeHugger Robot
3368520bbc Merge "Change sytle of radio and sap tests to clang google" into oc-dev 2017-04-01 02:22:27 +00:00
TreeHugger Robot
7c09a31639 Merge "Update DRM makefile." into oc-dev 2017-04-01 00:54:07 +00:00
Scott Randolph
35145b31bd Merge "Add VTS tests for EVS HAL" into oc-dev 2017-04-01 00:49:20 +00:00
Yuexi Ma
87bde3312a Change sytle of radio and sap tests to clang google
Test: make VtsHalRadioV1_0TargetTest, make VtsHalSapV1_0TargetTest
Change-Id: Ie13efe0d049ade7839881c14ed2904d8acd99b93
(cherry picked from commit bb96133731)
2017-04-01 00:18:32 +00:00
Keun-young Park
a232a45b59 add components necessary for bootanim to animation class
- necessary for running shutdown animation:
 android.hardware.graphics.composer
 android.hardware.graphics.allocator
 android.hardware.configstore

bug: 36526187
Test: many reboots
Change-Id: Iba3eefddd2bd33c28152c17081a4ad13619d330d
2017-03-31 16:56:08 -07:00
Scott Randolph
6c0855895a Add VTS tests for EVS HAL
Note:  This change list was developed as ag/2031642 on master, but
cherry picks are broken at the moment, so reapplying directly to oc-dev.
The change in master will be abandoned in favor of the auto-merger.

Test:  Run them against the default (mock) driver on bat_land
Change-Id: I7ae523eb6a18ce6a1d0dcd8494f335ffa77f34f1
2017-03-31 16:26:16 -07:00
TreeHugger Robot
c499fd869b Merge "supplicant(vts): Compilation fixes" into oc-dev 2017-03-31 22:25:34 +00:00
Ryan Campbell
5a07bab793 Update DRM makefile.
Change module name to VTS format.

Test: cd hardware/interfaces && mma
Bug: 34178477
Change-Id: I33490627e1254ec1b1d36ebb7778e20680005910
2017-03-31 14:55:32 -07:00
Wyatt Riley
27c2f822ba Merge "IGnssDebug.hal field fixes" into oc-dev 2017-03-31 15:28:21 +00:00
TreeHugger Robot
ebf7f3213b Merge "Add VTS tests for drm+crypto HALs" into oc-dev 2017-03-31 05:29:55 +00:00
Jeff Tinker
0ea406920a Add VTS tests for drm+crypto HALs
Tests: drm vts tests are passing

related-to-bug: 32815560

Change-Id: I2b36f27fbb42eba37f3e5a26acea0e359e60b3af
2017-03-30 20:17:18 -07:00
Wyatt Riley
205881e364 IGnssDebug.hal field fixes
Modifying some fields in this API to align with values
that work with partner implementations, and better
capture the intent of this new API.

Bug: 30955615
Test: Builds and works with hidl-gen
Change-Id: Ied53cbeed2703ce757a246b45339ff2b9dfeb410
2017-03-30 18:31:20 -07:00
TreeHugger Robot
5221194a30 Merge "Check result of registerAsService in dumpstate." into oc-dev 2017-03-31 01:05:32 +00:00
TreeHugger Robot
9ee6abd72c Merge "Simplify EVS HAL and move to "agressive opens"" into oc-dev 2017-03-31 00:37:30 +00:00
Eino-Ville Talvala
2d80c0d66f camera: Map between legacy gralloc0 usage, and HIDL gralloc1 usages
Otherwise some bits will be set incorrectly.

Also move device@1.0 to use ProducerUsageFlags instead of ProducerUsage,
and add a compatibility workaround to set the gralloc0 HW_CAMERA_ZSL flags
when ConsumerUsage::CAMERA is passed in.

Test: Camera CTS passes, updated VTS tests pass
Bug: 35215313
Change-Id: I981dc1a650f838f94d932944fe835fd267f2004d
2017-03-30 16:11:26 -07:00
Jeff Tinker
140e6a9600 Merge "Fix getKeyRequest legacy HAL returning invalid status" into oc-dev 2017-03-30 23:00:40 +00:00
Jeff Tinker
fea340f1fe Fix getKeyRequest legacy HAL returning invalid status
bug: 36006198

Test: drm hal vts test
Change-Id: Ie3125b4459add4fd30dc418f92ab0f51d8fcc73b
2017-03-30 16:00:12 -07:00
TreeHugger Robot
cfb39b413f Merge "Add VTS tests for Sap Apis." into oc-dev 2017-03-30 22:12:29 +00:00
Roshan Pius
e3509d455b supplicant(vts): Compilation fixes
Fixed couple of compilation failures from .hal changes and made change
to stop/start framework during tests.

Bug: 33457575
Test: mmma -j32 hardware/interfaces/wifi/supplicant/1.0/vts/functional
Change-Id: I1bac68bd71e92b025acdebd0fef8834b826bcfcb
2017-03-30 14:59:18 -07:00
Scott Randolph
de9880eece Simplify EVS HAL and move to "agressive opens"
This adapts the API implementation to allow a duplicate "open" operation
to automatically close any previous connections to the device.  This
works around a binder level issue that can cause destructors triggered
by remote clients to be delivered out of order to the server.

This was originally change ag/1969959 on master, but has been
recreated on oc-dev (cherry-picking was broken at the time).
The original master change will be abandoned in favor of this getting
merged down from oc-dev.

Test:  Run Vts test (added in following change)
Change-Id: I7b417998e59a4d592fbb91811c4101f39097c5dd
2017-03-30 14:04:12 -07:00
Steven Moreland
a5bb877914 Check result of registerAsService in dumpstate.
Test: see change I35f5d4498abd7369b03a04081e8aa26a3933328e
Fixes: 36704363
Change-Id: I5cc8f32592a77994e756438b8d1b7f3255acef19
2017-03-30 18:04:39 +00:00
Mikhail Naganov
936279e1ff audiohal: Fix UAF of HAL devices in Stream objects
Stream objects used to hold a pointer to underlying HAL device
object which they didn't own. Since destruction of server side
objects is asynchronous, it was possible that a Device object
gets destroyed before Stream objects, making all the HAL device
object pointer to become stale.

Fixed by adding a strong reference to Device objects into Stream
objects.

Bug: 36702804
Change-Id: I3da3611afbb91d6fd6410ac5b8af2a2eebfa6dac
Test: ran Loopback app and HAL VTS tests
(cherry picked from commit 96d3573cda)
2017-03-30 15:52:30 +00:00
Shawn Willden
63e15f0790 Revert "Revert "Add keymaster VTS tests.""
This reverts commit 8e10baee45.

Test: Tests pass, except known failures with in-progress vendor fixes
Change-Id: Ia95c1444100e123fa65d095b001878cf9040d0c4
2017-03-30 13:21:54 +00:00
Michael Butler
da8c2c1e2a RenderScript VTS cleanup and fixes
This CL fixes the remaining VTS test cases for the RenderScript
vts-hidl-hal test and cleans up and improves the working test cases.
The goal is to have at least one passing test case per HIDL HAL entry.

Bug: 35915961

Test: mm and run on angler
Change-Id: I4b6e25831ce7d2abb3148c39eb48bde10ed04646
(cherry picked from commit 54fa8d4285)
2017-03-29 17:42:43 -07:00
Michael Butler
1791d9bfab Fix RS HIDL server, pass data by bytes instead of by elements.
Our current stack:
  API->API_TO_HAL_translator->HAL
          ->HAL_TO_Implementation_translator->Implementation

  For most APIs:
  - API passes objectCount.
  - HAL expects objectCount.
  - Implementation expects objectCount.

  For APIs like ScriptGroupCreate:
  - API passes byteCount. And unfortunately, these APIs are part of
    NDK, we could not make them also passing objectCount like others.
  - HAL expects objectCount.
  - Implementation expects byteCount.

  So that both API_TO_HAL_translator and
  HAL_TO_Implementation_translator should correctly convert input
  objectCount/byteCount to byteCount/objectCount.

  This CL only fixes the HAL_TO_Implementation_translator part,
  whereas aosp/356395 fixes the API_TO_HAL_translator part. Both
  parts were mistakenly using byteCount as objectCount, causing
  potential out-of-bound access.

Bug: 36404879
Test: mm on angler
Change-Id: I28541a8926aeafece40e2a3f664bda67e26a34a2
(cherry picked from commit fd14e27b89)
2017-03-29 17:42:33 -07:00
Shuoq
9823fcd865 Add VTS tests for Sap Apis.
Bug: 32022332
Test: vts
Change-Id: I9a55978aa485a59510090f46a8e5edfb87bccc0e
2017-03-29 16:06:47 -07:00
Keun Soo Yim
bf0f670580 Merge "Revert "Add keymaster VTS tests."" into oc-dev 2017-03-29 20:19:28 +00:00
Keun Soo Yim
8e10baee45 Revert "Add keymaster VTS tests."
This reverts commit dda22ea884.

Change-Id: Ie6a60e17ed5258840eba3d3f6b8092636160b2c2
2017-03-29 20:18:52 +00:00
Andreas Huber
8074912d8c Merge "Convert all comments into "doxygen-ready" comments." into oc-dev 2017-03-29 18:48:37 +00:00
Andreas Huber
40d3a9bd8c Convert all comments into "doxygen-ready" comments.
Bug: 36453077
Test: mma
Change-Id: I0b1f77dfae5d2258969e33d85ecf45401ffbdfaa
2017-03-29 08:53:58 -07:00
Shawn Willden
dda22ea884 Add keymaster VTS tests.
Note: Recent Google devices have keymaster implementations that don't
pass this test suite.  See https://goo.gl/6hsGwa for a summary.

Bug: 32022681
Test: This is the test suite.
Change-Id: Ib200b68e0c7844df02eb9f086385d6c36e306d45
2017-03-29 13:28:16 +00:00
Andreas Huber
675ae49ab1 Convert all comments into "doxygen-ready" comments.
Bug: 36453077
Test: make
Change-Id: Ic77394d4d2e1ccedba3a28230d870c5d6108bd40
2017-03-28 16:14:43 -07:00
TreeHugger Robot
2f44ec6c86 Merge "Use gralloc usage conversion library" into oc-dev 2017-03-28 20:55:51 +00:00
Jesse Hall
66ee1771a6 Use gralloc usage conversion library
Converting from ..graphics.allocator@2.0 usage to gralloc0 usage isn't
quite as simple as ORing and truncating, which is what the default
implementation was doing. Switch to using library functions that do it
correctly.

Test: boot bullhead
Change-Id: I40ae00e9aad92b374f281569207972b7461a3e55
2017-03-28 08:23:21 -07:00