Commit graph

461 commits

Author SHA1 Message Date
Steven Moreland
730aef9a78 Merge "hidl_test_java interfaces: use generic interfaces" 2020-10-02 16:32:25 +00:00
Steven Moreland
c0236f06e7 hidl_test_java interfaces: use generic interfaces
In places where we are passing interfaces, pass around
android.hidl.base.IBase to give flexibility to the test implementation,
specifically in order to avoid passing local binders to Java process,
which is a disabled feature.

Bug: 169369810
Test: atest hidl_test hidl_test_java
Change-Id: I7721a6ec7e72b96915a0dc66aa8e75c327032d1f
2020-10-01 23:20:44 +00:00
Steven Moreland
46e2487ac0 msgq test service in VTS
auto_gen_config: this is a helper binary, so we avoid actually running a
test by not creating a test configuration

test_suites: vts, so that this is built and packaged with VTS

Bug: 168806888
Test: fmq_test
Change-Id: I640b848297667594153c207f8a4fcad989585d98
2020-09-30 00:47:32 +00:00
Steven Moreland
96e0709f21 msgq service device -> general-tests
We don't need this built per-device.

Bug: 168807095
Test: fmq_test
Change-Id: Ia5c4e8fa97ea364ccc3beae3ce6fe0980d12be25
2020-09-30 00:47:15 +00:00
Steven Moreland
a9f240232d Merge "tests.baz@1.0: changes for symmetric tests" 2020-09-25 20:16:29 +00:00
Steven Moreland
ffb6a481c7 tests.baz@1.0: changes for symmetric tests
Changes to make hidl_test_java symmetric (this implementation mirrors
one in system/tools/hidl).

Bug: 168152294
Test: atest hidl_test_java
Change-Id: I29a468d1804ba494bfe5ca59d68b3ab2581eb9b4
2020-09-25 00:41:32 +00: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
Steven Moreland
d4ed520c27 msgq test service: installable by atest
Bug: 127714188
Test: atest -v fmq_test
Change-Id: Icf696763cbcdd458d36ee709ee9640999c9034ab
2020-08-31 22:50:46 +00:00
Devin Moore
1b34d67b7a Adding AidlMQDescriptor and GrantorDescriptor
Adding these two types to android.hardware.common for future use with
Fast Message Queue in libfmq.

Also adding to the mq_test_service to test them.

Test: system/tools/hidl/tests/run_all_device_tests.sh

Bug: 142326204

Change-Id: I424c4849c822436f58e40f206b09ffdf9baf260b
2020-08-14 09:21:22 -07:00
Steven Moreland
56273ce0d2 Avoid TREBLE_TESTING_OVERRIDE
This is moved from an environmental variable to a function since
getenv is problematic in multi-threaded testing environments.

Bug: 156668058
Test: fmq_test
Change-Id: I54c6a973ef9d1cec98330268ed0a40c2564ee42c
2020-07-09 21:56:24 +00: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
Peter Kalauskas
f4efbd5a82 android.hardware.tests.lazy@1.1::ILazy
Introduce minor version increment to ILazy for testing lazy HAL
inheritance.

Bug: 157451814
Bug: 158606505
Test: hidl_lazy_test
Change-Id: Ib418bc002e834edf5eae53043875dcb351b3eaf2
2020-06-19 02:02:22 +00:00
Jeongik Cha
6eb3709c38 Remove redunant aidl api
test-android.hardware.vibrator-ext became android.hardware.vibrator-ext
accordingly, remove redunant aidl api directory

Bug: 153501107
Bug: 152655547
Test: m
Change-Id: I3de4196c6fe8ecfae4a6bd5f6bac7920695150c8
2020-04-09 17:01:44 +09:00
Treehugger Robot
15664d3f58 Merge "Freeze vintf aidl interfaces" 2020-04-09 07:49:49 +00:00
Treehugger Robot
3cd2b74e0d Merge "android.hardware.tests.extension.vibrator-update-api" 2020-04-09 07:49:49 +00:00
Jeongik Cha
f63412fcf9 android.hardware.tests.extension.vibrator-update-api
Dumping android.hardware.tests.extension.vibrator was ommited
because of difference of module name across branch.

Bug: 153501107
Bug: 152655547
Test: m
Change-Id: Ia272ffa77add9ef0b02ee0a23fc2389ac69fa9aa
2020-04-08 22:32:00 +09:00
Jeongik Cha
cfb374895d Freeze vintf aidl interfaces
AIDL interfaces which are vintf-stable have to be frozen in release.
But these interfaces have been never frozen, so freeze them.

- android.hardware.power
- android.hardware.identity
- android.hardware.keymaster
- android.hardware.vibrator
- android.hardware.light
- android.hardware.tests.extension.vibrator

