Commit graph

14929 commits

Author SHA1 Message Date
Roshan Pius
8236850bc0 wifi(implementation): Invalidate NAN iface on STA iface removal
NAN iface/RTT controllers are sharing the STA iface. When a STA iface is
removed, we should remove these dependent modules as well to ensure
proper cleanup.

Bug: 132837537
Test: ./hardware/interfaces/wifi/1.3/default/tests/runtests.sh
Test: Will send for regression tests.
Change-Id: Ia2da1dcf66b388f54e916ae69e2f4e26f20ecfad
2019-05-17 15:23:09 -07:00
Michael Butler
e84f442c4c Merge "Follow up CL to "Add validation tests for NNAPI Burst serialized format"" into qt-dev 2019-05-08 21:04:12 +00:00
TreeHugger Robot
881e261f0e Merge "Fix LSTM documentation" into qt-dev 2019-05-08 20:17:28 +00:00
Peiyong Lin
248f72a9a0 Merge "Return display capability if getDisplayBrightnessSupport is not registered." into qt-dev 2019-05-08 17:59:55 +00:00
Jeff Tinker
a51399ef5f Merge "Add status for license starting in the future" into qt-dev 2019-05-08 17:17:43 +00:00
Lev Proleev
e0537f09fb 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
2019-05-08 17:28:53 +01:00
TreeHugger Robot
767a57fb19 Merge "Fix getDisplayCapabilitiesBasic VTS test" into qt-dev 2019-05-08 03:17:43 +00:00
Robert Shih
31703179a5 Add status for license starting in the future
Bug:116738851
Test: vts-tradefed run commandAndExit -m VtsHalDrmV1_2Target
Change-Id: Id5017e3ffa1fcf5aaad1815b59a425ac63f2e53e
2019-05-08 00:52:01 +00:00
TreeHugger Robot
34f36713bf Merge "Fix setLayerCursorPosition test" into qt-dev 2019-05-07 23:07:29 +00:00
Michael Butler
0a1ad962bb 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
2019-05-07 15:45:48 -07:00
Valerie Hau
185d7a4b1f Fix setLayerCursorPosition test
Set composition type to Cursor

Bug: 132057336, 131181758
Test: VtsHalGraphicsComposerV2_1TargetTest
Change-Id: I03ae799358abcdbd0a1c39a13d30d76aa7712004
2019-05-07 12:35:49 -07:00
Valerie Hau
3da7baee06 Merge "Fix setLayerCursorPosition Test" into qt-dev 2019-05-07 19:10:24 +00:00
Valerie Hau
804857176a Fix getDisplayCapabilitiesBasic VTS test
Old test checked error code when calling getBrightnessSupport in the
getDisplayCapabilitiesBasic test.  However, it is possible that the
function is not implemented (UNSUPPORTED).  We want to return normally
and use the returned supported boolean to check this instead.

Bug: 132043561, 132056857
Test: VtsHalGraphicsComposerV2_3TargetTest
Change-Id: I94f8f39ba9129c4a8d939a5385538db3489c46b9
2019-05-07 11:52:27 -07:00
Michael Butler
2cd02a4121 Merge "NNAPI: validate that FmqResultDatum padding is 0 -- VTS" into qt-dev 2019-05-07 18:52:13 +00:00
Michael Butler
ddb770f0e4 NNAPI: validate that FmqResultDatum padding is 0 -- VTS
FmqResultDatum::OperandInformation has padding that may not be
initialized by an NN HAL service instance. This CL adds a validation
check to ensure that services are not leaking uninitialized data through
this padding region.

Bug: 131356202
Test: mma
Test: atest VtsHalNeuralnetworksV1_2TargetTest
      (for ValidationTest with sample-all)
Test: altered sample-driver to randomly set a padding byte to 1;
      the new validation test successfully failed the test

Change-Id: I6661945392b3fc773493d8f2f306f29b39e09bab
2019-05-07 18:42:47 +00:00
Valerie Hau
efe7621dac Fix setLayerCursorPosition Test
Bug: 131181758
Test: build, boot, VtsHalGraphicsComposerV2_1TargetTest
Change-Id: I70f4f8f64c16ce45eba70c2e47d3fa2913034eba
2019-05-07 08:06:05 -07:00
Anil Admal
e5289f618c Merge "Fix wait/notify logic in GNSS VTS 2.0 test cases (part 2)" into qt-dev 2019-05-07 01:06:57 +00:00
Anil Admal
2690a27d8d Fix wait/notify logic in GNSS VTS 2.0 test cases (part 2)
Addresses follow up code review comments after merge of ag/7324643.

