Commit graph

12778 commits

Author SHA1 Message Date
Nathan Harold
6f337cc82b Merge "Use Widely Supported GSM Channels for NetworkScan" 2019-05-10 18:08:12 +00: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
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
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
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
Janis Danisevskis
7daf7da188 Keymaster support: Verbose vendor errors
am: 3414222e3a

Change-Id: I86f5a241d7e9fdbd6f306f3c711004c8b6aa8a56
2019-05-06 16:46:44 -07:00
Janis Danisevskis
3414222e3a Keymaster support: Verbose vendor errors
Added function for verbosely logging Keymaster vendor errors.

Bug: 123562864
Test: atest android.keystore.cts
Merged-In: Ida093941d3b76b3d2e953439229081345909c16b
Change-Id: Ida093941d3b76b3d2e953439229081345909c16b
2019-05-03 16:04:02 -07:00
Jack Yu
46873071bb Update nfc@1.1 to nfc@1.2
am: e573c8a46c

Change-Id: Ib50ecaf4d369c9216c79156d1bc3adbd23ab0b6d
2019-05-02 04:16:12 -07:00
Jack Yu
e573c8a46c Update nfc@1.1 to nfc@1.2
Test: Manual
Bug: 129732996
Change-Id: Id7daa539208668727b4d18b9c032c5b68b422afd
Merged-In: Ieaef96a228c8410f8c84aae89a36ac8e494eca68
2019-05-02 08:48:28 +00:00
Steven Moreland
0ce1e109dd soundtrigger: remove '/*' in comment.
am: 48f0efb302

Change-Id: I1698b9bb0d979af51369720fcc166eee60c7fbef
2019-04-29 17:11:41 -07:00
Steven Moreland
48f0efb302 soundtrigger: remove '/*' in comment.
This is causing C++ compiles of this interface to fail now that these
comments get copied into the output.

Bug: 130911129
Test: compilation now succeeds
Change-Id: Iaa3877620b032b7144e3bab114fbcd1e1483bc8e
2019-04-29 14:22:13 -07:00
Slava Shklyaev
4e8fa9ac6e Specify ranks supported by MAXIMUM and MINIMUM
am: 2331d7588e

Change-Id: I188b39565713a04219d60c8b6902054c0d4d52cb
2019-04-29 11:39:23 -07:00
Slava Shklyaev
2331d7588e Specify ranks supported by MAXIMUM and MINIMUM
Note that this change documents existing behavior.

Bug: 131210955
Test: mma
Change-Id: I8d877153e1acc8ca2ad5179d7fd7cdc136838ca3
Merged-In: I8d877153e1acc8ca2ad5179d7fd7cdc136838ca3
(cherry picked from commit 6e15578156)
2019-04-26 15:34:31 +01:00
Lev Proleev
055f5d6a12 Fix docs: clarify usage of float16 scalars in operations
am: 0a9895d9b7

Change-Id: Ibd44c81816bef2eae78ae6405c01605aed58055b
2019-04-25 10:26:10 -07:00
Slava Shklyaev
0f00cb6864 Clarify NNAPI documentation for MEAN
am: 16a5cb1947

Change-Id: I42ab01419be4ca801e870d3cae23a82aa12a8b3c
2019-04-25 10:25:47 -07:00
Slava Shklyaev
87f3059549 Clarify NNAPI documentation for RESHAPE
am: e19c19113d

Change-Id: If91949fe9d2cdc59672be625014bc8f4331fb245
2019-04-25 10:23:45 -07:00
Lev Proleev
0a9895d9b7 Fix docs: clarify usage of float16 scalars in operations
Update the docs for ops:
- LOG_SOFTMAX
- LOCAL_RESPONSE_NORMALIZATION

The docs mentioned possibility to use float16 as an input type but
didn't specify that other inputs must be float16 as well in that case.

Fix: 123500722
Test: mma
Change-Id: I9028c4a109c80f0b8571fab45555818e9e4bc783
Merged-In: I9028c4a109c80f0b8571fab45555818e9e4bc783
(cherry picked from commit 6d13ba258b)
2019-04-24 13:55:25 +01:00
Slava Shklyaev
16a5cb1947 Clarify NNAPI documentation for MEAN
Bug: 113673389
Test: mma
Change-Id: Icd1ce2fb9054ab9ac6f660dce84823c73563ddb8
Merged-In: Icd1ce2fb9054ab9ac6f660dce84823c73563ddb8
(cherry picked from commit d6e605985b)
2019-04-24 13:55:17 +01:00
Slava Shklyaev
e19c19113d Clarify NNAPI documentation for RESHAPE
Bug: 117176461
Test: mma
Change-Id: I620873536ed99ac79b7eced286a8f2621524290b
Merged-In: I620873536ed99ac79b7eced286a8f2621524290b
(cherry picked from commit 5f5d5f9a54)
2019-04-24 13:55:11 +01:00
Yifan Hong
c9e9180f75 power@1.3 is for P.
am: b25507df4b

