fuzzer tests: update of mdns and lwip host compilation for fuzzer testing

Closes IDF-540
This commit is contained in:
David Cermak 2019-02-19 14:38:59 +01:00
parent 997883be1e
commit bc60bbbeaf
3 changed files with 6 additions and 2 deletions

View File

@ -1,7 +1,7 @@
COMPONENTS_DIR=../.. COMPONENTS_DIR=../..
CFLAGS=-std=gnu99 -Og -ggdb -ffunction-sections -fdata-sections -nostdlib -Wall -Werror=all -Wno-int-to-pointer-cast -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra \ CFLAGS=-std=gnu99 -Og -ggdb -ffunction-sections -fdata-sections -nostdlib -Wall -Werror=all -Wno-int-to-pointer-cast -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra \
-Wno-unused-parameter -Wno-sign-compare -Wno-address -Wno-unused-variable -DESP_PLATFORM -D IDF_VER=\"v3.1\" -MMD -MP -DWITH_POSIX -Wno-unused-parameter -Wno-sign-compare -Wno-address -Wno-unused-variable -DESP_PLATFORM -D IDF_VER=\"v3.1\" -MMD -MP -DWITH_POSIX
INC_DIRS=-I . -I ./build/config -I $(COMPONENTS_DIR)/newlib/platform_include -I $(COMPONENTS_DIR)/newlib/include -I $(COMPONENTS_DIR)/driver/include -I $(COMPONENTS_DIR)/esp32/include -I $(COMPONENTS_DIR)/ethernet/include -I $(COMPONENTS_DIR)/freertos/include -I $(COMPONENTS_DIR)/heap/include -I $(COMPONENTS_DIR)/lwip/lwip/src/include -I $(COMPONENTS_DIR)/lwip/include/apps -I $(COMPONENTS_DIR)/lwip/lwip/src/include/netif -I $(COMPONENTS_DIR)/lwip/lwip/src/include/posix -I $(COMPONENTS_DIR)/lwip/port/esp32/include -I $(COMPONENTS_DIR)/lwip/lwip/src/include/posix -I $(COMPONENTS_DIR)/lwip/include/apps/ping -I $(COMPONENTS_DIR)/soc/esp32/include -I $(COMPONENTS_DIR)/soc/include -I $(COMPONENTS_DIR)/tcpip_adapter/include -I $(COMPONENTS_DIR)/xtensa-debug-module/include INC_DIRS=-I . -I ./build/config -I $(COMPONENTS_DIR)/newlib/platform_include -I $(COMPONENTS_DIR)/newlib/include -I $(COMPONENTS_DIR)/driver/include -I $(COMPONENTS_DIR)/esp32/include -I $(COMPONENTS_DIR)/ethernet/include -I $(COMPONENTS_DIR)/freertos/include -I $(COMPONENTS_DIR)/heap/include -I $(COMPONENTS_DIR)/lwip/lwip/src/include -I $(COMPONENTS_DIR)/lwip/include/apps -I $(COMPONENTS_DIR)/lwip/lwip/src/include/netif -I $(COMPONENTS_DIR)/lwip/lwip/src/include/posix -I $(COMPONENTS_DIR)/lwip/port/esp32/include -I $(COMPONENTS_DIR)/lwip/lwip/src/include/posix -I $(COMPONENTS_DIR)/lwip/include/apps/ping -I $(COMPONENTS_DIR)/soc/esp32/include -I $(COMPONENTS_DIR)/soc/include -I $(COMPONENTS_DIR)/tcpip_adapter/include -I $(COMPONENTS_DIR)/esp_rom/include -I $(COMPONENTS_DIR)/xtensa-debug-module/include
TEST_NAME=test TEST_NAME=test
FUZZ=afl-fuzz FUZZ=afl-fuzz
GEN_CFG=generate_config GEN_CFG=generate_config

View File

@ -1,7 +1,9 @@
TEST_NAME=test TEST_NAME=test
FUZZ=afl-fuzz FUZZ=afl-fuzz
COMPONENTS_DIR=../.. COMPONENTS_DIR=../..
CFLAGS=-g -DMDNS_TEST_MODE -I. -I.. -I../include -I../private_include -I$(COMPONENTS_DIR)/tcpip_adapter/include -I$(COMPONENTS_DIR)/esp32/include -include esp32_compat.h CFLAGS=-g -DHOOK_MALLOC_FAILED -DESP_EVENT_H_ -D__ESP_LOG_H__ -DMDNS_TEST_MODE \
-I. -I.. -I../include -I../private_include -include esp32_compat.h \
-I$(COMPONENTS_DIR)/tcpip_adapter/include -I$(COMPONENTS_DIR)/esp_event/include -I$(COMPONENTS_DIR)/log/include
MDNS_C_DEPENDENCY_INJECTION=-include mdns_di.h MDNS_C_DEPENDENCY_INJECTION=-include mdns_di.h
ifeq ($(INSTR),off) ifeq ($(INSTR),off)
CC=gcc CC=gcc

View File

@ -57,6 +57,7 @@
#define portMAX_DELAY 0xFFFFFFFF #define portMAX_DELAY 0xFFFFFFFF
#define portTICK_PERIOD_MS 1 #define portTICK_PERIOD_MS 1
#define ESP_LOGD(a,b)
#define xSemaphoreTake(s,d) #define xSemaphoreTake(s,d)
#define xTaskDelete(a) #define xTaskDelete(a)
@ -65,6 +66,7 @@
#define _mdns_pcb_init(a,b) true #define _mdns_pcb_init(a,b) true
#define _mdns_pcb_deinit(a,b) true #define _mdns_pcb_deinit(a,b) true
#define xSemaphoreCreateMutex() malloc(1) #define xSemaphoreCreateMutex() malloc(1)
#define xSemaphoreCreateBinary() malloc(1)
#define vSemaphoreDelete(s) free(s) #define vSemaphoreDelete(s) free(s)
#define xTaskCreatePinnedToCore(a,b,c,d,e,f,g) *(f) = malloc(1) #define xTaskCreatePinnedToCore(a,b,c,d,e,f,g) *(f) = malloc(1)
#define vTaskDelay(m) usleep((m)*0) #define vTaskDelay(m) usleep((m)*0)