summaryrefslogtreecommitdiff
path: root/core/host/main.c
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2018-06-26 10:38:07 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-12-05 01:13:38 -0800
commitd2602418362812f8970616b4dc708d8847291df9 (patch)
tree358a4d978da34859ffa284002f79e9129c6569be /core/host/main.c
parent45b4bec661a2504ef030104903d3b526b5efafa2 (diff)
downloadchrome-ec-d2602418362812f8970616b4dc708d8847291df9.tar.gz
test/usb_pd_fuzz: Fuzzing of USB PD data
Setup CC lines, then send up to 8 PD messages, in an attempt to cause errors while parsing PDO and other messages. BRANCH=none BUG=chromium:854975 TEST=make -j buildfuzztests && \ ./build/host/usb_pd_fuzz/usb_pd_fuzz.exe > /dev/null Change-Id: Ibb575ea8d464945390d1663dd6fff279bd9d77ea Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1116626 Reviewed-by: Jonathan Metzman <metzman@chromium.org>
Diffstat (limited to 'core/host/main.c')
-rw-r--r--core/host/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/host/main.c b/core/host/main.c
index 45cfbfdfb4..822ca460e1 100644
--- a/core/host/main.c
+++ b/core/host/main.c
@@ -93,6 +93,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
initialized = 1;
/* We can't sleep yet, busy loop waiting for tasks to start. */
wait_for_task_started_nosleep();
+ /* Let tasks settle. */
+ msleep(50 * MSEC);
}
return test_fuzz_one_input(data, size);