Commit graph

12815 commits

Author SHA1 Message Date
Treehugger Robot
c957851584 Merge "Add INVALID_STATE to list of errors for when there is only one modem available" 2019-05-21 15:27:12 +00:00
Nazanin Bakhshi
8aadb38c74 Add INVALID_STATE to list of errors for when there is only one modem
available

Bug: b/132818184
Test: VTS
Change-Id: I2b57ab99a376bcab26012d08f00284d65f915bc3
Merged-In: I2b57ab99a376bcab26012d08f00284d65f915bc3
(cherry picked from commit 52b3503064)
2019-05-20 20:34:38 -07:00
Xin Li
4b6ac97b7d Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.190505.001) into master." 2019-05-17 00:58:07 +00:00
Treehugger Robot
877c7f5ce1 Merge "listByInterface -> listManifestByInterface" 2019-05-16 23:25:19 +00:00
Matthew Maurer
b397fc8e88 Merge "Allow INVALID_INPUT_LENGTH for oversized messages" 2019-05-16 19:06:39 +00:00
Youming Ye
bb560adb22 Merge "Add mnc and mcc string check" 2019-05-16 17:27:35 +00:00
Matthew Maurer
0ce3156f97 Merge "Use SHA_2_256 for importWrappedKey" 2019-05-16 16:43:54 +00:00
Xin Li
15226c1aaa DO NOT MERGE - Merge pie-platform-release (PPRL.190505.001) into master.
Bug: 132622481
Change-Id: I5b601bd068f74d604053a1e03bec7ee3f0268a64
2019-05-15 16:55:38 -07:00
Youming Ye
27227fd1b0 Add mnc and mcc string check
Use the same resolution as 1.0 to check for invalid mnc and mcc values.

Bug: 130206359
Test: Vts
Change-Id: Iff766014ecfbe2d77db6771eda04fd4d9c84df14
2019-05-15 16:35:40 -07:00
TreeHugger Robot
ee73a97b41 Merge "DO NOT MERGE - Merge pi-platform-release (PPRL.190505.001) into stage-aosp-master" into stage-aosp-master 2019-05-15 23:02:13 +00:00
Lev Proleev
e61b7b98c9 Fix LSTM documentation
The documentation said that cell-to-input weights are required to be
present when input-to-input weights, recurrent-to-input weights and
input gate bias are present. This was incorrect since this weights can
be omitted if peephole connections are not used even if all the other
tensors are present.

Another bug that is fixed in this change is that for output #0 the docs
said "of shape [batch_size, num_units * 4] with CIFG, or [batch_size,
num_units * 3] without CIFG" when in fact it is the opposite, i.e.  "of
shape [batch_size, num_units * 3] with CIFG, or [batch_size, num_units *
4] without CIFG."

Existing CTS/VTS tests expect behaviour described in the fixed documentation.
Existing CPU implementation is also compliant with the fixed documentation.

Fix: 111842951
Test: mma
Change-Id: Id011783e33672ae65dc6fe3784cb26feb832acf9
Merged-In: Id011783e33672ae65dc6fe3784cb26feb832acf9
(cherry picked from commit e0537f09fb)
2019-05-15 14:57:34 +01:00
Nazanin Bakhshi
1d4c50aa0f VTS: add NOT_SUPPORTED to enableModem
am: 7ce975d03e

Change-Id: I2f4432c3427ede21371cd3136c29501732d7a45f
2019-05-14 17:15:42 -07:00
Nazanin Bakhshi
7ce975d03e VTS: add NOT_SUPPORTED to enableModem
Bug: 130190479
Test: VTS
Change-Id: Ie5851929287f461f20ee6a7b979f15133755b2b3
Merged-In: Ie5851929287f461f20ee6a7b979f15133755b2b3
(cherry picked from commit 3b3ffacd25)
2019-05-14 15:17:19 -07:00
Xin Li
fef0cab5e9 DO NOT MERGE - Merge pi-platform-release (PPRL.190505.001) into stage-aosp-master
Bug: 132622481
Change-Id: Ie2af73fae9852849b11796bb1e77f0fc62c28ce2
2019-05-13 15:39:13 -07:00
Steven Moreland
6106299c4f listByInterface -> listManifestByInterface
This does two things:
- makes sure that HALs configured as lazy HALs will be retrieved
- will detect bad manifest entries earlier