Bug: 153500421
Bug: 153500550
Bug: 153511407
Bug: 153500549
Bug: 153501107
Bug: 153501202
Test: m
Change-Id: I643c25fc695f9d1e874dcceb327d465c49e9cab6
2020-04-08 20:28:40 +09:00
Jiyong Park
369fe2f322 Update the current API dump
All aidl_interface modules should by default considered as stable, in
case it is used across system and vendor partitions, or across modules.
Like other API surfaces, we need to have a dump for the current
(yet-to-be-released) version and update it when there is an API change.
This is done via .

Then the owner of the interface can freeze the current version as a
numbered version via .

This change shal be rejected only when the owner is certain that the
interface is not used across the updatable boundaries.

Bug: 152655547
Test: m
Change-Id: I93fba2721695a14e0eb4a2173066ce132228b895
Merged-In: I93fba2721695a14e0eb4a2173066ce132228b895
2020-04-08 20:21:58 +09:00
Steven Moreland
1f9aa386ba android.hardware.tests.lazy@1.0::ILazy
For testing lazy HALs in HIDL on continuous integration.

Bug: 148114689
Test: hidl_lazy_test
Change-Id: I710c11c0cb59f04b4f162d627ca0d11135ab1437
2020-03-24 18:50:06 -07:00
Steven Moreland
dac21c4f0b vibrator ext: use package name as module name
For consistency.

Bug: N/A
Test: N/A
Change-Id: If32e8539fd8fffd5e27f0437bff480089e38f0da
2020-03-10 17:24:47 -07:00
Steven Moreland
98ba8fb7f0 vibrator: use package as name
In order to provide a more descriptive name, and to be consistent
with HIDL, the stable AIDL package names are switching from
vintf-vibrator format to the package format
(android.hardware.vibrator).

Bug: N/A
Test: all build time
Change-Id: I52959482898f329ad1b3a3a5b345a0c6dc72197d
Merged-In: I52959482898f329ad1b3a3a5b345a0c6dc72197d
2020-01-06 14:08:01 -08:00
Steven Moreland
7696aa885f ./update-makefiles.sh, for union changes/memory
Many more types can be used in Java.

Bug: 143566068
Test: N/A
Change-Id: Ie18e1e0f9c22f2ea15b755df3b048c9d651c4945
2019-11-26 09:24:31 -08:00
Steven Moreland
741347b49d Merge "vibrator extension: use checked_interface_cast" 2019-11-25 18:06:24 +00:00
Steven Moreland
43d168751c vibrator extension: use checked_interface_cast
Since interface_cast doesn't currently check.

Bug: 136027762
Test: test-vintf-vibrator-ext-client
Change-Id: I4faeba339d8c54f6618e871a46d811943a398e0a
2019-11-21 15:58:35 -08:00
Ytai Ben-Tsvi
2db42995a5 More memory test interfaces
Merged-In: I21bb7c28aa774801cad94cd530ccb6b5c3b621e0
Change-Id: I21bb7c28aa774801cad94cd530ccb6b5c3b621e0
Bug: 143566068
2019-11-21 15:32:17 -08:00
Steven Moreland
8ba8c03a49 example AIDL HAL extension
This CL shows an example of how to use and retrieve a HAL extension.

Bug: 136027762
Test: run HAL and:
- use "dumpsys --pid android.hardware.vibrator.IVibrator/default" to
make sure that the HAL I'm running is the binary being added.
- VtsHalVibratorTargetTest
- test-vintf-vibrator-ext-client

Change-Id: I8614007a727e8e05ba4667c2cd1623ce936a1609
2019-11-18 18:02:12 -08:00
Steven Moreland
cbd3f444c7 Merge "update-makefiles.sh: for partial Java pkgs" 2019-11-05 17:57:51 +00:00
Steven Moreland
077b73b7ab update-makefiles.sh: for partial Java pkgs
Packages which contain some non-supported Java types can still have
their Java-supported types used in Java.

Bug: 143566068
Test: mma
Change-Id: I2afc5cc8d0a1bd981108ee2b87d6033fd48bdb37
2019-11-04 12:50:41 -08:00
Steven Moreland
2cf4446f45 android.hardware.tests.libhwbinder@1.0-impl{,.test}
Since it is accidentally installed on some devices, although it is a
test.

Bug: 123878766
Test: atest hwbinderThroughputTest
Change-Id: Id43aa7e9ca3152c35bb2dac84d7386c9d7a5e0aa
2019-11-04 09:47:59 -08:00
Ytai Ben-Tsvi
c861055316 HIDL test: update for java bitfields in lists
Bug: 141187928
Test: HIDL's run_all_host_tests.sh

Change-Id: Ib282ed03b85c798b724ed4c44ac2d59ea8dbf420
2019-09-17 14:25:35 -07:00
Steven Moreland
b3a4d3832e Remove libhwbinder/libhidltransport deps
Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I075670b64eebbbbd6a6ae0e84ad51bf1c6f5ba36
2019-09-06 01:07:02 +00:00
Neel Mehta
3dfccafba4 Remove annotations with constexpr params
These are not used anywhere in the tree and are hence not supported.
These are being removed from hidl-gen so this code is being removed.

