Commit graph

18389 commits

Author SHA1 Message Date
Shawn Willden
a2a6a33ea9 Fix delivery of earlyBootEnded to KM4.1
Bug: 152932559
Test: Boot and observe that Strongbox gets the message
Merged-In: I752b44f5cc20d85bf819188ccaaf0813a5607ba5
Change-Id: I752b44f5cc20d85bf819188ccaaf0813a5607ba5
2020-06-01 14:08:39 -06:00
Orion Hodson
d2985135d6 Merge "Add dependency on jni_headers" 2020-06-01 09:20:10 +00:00
Bowgo Tsai
43dd6e34bd Allow unlocked in VTS
VTS was running on a userdebug build GSI before Android 10.
Starting from Android 10, VTS is switched to running on top of a
user build GSI image, plus the device-specific boot-debug.img to
allow adb root.

   https://source.android.com/compatibility/vts/vts-on-gsi

So 'ro.build.type' will be 'user' because the value comes from
/system/build.prop. Switching to using 'ro.debuggable' to decide
whether we should check the device is locked or not. Note that
'ro.debuggable' will be '1' for userdebug/eng images or when a
boot-debug.img is used.

Bug: 154449286
Test: atest VtsHalKeymasterV4_0TargetTest
Change-Id: If5a90d62f77489aa58f96e908553a052cf6d1e18
2020-05-29 07:49:11 +00:00
Treehugger Robot
43f1d331e3 Merge "Fix GnssMeasurement state range check" 2020-05-27 22:22:40 +00:00
Orion Hodson
0f8403f606 Add dependency on jni_headers
Preparation for removing implicit include paths for jni.h from soong.

Bug: 152482542
Test: Apply future soong change && m checkbuild
Change-Id: I880eb1f307d995cbd4f0f19e8f8d22c20fc36bef
Merged-In: I880eb1f307d995cbd4f0f19e8f8d22c20fc36bef
Exempt-From-Owner-Approval: build clean-up
(cherry picked from commit 43c1a6a41c)
2020-05-27 17:29:42 +01:00
Yu-Han Yang
4f21df3b44 Fix GnssMeasurement state range check
Bug: 157463010
Test: atest VtsHalGnssV2_0TestTarget
Change-Id: I72f4bf1f09d6271ac6367abc3972ee7747b18155
(cherry picked from commit 51d8defb3c)
Merged-In: I72f4bf1f09d6271ac6367abc3972ee7747b18155
2020-05-26 21:22:42 +00:00
Elliott Hughes
69a08536c2 Use libcutils' host implementation directly.
Also remove the tests of the mock property functions themselves, and
rely on the libcutils/libbase testing.

Bug: http://b/151789258
Test: treehugger
Change-Id: I455ef0c2e4f19f6e69b8f65a3b6d4595717c81cd
2020-05-20 09:18:12 -07:00
Lev Proleev
d90a5de791 NNAPI: Clarify behaviour of ops that reduce dimensions
Clarify behaviour of the following ops in the case when inputs would
cause an output to have an empty shape:
* MEAN
* ARGMIN/ARGMAX
* STRIDED_SLICE

Bug: 155508675
Bug: 155660285
Bug: 155508675
Bug: 155238914
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: I92d1c3866a462a99b4eed7782b72f62bb6a076c6
Merged-In: I92d1c3866a462a99b4eed7782b72f62bb6a076c6
(cherry picked from commit d4bba83f6a)
2020-05-19 13:39:26 -07:00
Miao Wang
4749010554 Add AndroidTest.xml for NNAPI 1.3 VTS and temporarily blacklist failing tests
- Also adds TEST_MAPPING filters here to make sure sample driver tests
  are still being filtered out.
  - There may still be failing tests, but should not cause OOM in test harness.

Bug: 156691406
Test: mm
Test: atest VtsHalNeuralnetworksV1_3TargetTest
Change-Id: Ie05350d71dede04967d94dad4147bd3ed3435f7d
Merged-In: Ie05350d71dede04967d94dad4147bd3ed3435f7d
(cherry picked from commit 338acf5c15)
2020-05-19 13:38:28 -07:00
Lev Proleev
4b2917a5ed NNAPI: Clarify behaviour of REDUCE_* ops
Add a clarification on the behaviour of REDUCE_* ops when all dimensions
of an input tensor are reduced.

