diff options
author | Hridya Valsaraju | 2016-10-14 18:48:01 -0500 |
---|---|---|
committer | Hridya Valsaraju | 2016-10-19 20:19:13 -0500 |
commit | b43584556fc9d01cdcc80d5f06501aa2ccbc410f (patch) | |
tree | 02c440300a83c3fe5f29384f8bb42109381b9e57 /tests/msgq/1.0 | |
parent | f7ad111d727b5bf237013758226b85adf068aadb (diff) | |
download | platform-hardware-interfaces-b43584556fc9d01cdcc80d5f06501aa2ccbc410f.tar.gz platform-hardware-interfaces-b43584556fc9d01cdcc80d5f06501aa2ccbc410f.tar.xz platform-hardware-interfaces-b43584556fc9d01cdcc80d5f06501aa2ccbc410f.zip |
Add methods to test flavor of FMQ supporting unsynchronized writes.
Test: Built and ran the unit tests.
Bug: 31223183
Change-Id: Ib0c52c4d17d31a24f4c5f5cd96547bcfae673725
Diffstat (limited to 'tests/msgq/1.0')
-rw-r--r-- | tests/msgq/1.0/ITestMsgQ.hal | 57 |
1 files changed, 47 insertions, 10 deletions
diff --git a/tests/msgq/1.0/ITestMsgQ.hal b/tests/msgq/1.0/ITestMsgQ.hal index fc961815..dcdc74a2 100644 --- a/tests/msgq/1.0/ITestMsgQ.hal +++ b/tests/msgq/1.0/ITestMsgQ.hal | |||
@@ -18,9 +18,10 @@ package android.hardware.tests.msgq@1.0; | |||
18 | 18 | ||
19 | interface ITestMsgQ { | 19 | interface ITestMsgQ { |
20 | /* | 20 | /* |
21 | * This method requests the service to set up Synchronous read/write | 21 | * This method requests the service to set up a synchronous read/write |
22 | * wait-free FMQ with the client as reader. | 22 | * wait-free FMQ with the client as reader. |
23 | * @return ret Will be true if the setup is successful, false otherwise. | 23 | * |
24 | * @return ret True if the setup is successful. | ||
24 | * @return mqDesc This structure describes the FMQ that was | 25 | * @return mqDesc This structure describes the FMQ that was |
25 | * set up by the service. Client can use it to set up the FMQ at its end. | 26 | * set up by the service. Client can use it to set up the FMQ at its end. |
26 | */ | 27 | */ |
@@ -28,18 +29,54 @@ interface ITestMsgQ { | |||
28 | generates(bool ret, MQDescriptorSync mqDesc); | 29 | generates(bool ret, MQDescriptorSync mqDesc); |
29 | 30 | ||
30 | /* | 31 | /* |
31 | * This method request the service to write into the FMQ. | 32 | * This method requests the service to set up an unsynchronized write |
33 | * wait-free FMQ with the client as reader. | ||
34 | * | ||
35 | * @return ret True if the setup is successful. | ||
36 | * @return mqDesc This structure describes the FMQ that was | ||
37 | * set up by the service. Client can use it to set up the FMQ at its end. | ||
38 | */ | ||
39 | configureFmqUnsyncWrite() | ||
40 | generates(bool ret, MQDescriptorUnsync mqDesc); | ||
41 | |||
42 | /* | ||
43 | * This method request the service to write into the synchronized read/write | ||
44 | * flavor of the FMQ. | ||
45 | * | ||
32 | * @param count Number to messages to write. | 46 | * @param count Number to messages to write. |
33 | * @return ret Will be true if the write operation was successful, | 47 | * |
34 | * false otherwise. | 48 | * @return ret True if the write operation was successful. |
35 | */ | 49 | */ |
36 | requestWrite(int32_t count) generates(bool ret); | 50 | requestWriteFmqSync(int32_t count) generates(bool ret); |
37 | 51 | ||
38 | /* | 52 | /* |
39 | * This method request the service to read from the FMQ. | 53 | * This method request the service to read from the synchronized read/write |
54 | * FMQ. | ||
55 | * | ||
40 | * @param count Number to messages to read. | 56 | * @param count Number to messages to read. |
41 | * @return ret Will be true if the read operation was successful, false | 57 | * |
42 | * otherwise. | 58 | * @return ret True if the read operation was successful. |
43 | */ | 59 | */ |
44 | requestRead(int32_t count) generates(bool ret); | 60 | requestReadFmqSync(int32_t count) generates(bool ret); |
61 | |||
62 | /* | ||
63 | * This method request the service to write into the unsynchronized flavor | ||
64 | * of FMQ. | ||
65 | * | ||
66 | * @param count Number to messages to write. | ||
67 | * | ||
68 | * @return ret True if the write operation was successful. | ||
69 | */ | ||
70 | requestWriteFmqUnsync(int32_t count) generates(bool ret); | ||
71 | |||
72 | /* | ||
73 | * This method request the service to read from the unsynchronized flavor of | ||
74 | * FMQ. | ||
75 | * | ||
76 | * @param count Number to messages to read. | ||
77 | * | ||
78 | * @return ret Will be True if the read operation was successful. | ||
79 | */ | ||
80 | requestReadFmqUnsync(int32_t count) generates(bool ret); | ||
81 | |||
45 | }; | 82 | }; |