Bug: N/A
Test: hidl-gen -Lcheck android.hardware.tests.expression@1.0
Change-Id: Ia19746da8ba361c7f29cc8732058a27cdc7a1bfe
2019-08-06 17:32:40 -07:00
Steven Moreland
f4ad670671 android.hardware.tests.libbinder static
So that the test doesn't require modifying the system partition.

Still creating a shared version of this library since some things
downstream still depend on this.

Bug: 136111641
Test: libbinder_benchmark
Change-Id: I636f53c2a2bc4705804ca36d124102eba55c23e6
2019-07-01 21:49:19 +00:00
Steven Moreland
13374bd7f2 Remove ref<>.
This type is unused and some parts of it has bitrot. In order to reduce
the complexity of new features, removing this.

Fixes: 131616631
Test: HIDL's test/run_all_device_tests.sh
Test: HIDL's test/run_all_host_tests.sh
Change-Id: Ib7f94053ab987ccb6858eec1cfd7e53fd7320ba3
2019-05-28 17:29:17 -07:00
Steven Moreland
1ae4615d9f Update hidl makefiles for bpfmt
hidl-generated makefiles are now generated such that bpfmt(file) == file.

Bug: 67417008
Test: enable bpfmt hook
Change-Id: I1f69d292bc23a7cc293a66110cb02d597e1019ad
2019-04-17 09:38:50 -07:00
Steven Moreland
a878aee9ab Update makefies: no 'types'
Bug: 123976090
Test: N/A
Change-Id: I30fb04c81889b62775e1b764b965fdb0f893de17
2019-03-04 11:27:17 -08:00
Steven Moreland
532c05a3ec Test ...libhwbinder-impl static.
So that it can be included in tests.

Bug: 122456128
Test: libhwbinder_benchmark, hwbinderThroughputTest, libhwbinder_latency
Change-Id: I4c77c04252c7d6f0c2215ee052d747561db181e0
2019-02-01 15:13:32 -08:00
Keun Soo YIM
68ae05dd2d pack VTS cc_test binaries as general-tests
Test: make general-tests
Bug: 120093339
Merged-In: I363450d205868f900e4925ccff1430e2a569f2a4
Change-Id: I363450d205868f900e4925ccff1430e2a569f2a4
2018-12-07 10:49:56 -08:00
Steven Moreland
55cb014dc9 Add safe union for cpp-only test.
Bug: 110269925
Test: hidl_test
Change-Id: I18e52f8f41779e57828209882f1191aebc1e6782
2018-11-08 13:14:00 -08:00
Steven Moreland
4fc9b6e8de Tests for Enum#len
Bug: 117951873
Test: hidl_test
Change-Id: I532c983f72013446869e3c8e3bbc11c776bfcbfa
2018-11-02 17:41:12 -07:00
Steven Moreland
17c437eac1 Merge "Add monostate to optional safe unions." 2018-10-11 21:23:27 +00:00
Steven Moreland
dec5272582 Add monostate to optional safe unions.
Bug: 116156870
Test: hidl_test, hidl_test_java
Change-Id: Ie17a80dee982775e267a39086016071ac2361fb5
2018-10-11 11:02:25 -07:00
Steven Moreland
da1d79bf07 Merge "tests IFoo: WithFmq is more complicated." 2018-10-10 19:03:51 +00:00
Steven Moreland
bd5b4dc9b3 tests IFoo: WithFmq is more complicated.
When an interface is in the struct, scatter gather isn't used.

Bug: 117239572
Test: hidl_test
Change-Id: I749dd7cce85d220c1908ad583b1744c799a105cc
2018-10-09 15:50:31 -07:00
Treehugger Robot
b035e3a246 Merge "tests: IBaz, nasty nesting struct" 2018-10-09 20:36:36 +00:00
Steven Moreland
a20d00ba60 tests: IBaz, nasty nesting struct
toString is broken in some cases because of recursive definitions. This
exercises that case.

Bug: 117342189
Test: hidl_test
Test: m android.hardware.tests.baz@1.0 android.hardware.tests.baz-V1.0-java
    (this runs hidl-gen on this for both Java and C++ output)
Test: manually inspected output

Change-Id: Ic09ac133345f2d83d6f83d3d0af1f63e7e3250ee
2018-10-09 10:13:10 -07:00
Steven Moreland
2b01956dac IFoo: send struct with fmq.
Bug: 117239572
Test: hidl_test
Change-Id: I968916a9d62e1c8f7a237bd24e6b4267dd013366
2018-10-08 20:11:34 +00:00
Steven Moreland
dad22198be IFoo: remove pointer from u.
pointer needs a fixup (to abort) since they can't be used in remote
transactions, so removing it from the union here.

Bug: 117322722
Test: hidl_test
Change-Id: Ie582f6b79a8176ca1585bf4b1f43ae9d5d97fa92
2018-10-05 11:16:20 -07:00