summaryrefslogtreecommitdiff
path: root/fuzz
diff options
context:
space:
mode:
Diffstat (limited to 'fuzz')
-rw-r--r--fuzz/host_command_fuzz.c4
-rw-r--r--fuzz/usb_pd_fuzz.c9
2 files changed, 6 insertions, 7 deletions
diff --git a/fuzz/host_command_fuzz.c b/fuzz/host_command_fuzz.c
index c4f49c9525..4ca94ff616 100644
--- a/fuzz/host_command_fuzz.c
+++ b/fuzz/host_command_fuzz.c
@@ -34,7 +34,7 @@ static struct ec_host_request *req = (struct ec_host_request *)req_buf;
static void hostcmd_respond(struct host_packet *pkt)
{
- task_set_event(TASK_ID_TEST_RUNNER, TASK_EVENT_HOSTCMD_DONE, 0);
+ task_set_event(TASK_ID_TEST_RUNNER, TASK_EVENT_HOSTCMD_DONE);
}
static char calculate_checksum(const char *buf, int size)
@@ -151,7 +151,7 @@ int test_fuzz_one_input(const uint8_t *data, unsigned int size)
if (hostcmd_fill(data, size) < 0)
return 0;
- task_set_event(TASK_ID_TEST_RUNNER, TASK_EVENT_FUZZ, 0);
+ task_set_event(TASK_ID_TEST_RUNNER, TASK_EVENT_FUZZ);
pthread_cond_wait(&done_cond, &lock);
#ifdef VALID_REQUEST_ONLY
diff --git a/fuzz/usb_pd_fuzz.c b/fuzz/usb_pd_fuzz.c
index 54b138e03c..777a86d592 100644
--- a/fuzz/usb_pd_fuzz.c
+++ b/fuzz/usb_pd_fuzz.c
@@ -114,7 +114,7 @@ int tcpm_enqueue_message(const int port)
pending = 1;
/* Wake PD task up so it can process incoming RX messages */
- task_set_event(PD_PORT_TO_TASK_ID(port), TASK_EVENT_WAKE, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), TASK_EVENT_WAKE);
return EC_SUCCESS;
}
@@ -175,14 +175,13 @@ void run_test(int argc, char **argv)
memset(&mock_tcpc_state[port],
0, sizeof(mock_tcpc_state[port]));
- task_set_event(PD_PORT_TO_TASK_ID(port),
- PD_EVENT_TCPC_RESET, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_TCPC_RESET);
task_wait_event(250 * MSEC);
mock_tcpc_state[port].cc1 = next_cc1;
mock_tcpc_state[port].cc2 = next_cc2;
- task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC);
task_wait_event(50 * MSEC);
/* Fake RX messages, one by one. */
@@ -234,7 +233,7 @@ int test_fuzz_one_input(const uint8_t *data, unsigned int size)
return 0;
}
- task_set_event(TASK_ID_TEST_RUNNER, TASK_EVENT_FUZZ, 0);
+ task_set_event(TASK_ID_TEST_RUNNER, TASK_EVENT_FUZZ);
pthread_cond_wait(&done_cond, &lock);
return 0;