Bug: 131703193
Test: boot
Change-Id: I82e10f49367b097023eb31797c877c15eedb5e00
2019-05-13 13:01:08 -07:00
Matthew Maurer
66f842ceec Allow INVALID_INPUT_LENGTH for oversized messages
In Keymaster 3, both INVALID_INPUT_LENGTH and INVALID_ARGUMENT were
acceptable for oversized messages. Keymaster 4 VTS requires that
INVALID_ARGUMENT be returned, but the spec has no such restriction. This
loosens VTS to allow either INVALID_INPUT_LENGTH or INVALID_ARGUMENT in
this case.

Bug: 129297054
Test: atest VtsHalKeymasterV4_0TargetTest Pixel 3, Trusty tests
2019-05-13 09:52:12 -07:00
Nathan Harold
b4c02291ef Use Widely Supported GSM Channels for NetworkScan
am: 2ea2a64bc7

Change-Id: I186648ee7bbe0493f524d4d8aabe32c2b8507b68
2019-05-10 17:19:16 -07:00
Nathan Harold
26bf375ca0 Revert "Use Widely Supported GSM Channels for NetworkScan"
am: e678690efa

Change-Id: Ieac13eb536f57a5438e9909b7f2b1cb7ad90435c
2019-05-10 17:19:04 -07:00
Matthew Maurer
41cb84029a Use SHA_2_256 for importWrappedKey
The spec requires that SHA1 not be allowed for wrapped keys and that
only SHA_2_256 be used. Unfortunately, the previous VTS required SHA1
support. This patch takes the middle ground by requiring SHA_2_256 be
supported for importWrappedKey, but not disallowing it from supporting
SHA1.

This makes it possible for a spec compliant keymaster to pass VTS
while not disqualifying shipped devices.

Bug: 129291873
Test: atest VtsHalKeymasterV4_0TargetTest:ImportWrappedKeyTest, Trusty
Change-Id: I6c3a9182b51f2e7a46173d5bfc34d3c3264d954f
2019-05-10 14:27:53 -07:00
Nathan Harold
2ea2a64bc7 Use Widely Supported GSM Channels for NetworkScan
Change the network scan tests to use the P900 and 850
GSM bands, which are commonly (nearly universally) supported
bands.

Bug: 132076611
Test: atest RadioHidlTest_v1_2
Change-Id: Ia682f022d35c481876c49c9c8802d7c39722be0e
2019-05-10 14:11:14 -07:00
Nathan Harold
e678690efa Revert "Use Widely Supported GSM Channels for NetworkScan"
This reverts commit 92bb3ae7b9.

There is an issue with the bands used for P900... the chosen
bands were for PCS1900. Quick fix coming.
2019-05-10 14:08:35 -07:00
Nathan Harold
5fc45aab2a Merge "Use Widely Supported GSM Channels for NetworkScan"
am: 6f337cc82b

Change-Id: I1360079d30035bca3f63caf5cbc79b4d2932f56a
2019-05-10 11:33:00 -07:00
Nathan Harold
6f337cc82b Merge "Use Widely Supported GSM Channels for NetworkScan" 2019-05-10 18:08:12 +00:00
Xusong Wang
8c10d3e5eb Add quant8 variant of VTS CompilationCachingTest.
am: 0e0721f56e