Fixes: 131869042
Test: atest VtsHalGnssV2_0TargetTest
Change-Id: I0177ee60c5edfb6855ce6a1d45b8805166a33cf2
2019-05-06 12:09:57 -07:00
Valerie Hau
85b557fd1a Merge "Call into validateBufferSize and getTransportSize" into qt-dev 2019-05-06 16:11:34 +00:00
Anil Admal
5f6334036f Merge "Fix wait/notify logic in GNSS VTS 2.0 test cases" into qt-dev 2019-05-05 02:41:13 +00:00
Anil Admal
7f9c13e198 Fix wait/notify logic in GNSS VTS 2.0 test cases
Fixes: 131869042
Test: atest VtsHalGnssV2_0TargetTest
Change-Id: I6fe5713c0f1d329f2738a2d4ba4a7d5aa58efec9
2019-05-03 17:31:20 -07:00
TreeHugger Robot
282c8d0694 Merge "Make test expectation match comment" into qt-dev 2019-05-03 19:26:25 +00:00
Anil Admal
bb477b95ad Merge "Update GNSS VTS 2.0 tests to address sub-HAL support requirements" into qt-dev 2019-05-03 04:26:24 +00:00
Anil Admal
62d2ca7687 Update GNSS VTS 2.0 tests to address sub-HAL support requirements
- IGnssConfiguration.hal@2.0 must be supported.
- If IAGnss.hal is supported, it must be at IAGnss.hal@2.0
- If IAGnssRil.hal is supported, it must be at IAGnssRil.hal@2.0
- gnss.visibility_control sub-HAL is optional
- gnss.measurement_corrections sub HAL is optional.
- IGnssBatching.hal@2.0 support is optional.

Bug: 70978505
Test: atest VtsHalGnssV2_0TargetTest
Change-Id: Icf98c13ef32bdea7dafda8f79b685466712b16b6
2019-05-02 13:52:53 -07:00
TreeHugger Robot
7af01ada85 Merge "Document that quantized PAD behavior is undefined before NNAPI 1.2" into qt-dev 2019-05-02 10:13:28 +00:00
Peiyong Lin
0686afa15a Return display capability if getDisplayBrightnessSupport is not registered.
If getDisplayBrightnessSupport is not registered, there are two possibilities,
one is it's not supported at all, the other is that the support is returned in
getDisplayCapabilities. And thus we need to check getDisplayCapabilities, and
we return UNSUPPORTED always in this case. This patch also allows
getPerFrameMetadataKeys to return UNSUPPORTED on non-HDR capable devices.

BUG: 131595097
Test: Build, boot.
Change-Id: Ied302b1ac702dd94e039f1081d5420395c1bfbf4
2019-05-01 16:58:13 -07:00
Garret Kelly
d47288dde5 Make test expectation match comment
The BOOT_PATCHLEVEL value is allowed to have 00 in the days position
according to the keymaster specification.  This test's comment already
suggests that it's allowed, so update the expectation to match.

