-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
api_msg: fix tcp_abort thread safety
As this tcp_abort could be directly called by application thread without locking the TCP/TP core. This commit also reworks and fixes CI: 1) Unit tests build with format-f warnings with GCC-11 2) Reworked to use common shell scripts from both GitLab and GitHub CI
- Loading branch information
1 parent
46227e2
commit 10197b2
Showing
15 changed files
with
152 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
import sys | ||
from junit_xml import TestSuite as ts, TestCase as tc | ||
try: | ||
import sys | ||
from junit_xml import TestSuite as ts, TestCase as tc | ||
|
||
t=tc("lingering close stress test") | ||
if len(sys.argv) > 1 and sys.argv[1] == "failed": | ||
t.add_failure_info("test got stuck when closing clients socket") | ||
print(ts.to_xml_string([ts("SOCKET SO_LINGER stress test", [t])])) | ||
t=tc("lingering close stress test") | ||
if len(sys.argv) > 1 and sys.argv[1] == "failed": | ||
t.add_failure_info("test got stuck when closing clients socket") | ||
print(ts.to_xml_string([ts("SOCKET SO_LINGER stress test", [t])])) | ||
|
||
except ImportError: | ||
print() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
export LWIP_DIR=`pwd` | ||
export LWIP_CONTRIB_DIR=`pwd`/${CONTRIB} | ||
|
||
cd test/apps | ||
# Prepare a failing report in case we get stuck (check in no-fork mode) | ||
python socket_linger_stress_test.py failed > ${LWIP_DIR}/socket_linger_stress_test.xml | ||
for cfg in config_no_linger config_linger config_linger_reuse; do | ||
cmake -DCI_BUILD=1 -DTEST_CONFIG=${cfg} -B ${cfg} -G Ninja . | ||
cmake --build ${cfg}/ | ||
timeout 10 ./${cfg}/lwip_test_apps | ||
[ -f check2junit.py ] && | ||
python ${LWIP_DIR}/check2junit.py lwip_test_apps.xml > ${LWIP_DIR}/${cfg}.xml | ||
done | ||
# Run the lingering test multiple times | ||
for run in {1..10000}; do ( timeout 10 ./config_linger/lwip_test_apps ) || exit 1 ; done | ||
# All good, regenerate the stress test-report, since the test succeeded | ||
python socket_linger_stress_test.py > ${LWIP_DIR}/socket_linger_stress_test.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
export CI_ROOT_DIR=`pwd` | ||
export LWIPDIR=../../../../src | ||
export ORIG_CC=${CC} | ||
pushd `pwd` | ||
cd ${CONTRIB}/ports/unix/check | ||
|
||
### with GNU Make | ||
|
||
# build and run default lwip tests (ESP_LWIP=0!) | ||
make clean | ||
make -j 4 check | ||
# retest with ESP_LWIP patches | ||
make clean | ||
export EXTRA_CFLAGS="-DESP_LWIP=1" && export CC="${ORIG_CC} ${EXTRA_CFLAGS}" | ||
make -j 4 check | ||
# retest with IP_FORWARD enabled | ||
make clean | ||
export EXTRA_CFLAGS="-DESP_LWIP=1 -DIP_FORWARD=1" && export CC="${ORIG_CC} ${EXTRA_CFLAGS}" | ||
make -j 4 check | ||
# retest with IP_FORWARD and IP_NAPT enabled | ||
make clean | ||
export EXTRA_CFLAGS="-DESP_LWIP=1 -DIP_FORWARD=1 -DIP_NAPT=1" && export CC="${ORIG_CC} ${EXTRA_CFLAGS}" | ||
make -j 4 check | ||
# Please uncomment the below to test IP_FORWARD/IP_NAPT tests with debug output (only ip4_route test suite will be executed) | ||
make clean | ||
export EXTRA_CFLAGS="-DESP_LWIP=1 -DIP_FORWARD=1 -DESP_TEST_DEBUG=1 -DIP_NAPT=1" && export CC="${ORIG_CC} ${EXTRA_CFLAGS}" | ||
make -j 4 check | ||
|
||
|
||
### with CMake | ||
cd ${CI_ROOT_DIR}/${CONTRIB}/ports/unix/check | ||
rm -rf build | ||
export EXTRA_CFLAGS="" | ||
export CC="${ORIG_CC}" | ||
mkdir build && cd build && cmake -DLWIP_DIR=`pwd`/../../../../.. .. -G Ninja | ||
cmake --build . && ./lwip_unittests | ||
[ -f ${CI_ROOT_DIR}/check2junit.py ] && | ||
python ${CI_ROOT_DIR}/check2junit.py lwip_unittests.xml > ${CI_ROOT_DIR}/unit_tests.xml | ||
|
||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
export CFLAGS="-I../../../../test/unix -include esp_lwipopts.h" | ||
export LWIPDIR=../../../../src/ | ||
cp ${CONTRIB}/examples/example_app/lwipcfg.h.example ${CONTRIB}/examples/example_app/lwipcfg.h | ||
cd ${CONTRIB}/ports/unix/example_app | ||
|
||
make TESTFLAGS="-Wno-documentation" -j 4 | ||
chmod +x iteropts.sh | ||
./iteropts.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.