From 71fd678df1ea697d94e7189abbd7150d8b37ad77 Mon Sep 17 00:00:00 2001 From: Lukasz Dorau Date: Fri, 9 May 2025 12:07:09 +0200 Subject: [PATCH] Move the longest drd tests to Nightly build Move the longest drd tests to Nightly build. Add the drdshort option to the valgrind script. Signed-off-by: Lukasz Dorau --- .github/workflows/reusable_valgrind.yml | 2 +- test/test_valgrind.sh | 22 ++++++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable_valgrind.yml b/.github/workflows/reusable_valgrind.yml index 0d7b8dd51..935fa6f5f 100644 --- a/.github/workflows/reusable_valgrind.yml +++ b/.github/workflows/reusable_valgrind.yml @@ -42,7 +42,7 @@ jobs: run: ${{github.workspace}}/test/test_valgrind.sh ${{github.workspace}} ${{github.workspace}}/build memcheck - name: Run tests with 'drd' - run: ${{github.workspace}}/test/test_valgrind.sh ${{github.workspace}} ${{github.workspace}}/build drd + run: ${{github.workspace}}/test/test_valgrind.sh ${{github.workspace}} ${{github.workspace}}/build drdshort - name: Run tests with 'helgrind' run: ${{github.workspace}}/test/test_valgrind.sh ${{github.workspace}} ${{github.workspace}}/build helgrind diff --git a/test/test_valgrind.sh b/test/test_valgrind.sh index 2e4f655f6..cff45bdec 100755 --- a/test/test_valgrind.sh +++ b/test/test_valgrind.sh @@ -11,8 +11,9 @@ TOOL=$3 TESTS=$4 function print_usage() { - echo "$(basename $0) - run UMF tests and examples under a valgrind tool (memcheck, drd or helgrind)" - echo "Usage: $(basename $0) [tests_examples]" + echo "$(basename $0) - run UMF tests and examples under a valgrind tool (memcheck, drd, drdshort or helgrind)" + echo " drdshort - same as drd, but the longest lasting tests are excluded" + echo "Usage: $(basename $0) [tests_examples]" echo "Where:" echo echo "tests_examples - (optional) list of tests or examples to be run (paths relative to the build directory)." @@ -43,6 +44,8 @@ if [ $(ls -1 ${BUILD_DIR}/test/test_* 2>/dev/null | wc -l) -eq 0 ]; then exit 1 fi +EXCLUDE_LONGEST_TESTS=0 + case $TOOL in memcheck) OPTION="--leak-check=full" @@ -50,6 +53,11 @@ memcheck) drd) OPTION="--tool=drd" ;; +drdshort) + OPTION="--tool=drd" + TOOL="drd" + EXCLUDE_LONGEST_TESTS=1 + ;; helgrind) OPTION="--tool=helgrind" ;; @@ -150,6 +158,16 @@ for test in $TESTS; do ;; esac + if [ $EXCLUDE_LONGEST_TESTS -eq 1 ]; then + # skip the longest tests + case $test in + ./test/test_jemalloc_pool|./test/test_jemalloc_coarse_file|./test/test_scalable_pool|./test/test_ipc_max_opened_limit) + echo "- SKIPPED (VERY LONG TEST)" + continue; + ;; + esac + fi + [ "$FILTER" != "" ] && echo -n "($FILTER) " LAST_TEST_FAILED=0