Test: VtsHalKeymasterV4_0TargetTest
Bug: 130843899
Change-Id: Ib43da43b2e0398b48fb59710bf4066f2641de2eb
2019-05-01 15:18:38 -04:00
Steven Moreland
d64f48a504 Merge "Add dep to ...broadcastradio@common-utils-2x-tests" into qt-dev 2019-05-01 01:21:46 +00:00
Anil Admal
11ae50dcc2 Merge "Enforce launched-in-Q devices support gnss@2.0 HAL package (hal)" into qt-dev 2019-05-01 00:21:49 +00:00
Slava Shklyaev
b01ce9644e 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
2019-04-30 15:27:53 +01:00
Michael Butler
ef85db2b65 Merge "Add validation tests for NNAPI Burst serialized format" into qt-dev 2019-04-30 03:58:12 +00:00
TreeHugger Robot
e867be8b40 Merge "Fix the order of width and height for NNAPI RESIZE_BILINEAR and RESIZE_NEAREST_NEIGHBOR" into qt-dev 2019-04-30 03:23:31 +00:00
Miao Wang
286339b4c8 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
2019-04-30 00:06:17 +00:00
Michael Butler
20f28a24e9 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
2019-04-29 23:56:48 +00:00
Xusong Wang
3ca195bf02 Merge "Move getSupportedOperations out of saveToCache." into qt-dev 2019-04-29 23:41:42 +00:00
Xusong Wang
f8c5987bbd 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
2019-04-29 11:47:54 -07:00
TreeHugger Robot
70e106d961 Merge "External Camera: support less thumbnail sizes" into qt-dev 2019-04-29 17:33:11 +00:00
Xusong Wang
83ab17f224 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
2019-04-26 15:35:03 -07:00
Xusong Wang
a44e130a92 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
2019-04-26 15:35:03 -07:00
Anil Admal
e640a420af Enforce launched-in-Q devices support gnss@2.0 HAL package (hal)
Bug: 121287858
Test: atest VtsTrebleVendorVintfTest
Change-Id: I45d7f3b6c8353141922724df23780d42df870413
2019-04-26 15:12:37 -07:00
Steven Moreland
24621daf45 Add dep to ...broadcastradio@common-utils-2x-tests
Required now because iterators use the base hidl_vec constructor.

It's not expected this type of change would be needed in any places.
This test originally came with the introduction of the constructor
that created the hidl_vec.

Bug: 131356202
Test: build only, links (note b/130918604)
Change-Id: Ide3cb13b6afd79489c208af2396e7c02b7da436e
Merged-In: Ide3cb13b6afd79489c208af2396e7c02b7da436e
2019-04-26 11:31:18 -07:00
TreeHugger Robot
8d161a678b Merge "Add BGRA8888 format support." into qt-dev 2019-04-26 17:38:39 +00:00
Michael Dooley
4ee2bc31a4 Merge "Hooking up Hal Soundtrigger V2_2 VTS test" into qt-dev 2019-04-26 05:33:09 +00:00
Yin-Chia Yeh
0d540b3e75 External Camera: support less thumbnail sizes
Since larger thumbnail sizes might hit the app1 size limit
of 64KB.

Test: camera CTS
Bug: 119775355
Change-Id: I9d8d21ac0784c53b42c536cfa09a8c40c4f15ea0
2019-04-25 14:55:22 -07:00
TreeHugger Robot
a8a23aa389 Merge "Fix comparison between hex and binary values" into qt-dev 2019-04-25 19:12:17 +00:00
mike dooley
93e4a086db Hooking up Hal Soundtrigger V2_2 VTS test
Bug: 117309670
Test: vts-tradefed run commandAndExit vts -m VtsHalSoundtriggerV2_2Target
Change-Id: Id320d15a39a6a22cbbcdb00b3b4658d690ab1fe0
2019-04-25 15:49:25 +02:00
Slava Shklyaev
6e15578156 Specify ranks supported by MAXIMUM and MINIMUM
Note that this change documents existing behavior.

Bug: 131210955
Test: mma
Change-Id: I8d877153e1acc8ca2ad5179d7fd7cdc136838ca3
2019-04-25 10:42:43 +00:00
Valerie Hau
8e3fe149e1 Call into validateBufferSize and getTransportSize
After adding validateBufferSize and getTransportSize,
call into these functions if they have been implemented

This reverts commit 5e01b1411a.
Reason for revert: Merge once targets w/ gralloc0 dependency have been updated

Bug: 130669566
Test: build, boot
Change-Id: Ic20a62c5e73f517028a358548442d59c9cf91cdf
2019-04-24 21:46:01 +00:00
Garret Kelly
ebfdba67d2 Fix comparison between hex and binary values
The verified boot hash in the attestation record is a binary blob, while
the property read from the system is a hex-encoded value.  Convert the
boot hash from the attestation record into hex before comparing.

Test: VtsHalKeymasterV4_0TargetTest
Bug: 130843899
Change-Id: I6f6e0da71501d741dd8b27d0778e1854af17ace6
2019-04-24 17:39:57 -04:00
Steven Moreland
3129bda396 Merge "Remove wifi.offload from Q compat matrix." into qt-dev 2019-04-24 01:10:43 +00:00