Change-Id: I0c6f0a4b93591a7fa96b94b807c5acd2b9bf998a
2019-05-09 20:29:55 -07:00
Xusong Wang
26c8d85822 Move getSupportedOperations out of saveToCache.
am: 4f71afc50d

Change-Id: Ib652171521ea4dcfd85615ce0651f997294eecdf
2019-05-09 20:29:42 -07:00
Xusong Wang
ab4f1d69b1 Test corrupted data cache in CompilationCachingTests.
am: e371f6f85e

Change-Id: I4f87bec370379476c2d1a7a96153026d042a29f8
2019-05-09 20:29:29 -07:00
Xusong Wang
59e137b32e Test TOCTOU in VTS CompilationCachingTests.
am: 7cc0cccf5d

Change-Id: I1498457783295a9f361fcf07b80ad91181961b7b
2019-05-09 20:29:16 -07:00
Hector Dearman
c37af25456 Merge "Fix log message enable -> disable"
am: 9cfe96f811

Change-Id: If7b1316d68efd1ab191a0ebe82d178346943f987
2019-05-09 20:14:36 -07:00
Nathan Harold
92bb3ae7b9 Use Widely Supported GSM Channels for NetworkScan
Change the network scan tests to use the P900 and 850
GSM bands, which are commonly (nearly universally) supported
bands.

Bug: 132076611
Test: atest RadioHidlTest_v1_2
Change-Id: Icb4dc47360a5753b9697f74aec19045155ee27fc
2019-05-09 18:45:23 -07:00
Xin Li
f413370527 [automerger skipped] Merge "DO NOT MERGE - Merge Pie Bonito/Sargo into master."
am: 9c7e33a790 -s ours
am skip reason: subject contains skip directive

Change-Id: I26b69f0edc8ee23c15db8b54049a8d412baf3ae0
2019-05-09 18:16:49 -07:00
Xin Li
9f1c779bd3 [automerger skipped] DO NOT MERGE - Merge Pie Bonito/Sargo into master.
am: 96a902d39b -s ours
am skip reason: subject contains skip directive

Change-Id: I0211b316ccaff106f5c8ccb802a4d7c679dbf556
2019-05-09 16:00:35 -07:00
Xusong Wang
0e0721f56e Add quant8 variant of VTS CompilationCachingTest.
Prior to this CL, the VTS compilation caching tests are using float32
models. However, there exists several drivers that only support QUANT8
operations, and most of the tests are simply skipped.

This CL makes the CompilationCachingTest fixture parameterized that
every test will run twice, with the first pass running with float32
models and the second pass running with quant8 models.

Bug: 132112463
Test: 1.2 VTS with sample drivers
Test: 1.2 VTS with test drivers that can read and write cache entries
Change-Id: Iaf28065e46c2d90ab8b347b9848be1e6546cce86
Merged-In: Iaf28065e46c2d90ab8b347b9848be1e6546cce86
(cherry picked from commit 35e7599eb2)
2019-05-09 15:45:35 -07:00
Xusong Wang
4f71afc50d Move getSupportedOperations out of saveToCache.
Before this change, getSupportedOperations_1_2 was invoked in
saveModelToCache prior to prepareModel_1_2, which delayed the model
preparation and cache overwriting always ran faster in
SaveToCache_TOCTOU test.

This change increases the chance that the model is overwritten after it
is saved in SaveToCache_TOCTOU test by moving getSupportedOperations_1_2
out of saveToCache.

Bug: 123433989
Test: VtsHalNeuralnetworksV1_xTargetTest with 1.2 sample driver
Test: VtsHalNeuralnetworksV1_xTargetTest with a test driver that can
      read and write cache entries
Test: TOCTOU tests with a sample driver that is deliberately broken

Change-Id: Ieba6a82252623ac429d5fcb6950b99db949f9886
Merged-In: Ieba6a82252623ac429d5fcb6950b99db949f9886
(cherry picked from commit f8c5987bbd)
2019-05-09 15:45:01 -07:00
Xusong Wang
e371f6f85e Test corrupted data cache in CompilationCachingTests.
We only expect the driver to not crash.

