mirror of
https://github.com/espressif/esp-lwip.git
synced 2026-08-26 20:00:05 +00:00
Co-Authored-By: Erik Ekman <[email protected]> (lwip-tcpip/lwip@853258ff) Co-Authored-By: xueyunfei <[email protected]> (espressif/esp-lwip@74e2fa32) Ref IDF-4797
182 lines
7.2 KiB
Diff
182 lines
7.2 KiB
Diff
diff -ruN contrib-2.1.0/examples/example_app/test_configs/opt_no_tcp_dualstack.h contrib-2.1.0-P/examples/example_app/test_configs/opt_no_tcp_dualstack.h
|
|
--- contrib-2.1.0/examples/example_app/test_configs/opt_no_tcp_dualstack.h 2018-09-12 22:16:02.000000000 +0200
|
|
+++ contrib-2.1.0-P/examples/example_app/test_configs/opt_no_tcp_dualstack.h 2022-03-19 15:07:57.455415829 +0100
|
|
@@ -1,4 +1,4 @@
|
|
#include "test_configs/opt_dualstack.h"
|
|
|
|
#undef LWIP_TCP
|
|
-#define LWIP_TCP 0
|
|
\ No newline at end of file
|
|
+#define LWIP_TCP 0
|
|
diff -ruN contrib-2.1.0/examples/example_app/test_configs/opt_no_tcp_ipv4only.h contrib-2.1.0-P/examples/example_app/test_configs/opt_no_tcp_ipv4only.h
|
|
--- contrib-2.1.0/examples/example_app/test_configs/opt_no_tcp_ipv4only.h 2018-09-12 22:16:02.000000000 +0200
|
|
+++ contrib-2.1.0-P/examples/example_app/test_configs/opt_no_tcp_ipv4only.h 2022-03-19 15:08:27.446964821 +0100
|
|
@@ -1,4 +1,4 @@
|
|
#include "test_configs/opt_ipv4only.h"
|
|
|
|
#undef LWIP_TCP
|
|
-#define LWIP_TCP 0
|
|
\ No newline at end of file
|
|
+#define LWIP_TCP 0
|
|
diff -ruN contrib-2.1.0/examples/example_app/test_configs/opt_no_tcp_ipv6only.h contrib-2.1.0-P/examples/example_app/test_configs/opt_no_tcp_ipv6only.h
|
|
--- contrib-2.1.0/examples/example_app/test_configs/opt_no_tcp_ipv6only.h 2018-09-12 22:16:02.000000000 +0200
|
|
+++ contrib-2.1.0-P/examples/example_app/test_configs/opt_no_tcp_ipv6only.h 2022-03-19 15:08:36.622826844 +0100
|
|
@@ -1,4 +1,4 @@
|
|
#include "test_configs/opt_ipv6only.h"
|
|
|
|
#undef LWIP_TCP
|
|
-#define LWIP_TCP 0
|
|
\ No newline at end of file
|
|
+#define LWIP_TCP 0
|
|
diff -ruN contrib-2.1.0/examples/example_app/test_configs/opt_no_udp_dualstack.h contrib-2.1.0-P/examples/example_app/test_configs/opt_no_udp_dualstack.h
|
|
--- contrib-2.1.0/examples/example_app/test_configs/opt_no_udp_dualstack.h 2018-09-12 22:16:02.000000000 +0200
|
|
+++ contrib-2.1.0-P/examples/example_app/test_configs/opt_no_udp_dualstack.h 2022-03-19 15:08:43.974716296 +0100
|
|
@@ -1,4 +1,4 @@
|
|
#include "test_configs/opt_dualstack.h"
|
|
|
|
#undef LWIP_UDP
|
|
-#define LWIP_UDP 0
|
|
\ No newline at end of file
|
|
+#define LWIP_UDP 0
|
|
diff -ruN contrib-2.1.0/examples/example_app/test_configs/opt_no_udp_ipv4only.h contrib-2.1.0-P/examples/example_app/test_configs/opt_no_udp_ipv4only.h
|
|
--- contrib-2.1.0/examples/example_app/test_configs/opt_no_udp_ipv4only.h 2018-09-12 22:16:02.000000000 +0200
|
|
+++ contrib-2.1.0-P/examples/example_app/test_configs/opt_no_udp_ipv4only.h 2022-03-19 15:08:48.590646888 +0100
|
|
@@ -1,4 +1,4 @@
|
|
#include "test_configs/opt_ipv4only.h"
|
|
|
|
#undef LWIP_UDP
|
|
-#define LWIP_UDP 0
|
|
\ No newline at end of file
|
|
+#define LWIP_UDP 0
|
|
diff -ruN contrib-2.1.0/examples/example_app/test_configs/opt_no_udp_ipv6only.h contrib-2.1.0-P/examples/example_app/test_configs/opt_no_udp_ipv6only.h
|
|
--- contrib-2.1.0/examples/example_app/test_configs/opt_no_udp_ipv6only.h 2018-09-12 22:16:02.000000000 +0200
|
|
+++ contrib-2.1.0-P/examples/example_app/test_configs/opt_no_udp_ipv6only.h 2022-03-19 15:08:52.490588248 +0100
|
|
@@ -1,4 +1,4 @@
|
|
#include "test_configs/opt_ipv6only.h"
|
|
|
|
#undef LWIP_UDP
|
|
-#define LWIP_UDP 0
|
|
\ No newline at end of file
|
|
+#define LWIP_UDP 0
|
|
diff -ruN contrib-2.1.0/ports/CMakeCommon.cmake contrib-2.1.0-P/ports/CMakeCommon.cmake
|
|
--- contrib-2.1.0/ports/CMakeCommon.cmake 2018-09-04 22:54:08.000000000 +0200
|
|
+++ contrib-2.1.0-P/ports/CMakeCommon.cmake 2022-03-19 15:03:40.651279436 +0100
|
|
@@ -73,7 +73,6 @@
|
|
-fsanitize=undefined
|
|
-fno-sanitize=alignment
|
|
-fstack-protector
|
|
- -fstack-check
|
|
)
|
|
set(LWIP_SANITIZER_LIBS asan ubsan)
|
|
endif()
|
|
diff -ruN contrib-2.1.0/ports/unix/check/CMakeLists.txt contrib-2.1.0-P/ports/unix/check/CMakeLists.txt
|
|
--- contrib-2.1.0/ports/unix/check/CMakeLists.txt 2018-09-04 22:54:08.000000000 +0200
|
|
+++ contrib-2.1.0-P/ports/unix/check/CMakeLists.txt 2022-03-19 15:03:40.651279436 +0100
|
|
@@ -7,14 +7,12 @@
|
|
endif()
|
|
|
|
set(LWIP_CONTRIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
|
|
-set(LWIP_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../../lwip)
|
|
|
|
set(LWIP_USE_SANITIZERS true)
|
|
include(${LWIP_CONTRIB_DIR}/ports/CMakeCommon.cmake)
|
|
|
|
if(CMAKE_C_COMPILER_ID STREQUAL Clang)
|
|
# check.h causes 'error: token pasting of ',' and __VA_ARGS__ is a GNU extension' with clang 9.0.0
|
|
- list(LWIP_COMPILER_FLAGS APPEND -Wno-gnu-zero-variadic-macro-arguments)
|
|
endif()
|
|
|
|
set (LWIP_DEFINITIONS -DLWIP_DEBUG -DLWIP_NOASSERT_ON_ERROR)
|
|
diff -ruN contrib-2.1.0/ports/unix/example_app/iteropts.sh contrib-2.1.0-P/ports/unix/example_app/iteropts.sh
|
|
--- contrib-2.1.0/ports/unix/example_app/iteropts.sh 2018-09-12 22:16:02.000000000 +0200
|
|
+++ contrib-2.1.0-P/ports/unix/example_app/iteropts.sh 2022-03-19 15:03:40.651279436 +0100
|
|
@@ -1,24 +1,34 @@
|
|
-#!/bin/bash
|
|
-
|
|
-LOGFILE=iteropts.log
|
|
-EXAPPDIR=../../../examples/example_app
|
|
-
|
|
-pushd `dirname "$0"`
|
|
-pwd
|
|
-echo Starting Iteropts run >> $LOGFILE
|
|
-for f in $EXAPPDIR/test_configs/*.h
|
|
-do
|
|
- echo Cleaning...
|
|
- make clean
|
|
- BUILDLOG=$(basename "$f" ".h").log
|
|
- echo testing $f
|
|
- echo testing $f >> $LOGFILE
|
|
- rm $EXAPPDIR/lwipopts_test.h
|
|
- # cat the file to update its timestamp
|
|
- cat $f > $EXAPPDIR/lwipopts_test.h
|
|
- make TESTFLAGS=-DLWIP_OPTTEST_FILE -j 8 &> $BUILDLOG 2>&1 || echo file $f failed >> $LOGFILE
|
|
- echo test $f done >> $LOGFILE
|
|
-done
|
|
-echo done, cleaning
|
|
-make clean
|
|
-popd
|
|
+#!/bin/bash
|
|
+
|
|
+LOGFILE=iteropts.log
|
|
+EXAPPDIR=../../../examples/example_app
|
|
+RETVAL=0
|
|
+
|
|
+pushd `dirname "$0"`
|
|
+pwd
|
|
+echo Starting Iteropts run >> $LOGFILE
|
|
+for f in $EXAPPDIR/test_configs/*.h
|
|
+do
|
|
+ echo Cleaning...
|
|
+ make clean > /dev/null
|
|
+ BUILDLOG=$(basename "$f" ".h").log
|
|
+ echo testing $f
|
|
+ echo testing $f >> $LOGFILE
|
|
+ rm -f $EXAPPDIR/lwipopts_test.h
|
|
+ # cat the file to update its timestamp
|
|
+ cat $f > $EXAPPDIR/lwipopts_test.h
|
|
+ make TESTFLAGS="-DLWIP_OPTTEST_FILE -Wno-documentation" -j 4 1> $BUILDLOG 2>&1
|
|
+ ERR=$?
|
|
+ if [ $ERR != 0 ]; then
|
|
+ cat $BUILDLOG
|
|
+ echo file $f failed with $ERR >> $LOGFILE
|
|
+ echo ++++++++ $f FAILED +++++++
|
|
+ RETVAL=1
|
|
+ fi
|
|
+ echo test $f done >> $LOGFILE
|
|
+done
|
|
+echo done, cleaning
|
|
+make clean > /dev/null
|
|
+popd
|
|
+echo Exit value: $RETVAL
|
|
+exit $RETVAL
|
|
diff -ruN contrib-2.1.0/ports/unix/port/include/arch/sys_arch.h contrib-2.1.0-P/ports/unix/port/include/arch/sys_arch.h
|
|
--- contrib-2.1.0/ports/unix/port/include/arch/sys_arch.h 2018-07-12 21:24:16.000000000 +0200
|
|
+++ contrib-2.1.0-P/ports/unix/port/include/arch/sys_arch.h 2022-03-19 15:05:59.193194629 +0100
|
|
@@ -59,5 +59,8 @@
|
|
struct sys_thread;
|
|
typedef struct sys_thread * sys_thread_t;
|
|
|
|
+#define LWIP_EXAMPLE_APP_ABORT() lwip_unix_keypressed()
|
|
+int lwip_unix_keypressed(void);
|
|
+
|
|
#endif /* LWIP_ARCH_SYS_ARCH_H */
|
|
|
|
diff -ruN contrib-2.1.0/ports/unix/port/sys_arch.c contrib-2.1.0-P/ports/unix/port/sys_arch.c
|
|
--- contrib-2.1.0/ports/unix/port/sys_arch.c 2018-09-04 22:02:58.000000000 +0200
|
|
+++ contrib-2.1.0-P/ports/unix/port/sys_arch.c 2022-03-19 15:07:13.416078142 +0100
|
|
@@ -717,3 +717,14 @@
|
|
}
|
|
}
|
|
#endif /* SYS_LIGHTWEIGHT_PROT */
|
|
+
|
|
+/* get keyboard state to terminate the debug app by using select */
|
|
+int
|
|
+lwip_unix_keypressed(void)
|
|
+{
|
|
+ struct timeval tv = { 0L, 0L };
|
|
+ fd_set fds;
|
|
+ FD_ZERO(&fds);
|
|
+ FD_SET(0, &fds);
|
|
+ return select(1, &fds, NULL, NULL, &tv);
|
|
+}
|