summaryrefslogtreecommitdiff
path: root/fuzz/usb_pd_fuzz.tasklist
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 /fuzz/usb_pd_fuzz.tasklist
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 'fuzz/usb_pd_fuzz.tasklist')
-rw-r--r--fuzz/usb_pd_fuzz.tasklist19
1 files changed, 19 insertions, 0 deletions
diff --git a/fuzz/usb_pd_fuzz.tasklist b/fuzz/usb_pd_fuzz.tasklist
new file mode 100644
index 0000000000..3d7a91254b
--- /dev/null
+++ b/fuzz/usb_pd_fuzz.tasklist
@@ -0,0 +1,19 @@
+/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/**
+ * List of enabled tasks in the priority order
+ *
+ * The first one has the lowest priority.
+ *
+ * For each task, use the macro TASK_TEST(n, r, d, s) where :
+ * 'n' in the name of the task
+ * 'r' in the main routine of the task
+ * 'd' in an opaque parameter passed to the routine at startup
+ * 's' is the stack size in bytes; must be a multiple of 8
+ */
+#define CONFIG_TEST_TASK_LIST \
+ TASK_TEST(PD_C0, pd_task, NULL, LARGER_TASK_STACK_SIZE) \
+ TASK_TEST(PD_C1, pd_task, NULL, LARGER_TASK_STACK_SIZE)