Skip to content

Commit 3ec12c3

Browse files
committed
test: Make test application scalable
also fixes github CI and makes the linger stress test run multiple times
1 parent b15cd2d commit 3ec12c3

File tree

6 files changed

+14
-20
lines changed

6 files changed

+14
-20
lines changed

.github/workflows/ci-linux.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v4
1818
- name: Install deps
1919
run: |
2020
sudo apt-get install check ninja-build doxygen
@@ -41,7 +41,7 @@ jobs:
4141

4242
- name: Upload Test Results
4343
if: always()
44-
uses: actions/upload-artifact@v2
44+
uses: actions/upload-artifact@v4
4545
with:
4646
name: Test Results ${{ matrix.compiler }}
4747
path: "*.xml"
@@ -55,7 +55,7 @@ jobs:
5555
if: always()
5656
steps:
5757
- name: Download Artifacts
58-
uses: actions/download-artifact@v2
58+
uses: actions/download-artifact@v4
5959
with:
6060
path: artifacts
6161

File renamed without changes.
File renamed without changes.

test/apps/test_apps.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,6 @@ Suite* create_suite(const char* name, testfunc *tests, size_t num_tests, SFun se
2121
return s;
2222
}
2323

24-
void lwip_check_ensure_no_alloc(unsigned int skip)
25-
{
26-
int i;
27-
unsigned int mask;
28-
for (i = 0, mask = 1; i < MEMP_MAX; i++, mask <<= 1) {
29-
if (!(skip & mask)) {
30-
fail_unless(lwip_stats.memp[i]->used == 0);
31-
}
32-
}
33-
}
34-
3524
int main(void)
3625
{
3726
int number_failed;

test/ci/test_apps.sh

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,22 @@ set -e
44
export LWIP_DIR=`pwd`
55
export LWIP_CONTRIB_DIR=`pwd`/contrib
66

7+
TEST_APPS="socket_no_linger socket_linger socket_linger_reuse"
8+
STRESS_TEST_APPS="socket_linger"
9+
710
cd test/apps
811
# Prepare a failing report in case we get stuck (check in no-fork mode)
912
python socket_linger_stress_test.py failed > ${LWIP_DIR}/socket_linger_stress_test.xml
10-
for cfg in config_no_linger config_linger config_linger_reuse; do
11-
cmake -DCI_BUILD=1 -DTEST_CONFIG=${cfg} -B ${cfg} -G Ninja .
12-
cmake --build ${cfg}/
13-
timeout 10 ./${cfg}/lwip_test_apps
13+
for app in $TEST_APPS; do
14+
cmake -DCI_BUILD=1 -DTEST_CONFIG=${app} -B ${app} -G Ninja .
15+
cmake --build ${app}/
16+
timeout 10 ./${app}/lwip_test_apps
1417
[ -f check2junit.py ] &&
15-
python ${LWIP_DIR}/check2junit.py lwip_test_apps.xml > ${LWIP_DIR}/${cfg}.xml
18+
python ${LWIP_DIR}/check2junit.py lwip_test_apps.xml > ${LWIP_DIR}/${app}.xml
1619
done
1720
# Run the lingering test multiple times
18-
for run in {1..10}; do ( timeout 10 ./config_linger/lwip_test_apps ) || exit 1 ; done
21+
for stress_cfg in $STRESS_TEST_APPS; do
22+
for run in {1..1000}; do ( timeout 10 ./$stress_cfg/lwip_test_apps ) || exit 1 ; done;
23+
done
1924
# All good, regenerate the stress test-report, since the test succeeded
2025
python socket_linger_stress_test.py > ${LWIP_DIR}/socket_linger_stress_test.xml

0 commit comments

Comments
 (0)