summaryrefslogtreecommitdiff
path: root/camera/common/1.0/default/CameraModule.cpp
diff options
context:
space:
mode:
authorXusong Wang <xusongw@google.com>2019-04-23 14:28:17 -0700
committerXusong Wang <xusongw@google.com>2019-05-09 15:44:28 -0700
commit7cc0cccf5db241498f07a0926b02d6ace75dcc9a (patch)
treec1cf0325548a840ba0bf8cf4df942a8d43f5227f /camera/common/1.0/default/CameraModule.cpp
parent9cfe96f81121b30cf715e88f72e042331cefb235 (diff)
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 a44e130a92d1e897a6ac075affa2564021edd22d)
Diffstat (limited to 'camera/common/1.0/default/CameraModule.cpp')
0 files changed, 0 insertions, 0 deletions