Change-Id: I04d2ffafc587d6a4e57441318678757fec75e2d3
2019-04-23 16:08:58 -07:00
Yifan Hong
b25507df4b power@1.3 is for P.
Bug: 131162402
Test: dump_hals_for_release.py *.txt
Change-Id: If2e02f1a867e5d3f634b6b578b860d814fdbcb26
2019-04-23 12:51:21 -07:00
Shawn Willden
dff8dd72a3 Correct IKeymasterDevice documentation.
am: 744a37115a

Change-Id: I9f7ae4efef89723a7200d9fbd72ee0e3e0cd2954
2019-04-23 11:23:31 -07:00
Shawn Willden
744a37115a Correct IKeymasterDevice documentation.
Bug: 129931913
Bug: 130144003
Test: ./update-makefiles.sh (checks hashes)
Change-Id: Ia8101f8410a728b28653416300c1a3eb480eb469
2019-04-19 00:59:01 +00:00
Pirama Arumuga Nainar
c1ac036a8c Merge "Re-enable asan for *VtsHalNeuralnetworksV1_0Test"
am: 8e0b1c09b8

Change-Id: Id2745fd81aac94c7b498efea57d1bb6a3a71345c
2019-04-18 14:29:12 -07:00
Pirama Arumuga Nainar
8e0b1c09b8 Merge "Re-enable asan for *VtsHalNeuralnetworksV1_0Test" 2019-04-18 21:22:18 +00:00
Steven Moreland
96f40f7b02 Merge "Update hidl makefiles for bpfmt"
am: ff0bd741ca

Change-Id: Icd0e90c12952f2471416986451cce7eebb6856af
2019-04-18 14:21:43 -07:00
Steven Moreland
ff0bd741ca Merge "Update hidl makefiles for bpfmt" 2019-04-18 20:59:48 +00:00
Yifan Hong
89511ce61c Rename kernel config modules from current to Q.
am: 18cb552a97

Change-Id: I38592934fc8205d05609001c3c95af17d164bf7f
2019-04-18 11:52:53 -07:00
Pirama Arumuga Nainar
43562bdd74 Re-enable asan for *VtsHalNeuralnetworksV1_0Test
Bug: http://b/74200014

This is no longer broken after switching to lld.

Test: mmma SANITIZE_TARGET=address
hardware/interfaces/neuralnetworks/1.0/vts/functional

Change-Id: I0920da7db83222d089c7a571e9478fb7ad9ad9d4
2019-04-18 11:34:12 -07:00
Yifan Hong
18cb552a97 Rename kernel config modules from current to Q.
Test: builds
Bug: 130295628
Change-Id: I4f519d9c67a983df15423f556ecc68586c6a100b
Merged-In: I4f519d9c67a983df15423f556ecc68586c6a100b
2019-04-17 22:56:37 +00:00
Steven Moreland
1fdb6477f7 Merge "Compatibility_matrix: s/current/4/"
am: 6d312e23e6

Change-Id: Idbce32a888fab4b8b7f63623eefba96781c7b47f
2019-04-17 11:38:56 -07:00
Treehugger Robot
6d312e23e6 Merge "Compatibility_matrix: s/current/4/" 2019-04-17 18:15:25 +00:00
Michael Butler
1c8a8bed76 Fix IBurstCallback.hal typo
am: a1707a6b58

Change-Id: I252c3be6364893cd9266b1add9215342eb3117ea
2019-04-17 11:06:23 -07:00
Steven Moreland
c97df8c3a4 Merge "current.txt: empty section for changes in release"
am: 038a7160b9

Change-Id: I3859ef8c2e88b080aa9bc739e23ba1c97eb2a90d
2019-04-17 11:05:03 -07:00
Steven Moreland
cbbc8016a8 Merge "Remove bluetooth.a2dp from matrix as deprecated HAL"
am: c95ca1b9d2

Change-Id: I60a7596734f13105039f5768547f5fc101cbd683
2019-04-17 10:38:09 -07:00
Michael Butler
a1707a6b58 Fix IBurstCallback.hal typo
Test: mma
Bug: N/A
Change-Id: If753c6618c31a11672c4449f798fb57aa4bb7831
Merged-In: If753c6618c31a11672c4449f798fb57aa4bb7831
(cherry picked from commit f1ca6754a8)
(cherry picked from commit 24f9c4aa3f4e85d375da5e7df90b54bdf938b481)
2019-04-17 17:37:30 +00:00
Steven Moreland
038a7160b9 Merge "current.txt: empty section for changes in release" 2019-04-17 17:31:10 +00:00
Steven Moreland
52f5560d61 Compatibility_matrix: s/current/4/
To indicate frozen state/development shouldn't occur here.

Bug: 126892442
Test: TH (build checks compatibility matrices)
Change-Id: I3daf93d750462bf7dcb698a353801bc55a459d45
(cherry picked from commit 86eb7fc62b)
Merged-In: I3daf93d750462bf7dcb698a353801bc55a459d45
2019-04-17 10:24:57 -07:00
Steven Moreland
c95ca1b9d2 Merge "Remove bluetooth.a2dp from matrix as deprecated HAL" 2019-04-17 17:24:29 +00:00