Commit graph

18 commits

Author SHA1 Message Date
Devin Moore
17365e56a2 Use NativeHandle in MQDescriptor instead of ParcelFileDescriptor
android.hardware.common.fmq.MQDescriptor needs to handle multiple file
descriptors, so changing from ParcelFileDescriptor to
android.hardware.common.NativeHandle.
android.hardware.common.fmq.GrantorDescriptor needs to keep track of the
fdIndex as well.

Bug: 176912570
Test: atest fmq_unit_tests fmq_test

Change-Id: I15f2393e6c420ae5394322b28c4523fa80f7dcc7
2021-01-22 13:30:19 -08:00
Devin Moore
7a26802481 Reland "Change HIDL fmq tests to use int32_t for payload"
9719e2d984

Bug: 142326204

Change-Id: I0914f7612bcd227f9a4cabbe2818de7d9999a3d3
2020-09-22 17:32:22 +00:00
Diego Wilson
9719e2d984 Revert "Change HIDL fmq tests to use int32_t for payload"
Revert "Change payload type to int32_t for fmq device tests"

Revert submission 1431616-thirtytwo

Reason for revert: This topic broke the aosp_x86-userdebug target. Details at http://b/169077648

Reverted Changes:
If736389eb:Add template parameters to MQDescriptor
Ice9c28c3d:Change HIDL fmq tests to use int32_t for payload
Ia18d8459b:Add template arguments to MQDescriptor for AIDL
I95586cc83:Change payload type to int32_t for fmq device test...

Change-Id: Iaf37a5dca7a915f098e49ecb076c0932eb60e0c3
2020-09-21 19:36:49 +00:00
Devin Moore
0a10d6918c Change HIDL fmq tests to use int32_t for payload
This is in preperation for more AIDL fmq testing. The types need to be
the same and AIDL does not support unit16_t.

Test: atest fmq_test fmq_unit_tests
Bug: 142326204
Change-Id: Ice9c28c3d0df064ea43c31950b3438d2e0d19063
2020-09-18 09:29:01 -07:00
Hans Chen
58d52f70b3 Modified ITestMsgQ hal service interface
Test: make vts -j; fmq_test
Changes:
* Modified method that configures the synchronized queue. Now this method takes in a descriptor of an existing queue and creates a queue on the HAL server side.

Change-Id: I395d6311f3580af6a87556849b3e921fa9eaf097
2018-07-17 10:56:03 -07:00
Andreas Huber
3e4acb8b3a Convert all comments into "doxygen-ready" comments.
Bug: 36453077
Test: make
Change-Id: Ic77394d4d2e1ccedba3a28230d870c5d6108bd40
2017-03-28 16:10:42 -07:00
Hridya Valsaraju
c3db9c8142 Modify method to get MQDescriptor for unsynchronized FMQ.
The modified method adds a new parameter specifying
if a new unsynchronized FMQ needs to be set up by the server
or if it is to return an MQDescriptor to
an unsynchronized FMQ that has already been configured
by the server(if one exists)

Bug: 35319190
Test: FMQ unit tests
Change-Id: I64a5b356a2761faaeeea6fdd2c3a7da9b60f0016
2017-02-13 15:50:40 -08:00
Hridya Valsaraju
586bed1c17 Add a new method to trigger a blocking read.
The new method will request the service to trigger a blocking
read with the default Event Flag notification bitmask defined
by the MessageQueue class.

Test: FMQ unit tests
Change-Id: I5a61e2b4527ba31cd5ea6521c553a87904af8056
2017-01-13 20:58:17 -08:00
Hridya Valsaraju
9ba9244e5f Add a method to trigger multiple FMQ blocking reads.
Test: FMQ unit tests
Bug: 33815422
Change-Id: Idcd1fd79232a1b0caa5784e8dd4f3a929f52fded
2017-01-04 16:19:36 -08:00
Hridya Valsaraju
f70884cf4b Templatize MQDescriptor
Bug: 33948735
Test: FMQ unit tests and benchmarks

Merged-In: I5c3beff2c6a69e151e0cb11af299956638cc441b
Change-Id: I5c3beff2c6a69e151e0cb11af299956638cc441b
2016-12-29 22:33:40 -08:00
Hridya Valsaraju
710e4a3f0d Add a method to test EventFlag configuration and usage
Bug: 31223612 33295104

Test: FMQ unit tests.

Change-Id: Idbddd38730edd0ec14c37d3cb5e67f78705c3d4a
2016-12-21 14:16:10 -08:00
Hridya Valsaraju
b43584556f Add methods to test flavor of FMQ supporting unsynchronized writes.
Test: Built and ran the unit tests.
Bug: 31223183

Change-Id: Ib0c52c4d17d31a24f4c5f5cd96547bcfae673725
2016-10-19 18:19:13 -07:00
Hridya Valsaraju
954515f73a Modify return values of read/write/config methods to bool
Modify return values of read/write/config methods to bool
for the FMQ unit tests and benchmarks.

Bug: 31780470
Test: Built and ran existing FMQ unit tests and benchmarks

Change-Id: I2b7c9cf073f0c1a2908d48552e258ce21240ae64
2016-10-14 23:55:52 +00:00
Hridya Valsaraju
9d9672cce2 Use MQDescriptorSync instead of MQdescriptor in interface
Add comments and cleanup code as per HIDL style guidelines.

Bug: 31550963
Test: Built and ran existing FMQ unit tests and benchmarks.

Change-Id: I0a09ba1fcb520b46e5e6299b473c962c93d815eb
2016-09-27 22:22:19 +00:00
Andreas Huber
4a99f3afae WireMQDescriptor => MQDescriptor
b/31091383 Adding WireMQDescriptor as a hidl type

Change-Id: Iff23c833e8ab232ad37fd9bfbfe4d49fbc06b369
2016-09-09 11:35:48 -07:00
Iliyan Malchev
da96fb2a94 android.hardware.tests.msgq@1.0: modify ITestMsgQ
Modify the configure() method so that the implementation does not have
to rely on status_t to return service errors.

b/31367910
b/31348667

Change-Id: I0bc88c396ce4e55ed38b534b7e3ae2c0a4faad62
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-09-08 15:12:36 -07:00
Martijn Coenen
cbe590cb9f Apache2 module license.
Bug: 31110244
Change-Id: I7ce63f940199e8cd7d193bdde39fc6cd448db802
2016-08-30 11:28:36 -07:00
Hridya Valsaraju
3e32003be1 Move .hal file for FMQ tests to harware/interfaces
This is required to convert to the new hidl-gen.

Change-Id: I87a5d3d006fe80ad16d4abb63d400b3c52a2bae9
2016-08-12 13:18:29 -07:00