lwip: Update AFL host test mock

This commit updates and refactors the AFL host test mock as follows:
- Isolates the mock so that it only relies on lwip component and linux stdlib headers
- Grouped all mock functions in 'esp32_mock.h/c'
- Updates the lwip esp32 port files to include 'esp32_mock.h' when building for linux
- Use host stdlib headers instead of xtensa stdlib headers
This commit is contained in:
Darian Leung
2022-04-28 23:04:07 +08:00
parent 4e4f20d82a
commit e08d574a5d
7 changed files with 303 additions and 191 deletions

View File

@@ -33,11 +33,14 @@
#ifndef __SYS_ARCH_H__
#define __SYS_ARCH_H__
#ifdef __linux__
#include "esp32_mock.h"
#else
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/queue.h"
#include "freertos/semphr.h"
#include "arch/vfs_lwip.h"
#endif // __linux__
#ifdef __cplusplus
extern "C" {