Bug: 123433989
Test: VtsHalNeuralnetworksV1_xTargetTest with 1.2 sample driver
Test: VtsHalNeuralnetworksV1_xTargetTest with a test driver that can
      read and write cache entries

Change-Id: Ic9bd7ad6e42d77d505955cb9dda597a39e95cdb6
Merged-In: Ic9bd7ad6e42d77d505955cb9dda597a39e95cdb6
(cherry picked from commit 83ab17f224)
2019-05-09 15:44:46 -07:00
Xusong Wang
7cc0cccf5d Test TOCTOU in VTS CompilationCachingTests.
Two tests are added into VTS:

1. The TOCTOU test, for a fixed number of iterations.

We try to attack the driver by replacing the model cache with another
cache entry from a similar model while the driver is saving to or
preparing from cache, and see if the driver crashes or falsely prepares
an unexpected model (by checking the execution result). Either of the
following results are acceptable

* Fails -> the driver detects this corruption.
* Succeeds and produces correct execution result -> the corruption
happens before saving to cache or after preparing from cache.

Due to the racy nature, this test is probabilistic and we run it several
times.

2. Similar to the TOCTOU test but replace the content between
compile-to-cache and compile-from-cache (once only).

Additionally, remove tmp cache directory if test succeeds.

Bug: 123433989
Test: VtsHalNeuralnetworksV1_xTargetTest with 1.2 sample driver
Test: VtsHalNeuralnetworksV1_xTargetTest with a test driver that can
      read and write cache entries
Test: Check /data/local/tmp and confirm that
      * dirs are preserved on failure
      * dirs are removed on success

Change-Id: Ie04fa905f465c3775979f0ca74359d185dcacea9
Merged-In: Ie04fa905f465c3775979f0ca74359d185dcacea9
(cherry picked from commit a44e130a92)
2019-05-09 15:44:28 -07:00
Treehugger Robot
9cfe96f811 Merge "Fix log message enable -> disable" 2019-05-09 22:07:07 +00:00
Xin Li
9c7e33a790 Merge "DO NOT MERGE - Merge Pie Bonito/Sargo into master." 2019-05-09 22:05:44 +00:00
Janis Danisevskis
3b8bae3554 Verify mac change on time stamp change
am: 33d75d090b

Change-Id: I00092609f97d985d203ca5df6987a05fa9b0ae6c
2019-05-09 14:32:42 -07:00
Janis Danisevskis
33d75d090b Verify mac change on time stamp change
This test verifies that verification tokens with different time stamps do
not have the same MAC. This may not guarantee that the MAC is computed
correctly but it catches implementation that do not include the time
stamp in the mac.

It also checks that the MAC changes when both time stamp and challenge
changes.

Test: yes it is
Bug: 131859731
Bug: 132288466
Bug: 132287277
Change-Id: I85aa1d873eff46df7a66fc69bd61a031e6e6fbe0
2019-05-09 12:50:11 -07:00
Xin Li
96a902d39b DO NOT MERGE - Merge Pie Bonito/Sargo into master.
Bug: 131756210
Change-Id: If3ec9b205607bf7a6939030ee02489ce66c99c5a
2019-05-09 09:27:04 -07:00
Michael Butler
d128dc15c1 Follow up CL to "Add validation tests for NNAPI Burst serialized format"
am: 353a624bd4

Change-Id: Ia73cd893c5b76957fcf74343649704fc2f8f2c1c
2019-05-08 18:53:11 -07:00
Michael Butler
d496c3481e Add validation tests for NNAPI Burst serialized format
am: d6e38fd71b

