[fuzz] process pending tasklets to increase coverage (#3617)

This commit is contained in:
Jonathan Hui
2019-02-22 09:00:23 -08:00
committed by GitHub
parent b7a9e7afd7
commit 3eb5a106ff
4 changed files with 24 additions and 0 deletions
+6
View File
@@ -33,6 +33,7 @@
#include <openthread/instance.h>
#include <openthread/ip6.h>
#include <openthread/link.h>
#include <openthread/tasklet.h>
#include <openthread/thread.h>
#include <openthread/thread_ftd.h>
#include <openthread/platform/uart.h>
@@ -65,6 +66,11 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
otPlatUartReceived(buf, (uint16_t)size);
while (otTaskletsArePending(instance))
{
otTaskletsProcess(instance);
}
exit:
if (buf != NULL)