Bug: 155508675
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: I3a67225c3af80af40a11362ca5d0f55350cbfa05
Merged-In: I3a67225c3af80af40a11362ca5d0f55350cbfa05
(cherry picked from commit eec7d86b44)
2020-05-19 13:38:00 -07:00
Miao Wang
e1c1e7e2f6 Filter out failing NNAPI validation tests
Bug: 155577050
Test: atest VtsHalNeuralnetworksV1_*TargetTest
Change-Id: Id8d497dddd5521670689ff2ea08610c3aaeaf748
Merged-In: Id8d497dddd5521670689ff2ea08610c3aaeaf748
(cherry picked from commit 4429d856cd)
2020-05-19 13:35:55 -07:00
Miao Wang
f904bb11d2 Add AndroidTest.xml for NNAPI 1.0 VTS and blacklist failing tests
- Also adds TEST_MAPPING filters here to make sure sample driver tests
  are still being filtered out.

Bug: 155577050
Test: mm
Test: atest VtsHalNeuralnetworksV1_0TargetTest
Change-Id: Ic8f556a957e6af340d500e2c4696b41b2a6e8516
Merged-In: Ic8f556a957e6af340d500e2c4696b41b2a6e8516
(cherry picked from commit 8ebe2a04c5)
2020-05-19 13:35:42 -07:00
Miao Wang
398adea8b6 Add AndroidTest.xml for NNAPI 1.2 VTS and blacklist failing tests
- Also adds TEST_MAPPING filters here to make sure sample driver tests
  are still being filtered out.

Bug: 155674368
Test: mm
Test: atest VtsHalNeuralnetworksV1_2TargetTest
Change-Id: I5f5d272742d4cdd6a8cc87ec035b5e2508eaa98f
Merged-In: I5f5d272742d4cdd6a8cc87ec035b5e2508eaa98f
(cherry picked from commit f7c55d5f9b)
2020-05-19 13:35:29 -07:00
David Anderson
d028b91f4a Re-enable boot HAL tests and make sure they restore previous slot flags.
Bug: 154667790
Test: set slot to a
      run SetActiveBootSlot/SetSlotAsUnbootable tests
      fastboot reboot bootloader
      fastboot getvar current-slot shoud be a
      repeat on b slot
Change-Id: Icff45d3949d0ad76d22bdf8830c0903e81027b6e
2020-05-18 18:00:49 +00:00
Shuo Qian
41084e7ef4 Merge "Skip voice call VTS for devices that don't support voice call with new Util" 2020-05-16 02:52:07 +00:00
Shuo Qian
f2ed9ffcb9 Skip voice call VTS for devices that don't support voice call with new Util
Bug: 154867827
Test: VtsHalRadio1_4Target
Change-Id: I888d4d4ffbff5d24bfe2b9b3cb878eb5f1e1762f
Merged-In: I888d4d4ffbff5d24bfe2b9b3cb878eb5f1e1762f
(cherry picked from commit 4e866a3020)
2020-05-16 01:29:07 +00:00
Treehugger Robot
b77ff497cd Merge "[VTS] Ignore tests of setting Active Boot Slot." 2020-05-15 08:12:44 +00:00
Steven Moreland
d0094c65f8 Merge "Freeze audiocontrol@1.0::types." 2020-05-14 22:11:32 +00:00
nelsonli
000d823eba [VTS] Ignore tests of setting Active Boot Slot.
Skip the test of SetActiveBootSlot and SetSlotAsUnbootable to avoid
booting problem if bootloader image doesn't exist in slot-B

Bug: 154667790
Test: atest VtsHalBootV1_0TargetTest
Change-Id: I80600a3312ccffe9471135198706ce068edc67f1
2020-05-14 16:33:53 +08:00
Treehugger Robot
ff132d5cc7 Merge "Fix sanitize address after scope" 2020-05-13 20:07:53 +00:00
Yifan Hong
b9e1645e0b Fix sanitize address after scope
Test: pass
Fixes: 156199719
Change-Id: Icaf1e6d379199eec4d664494819405acc013a003
2020-05-13 10:11:39 -07:00
Steven Moreland
75b5d37af3 Freeze audiocontrol@1.0::types.
This was caught by R process, but due to a bug in hidl-gen, not
enforced.

Bug: 155593324
Test: build checks hash