Change-Id: If0b61fbc9c6501f0df14bc549a51ec97aeb0ee08
2019-05-08 18:51:33 -07:00
Michael Butler
353a624bd4 Follow up CL to "Add validation tests for NNAPI Burst serialized format"
Bug: 129779280
Bug: 129157135
Test: mma
Test: atest NeuralNetworksTest_static
Test: atest VtsHalNeuralnetworksV1_0TargetTest (with sample-all)
Test: atest VtsHalNeuralnetworksV1_1TargetTest (with sample-all)
Test: atest VtsHalNeuralnetworksV1_2TargetTest (with sample-all)
Change-Id: I6bd088f01c051a76561c0ecf9bbf878bb21c5754
Merged-In: I6bd088f01c051a76561c0ecf9bbf878bb21c5754
(cherry picked from commit 0a1ad962bb)
2019-05-08 22:46:10 +00:00
Michael Butler
d6e38fd71b Add validation tests for NNAPI Burst serialized format
This CL adds the following two types of validation tests on the NNAPI
Burst serialized format:
(1) it directly modifies the serialized data (invalidating it) to ensure
    that vendor  driver services properly validates the serialized
    request
(2) it ensures that vendor driver services properly fail when the result
    channel is not large enough to return the data

This CL additionally includes miscellaneous cleanups:
(1) having a generic "validateEverything" function
(2) moving the "prepareModel" function that's common across
    validateRequest and validateBurst to a common area

Fixes: 129779280
Bug: 129157135
Test: mma
Test: VtsHalNeuralnetworksV1_2TargetTest (with sample-all)
Change-Id: Ib90fe7f662824de17db5a254a8c501855e45f6bd
Merged-In: Ib90fe7f662824de17db5a254a8c501855e45f6bd
(cherry picked from commit 20f28a24e9)
2019-05-08 22:40:22 +00:00
Slava Shklyaev
6bde1ee91f Document that quantized PAD behavior is undefined before NNAPI 1.2
am: cc0b0d4509

Change-Id: Icc2649dc9e36844ee43bccb1936c6cc1d3af3666
2019-05-08 10:49:05 -07:00
Miao Wang
012e69378b Fix the order of width and height for NNAPI RESIZE_BILINEAR and RESIZE_NEAREST_NEIGHBOR
am: 9bfecb5591

Change-Id: If60c67b876772db13653af655e87a026306f0fb1
2019-05-08 10:48:40 -07:00
Slava Shklyaev
cc0b0d4509 Document that quantized PAD behavior is undefined before NNAPI 1.2
We had no tests for quantized PAD in NNAPI 1.1 and think that vendors might have implemented different behaviors.

Bug: 122243484
Test: N/A
Change-Id: Ibfc0801ab746fc271dc5f8efc764b818c6d49df4
Merged-In: Ibfc0801ab746fc271dc5f8efc764b818c6d49df4
(cherry picked from commit b01ce9644e)
2019-05-08 15:34:41 +01:00
Miao Wang
9bfecb5591 Fix the order of width and height for NNAPI RESIZE_BILINEAR and
RESIZE_NEAREST_NEIGHBOR

  - The CPU implementation always had the order of {width, height}.
  - In P, the documentation was incorrectly changed to {height, width}.

Bug: 131623949
Bug: 130035110
Test: mm
Change-Id: I6c79459fa73347fb51fc34a76ad78d5ac207f210
Merged-In: I6c79459fa73347fb51fc34a76ad78d5ac207f210
(cherry picked from commit 286339b4c8)
2019-05-08 15:33:55 +01:00
android-build-team Robot
1d3a299feb Snap for 5450365 from b18f050a4e to pi-platform-release
Change-Id: Iaccfbbd561c96fec76db472976afc68dc909d9b1
2019-05-07 21:42:43 +00:00
Janis Danisevskis
7daf7da188 Keymaster support: Verbose vendor errors
am: 3414222e3a

Change-Id: I86f5a241d7e9fdbd6f306f3c711004c8b6aa8a56
2019-05-06 16:46:44 -07:00