diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 4e92d9899..f0c202512 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install deps run: | sudo apt-get install check ninja-build doxygen @@ -41,7 +41,7 @@ jobs: - name: Upload Test Results if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: Test Results ${{ matrix.compiler }} path: "*.xml" @@ -55,7 +55,7 @@ jobs: if: always() steps: - name: Download Artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: path: artifacts diff --git a/test/apps/config_linger/lwipopts_test.h b/test/apps/socket_linger/lwipopts_test.h similarity index 100% rename from test/apps/config_linger/lwipopts_test.h rename to test/apps/socket_linger/lwipopts_test.h diff --git a/test/apps/config_linger_reuse/lwipopts_test.h b/test/apps/socket_linger_reuse/lwipopts_test.h similarity index 100% rename from test/apps/config_linger_reuse/lwipopts_test.h rename to test/apps/socket_linger_reuse/lwipopts_test.h diff --git a/test/apps/config_no_linger/lwipopts_test.h b/test/apps/socket_no_linger/lwipopts_test.h similarity index 100% rename from test/apps/config_no_linger/lwipopts_test.h rename to test/apps/socket_no_linger/lwipopts_test.h diff --git a/test/apps/test_apps.c b/test/apps/test_apps.c index 3fdcd2b56..8b9fe6a9f 100644 --- a/test/apps/test_apps.c +++ b/test/apps/test_apps.c @@ -21,17 +21,6 @@ Suite* create_suite(const char* name, testfunc *tests, size_t num_tests, SFun se return s; } -void lwip_check_ensure_no_alloc(unsigned int skip) -{ - int i; - unsigned int mask; - for (i = 0, mask = 1; i < MEMP_MAX; i++, mask <<= 1) { - if (!(skip & mask)) { - fail_unless(lwip_stats.memp[i]->used == 0); - } - } -} - int main(void) { int number_failed; diff --git a/test/ci/test_apps.sh b/test/ci/test_apps.sh index 6d4fcc56c..09b754014 100755 --- a/test/ci/test_apps.sh +++ b/test/ci/test_apps.sh @@ -4,17 +4,22 @@ set -e export LWIP_DIR=`pwd` export LWIP_CONTRIB_DIR=`pwd`/contrib +TEST_APPS="socket_no_linger socket_linger socket_linger_reuse" +STRESS_TEST_APPS="socket_linger" + 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 +for app in $TEST_APPS; do + cmake -DCI_BUILD=1 -DTEST_CONFIG=${app} -B ${app} -G Ninja . + cmake --build ${app}/ + timeout 10 ./${app}/lwip_test_apps [ -f check2junit.py ] && - python ${LWIP_DIR}/check2junit.py lwip_test_apps.xml > ${LWIP_DIR}/${cfg}.xml + python ${LWIP_DIR}/check2junit.py lwip_test_apps.xml > ${LWIP_DIR}/${app}.xml done # Run the lingering test multiple times -for run in {1..10}; do ( timeout 10 ./config_linger/lwip_test_apps ) || exit 1 ; done +for stress_cfg in $STRESS_TEST_APPS; do + for run in {1..1000}; do ( timeout 10 ./$stress_cfg/lwip_test_apps ) || exit 1 ; done; +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