Merged-In: Ied59b4ba94c8b6bb9e3ead869d8341cffa86f1e8
Change-Id: I2bf135bb10ad052bcfe4d8f2035ed8368d5ea9ac
2020-05-12 18:01:11 -07: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
Selene Huang
2ea80dc83f Merge "Add attestation certificate parsing and validate for IC vts." 2020-05-12 05:41:49 +00:00
Steven Moreland
a634e859df Merge "Reminder to freeze keymaster at version "5"" 2020-05-11 17:46:10 +00:00
Treehugger Robot
1ac087e4d6 Merge "Identity Credential: Add method to accept verification token." 2020-05-11 17:28:43 +00:00
Yu-Han Yang
50958448b8 DO NOT MERGE Stop location to avoid timing issue (VTS 2.0)
Before setting constellation blacklist, the location report should
be stopped first. Otherwise, the sv status which contains blacklist
constellation is still reporting and may be counted in checking
SvList. According to the comments of this case, location should be
turned off as 2a step.

Also adding another test that a blacklist request that comes in
while tracking is started, takes effect after a stop/start cycle.

Bug: 144675840
Test: on device
Change-Id: I0a5030cbeeb4bbc45000157414582117d8abbae9
Merged-In: I0a5030cbeeb4bbc45000157414582117d8abbae9
2020-05-08 22:20:31 +00:00
Steven Moreland
3c1519c550 Reminder to freeze keymaster at version "5"
Fixes: 155808722
Test: freeze-api produces error
Change-Id: I0b6d41a129f1a8cb064c394c73a3a70a6f2abc32
2020-05-08 16:33:55 +00:00
David Zeuthen
a8ed82cbb4 Identity Credential: Add method to accept verification token.
This is to facilitate HAL implementations using a TA existing in a
different environment than where auth tokens are minted. This method
will be used by credstore in a companion CL.

This modifies version 2 of the Identity Credential API (which was
never been released) to add a new method and creates version 2 of the
Keymaster types-only AIDL API to include the new VerificationToken
parcelable and SecurityLevel enum.

Bug: 156076333
Test: atest VtsHalIdentityTargetTest
Test: atest android.security.identity.cts

Change-Id: I7d05413a9ec70225ce419079f3cc9daf026cf744
2020-05-08 11:33:23 -04: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
Treehugger Robot
e3fc570d6d Merge "sensors:2.0:vts fix functional test for typeAsString field" 2020-05-07 16:34:31 +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
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
David Gross
6174f00cc6 More tests for graph validation.
- detect cycle (CycleTest)
- detect bad execution order (mutateExecutionOrderTest)
- detect lifetime inconsistent with whether operand is written (mutateOperandLifeTimeTest)
- detect lifetime inconsistent with Model inputIndexes/outputIndexes (mutateOperandInputOutputTest)
- detect incorrect number of consumers (mutateOperandNumberOfConsumersTest)
- detect operand written multiple times (mutateOperandAddWriterTest)
- detect operand never written (mutateOperationRemoveWriteTest)

Bug: 66478689
Test: VtsHalNeuralnetworksV1_*TargetTest

Change-Id: Id4ba19660bbd31a16f8a675f7b6437f4d779e8da
Merged-In: Id4ba19660bbd31a16f8a675f7b6437f4d779e8da
(cherry picked from commit af51663e99)
2020-05-04 17:29:52 -07:00
Orion Hodson
3f7367a17e Merge "Use shared library variant of libnativehelper" 2020-05-04 07:23:19 +00:00
Bob Badour
6232e934f7 Add METADATA to interfaces: Apache2=NOTICE
Bug: 68860345
Bug: 69058154
Bug: 151953481

Test: no code changes
Change-Id: I5770500dc6e9ab01a8b86640bc5a9d5f1330335e
2020-05-01 10:59:55 -07:00
Selene Huang
cab019aae5 Add attestation certificate parsing and validate for IC vts.
- Added attestation certificate parsing support.
- Added various certificate conversion support.
- Added certification verification support.
- Added tests for the attestation certificate verification.
- Updated the old tests to use the new attestation validation
  implementation.
- Updated GenerateReaderCertificate to use pointer reader private key.

Bug: 154909726

Test: VtsHalIdentityTargetTest
Test: atest android.security.identity.cts

Change-Id: Ibe770e6eaf0b0018d60876926d824204e4eaf732
2020-04-30 21:33:48 -07:00
Suren Baghdasaryan
849e9fc8b6 Replace direct pid writes with setting task profiles for camera interfaces
For easy transition from SchedTune to UtilClamp, direct access to these
cgroups should be abstracted by using task profiles. Replace writepid
commands with new task_profiles command.

Bug: 155419956
Test: change .rc file and confirm task profile is applied
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I2732f7365351f132dbf0566319e3969c2a25b3e4
2020-04-30 13:45:23 -07:00
Suren Baghdasaryan
3c6f2df90a Replace direct pid writes with setting task profiles for audio interfaces
For easy transition from SchedTune to UtilClamp, direct access to these
cgroups should be abstracted by using task profiles. Replace writepid
commands with new task_profiles command.

Bug: 155419956
Test: change .rc file and confirm task profile is applied
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ide373c283359cf4b73af4cb0813d8c0306942595
2020-04-30 13:45:13 -07:00
Suren Baghdasaryan
4b644d33d7 Replace direct pid writes with setting task profiles for bluetooth interfaces
For easy transition from SchedTune to UtilClamp, direct access to these
cgroups should be abstracted by using task profiles. Replace writepid
commands with new task_profiles command.

Bug: 155419956
Test: change .rc file and confirm task profile is applied
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ie81da380a9343e098362f5fee5026799c4486e7e
2020-04-30 13:45:04 -07:00
David Zeuthen
75bea4b6dc Merge "Identity Credential: Pass additional information to HAL." 2020-04-29 23:41:41 +00:00
David Anderson
f32d41bd11 Merge "boot: Relax getSnapshotMergeStatus test." 2020-04-29 20:59:10 +00:00
David Zeuthen
28edb10334 Identity Credential: Pass additional information to HAL.
Without this extra information passed upfront it's not practical to
implement a HAL which incrementally builds up cryptographically
authenticated data.

Two new methods are added to facilitate this and the HAL version
number is bumped to 2.

Bug: 154631410
Test: atest VtsHalIdentityTargetTest
Test: atest android.security.identity.cts
Change-Id: Iff63dfa2c4485c8768e06e7f6d70e940cfc8f68e
2020-04-29 14:27:18 -04:00
David Anderson
f0fbfdd1b4 boot: Relax getSnapshotMergeStatus test.
The SNAPSHOTTED state is allowed to be NONE if the slot hasn't changed,
to avoid needing extra snapshot cancels in the bootloader.

Bug: 154449745
Test: vts
Change-Id: Ibcb9f18f535cdcb5aae7e2c9c01e03681dbfff13
2020-04-29 00:48:38 +00:00
Orion Hodson
d1565e78d3 Use shared library variant of libnativehelper
Now available as a public library, static variant will be retired.

Bug: 150252746
Bug: 151443957
Test: mma
Change-Id: I3c0bd3d53eb457577a22cf74c9a6d852ed69c9be
2020-04-28 18:54:31 +01:00
Bob Badour
79f8151045 Remove MODULE_LICENSE_APACHE2 from interfaces
Repositories containing third-party code need a METADATA and a
license_type. Repositories containing only first-party code no longer
need a MODULE_LICENSE_* file.

Bug: 68860345
Bug: 69058154
Bug: 151953481

Test: no code changes
Change-Id: I1b35928d82dfd8ac6429bf6a98f18a256fa6298c
2020-04-27 20:44:19 -07:00
David Zeuthen
a0796e98c2 Identity Credential: Restrict AccessControlProfile identifiers to 32.
In order to implement Identity Credential on resource-restricted
secure hardware, we need to limit the number of possible
AccessControlProfile in a credential. A limit of 32 means that such
hardware only need to devote four bytes of RAM for a bitmask with
information about which profiles are authorized.

Document this, add new VTS test, and update the default
implementation.

Bug: 155100967
Test: atest android.security.identity.cts
Test: atest VtsHalIdentityTargetTest
Change-Id: Ia4f2ee0013b330561df744e0595f298a0d156122
2020-04-27 15:28:27 -04:00
Treehugger Robot
71156e527c Merge "Fix IC vts bugs and add tests for IC IWritableIdentityCredential.aidl interface." 2020-04-24 14:00:54 +00:00
Treehugger Robot
9a2f497439 Merge "Allow device properties tags for attestation" 2020-04-24 07:56:43 +00:00