From: Vsevolod Stakhov Date: Fri, 17 Oct 2025 19:54:01 +0000 (+0100) Subject: [Test] Fix fuzzy detection and enable ASAN X-Git-Tag: 3.14.0~67^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b45235cbb14789f2874de27595c3b24c7c39cabf;p=thirdparty%2Frspamd.git [Test] Fix fuzzy detection and enable ASAN - Scan same shuffled files used for training to get accurate fuzzy detection rate - Build with AddressSanitizer enabled (-DENABLE_SANITIZER=address) - Add libasan8 and missing runtime libraries to Docker container --- diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 2be7de962e..7f086204c8 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -72,6 +72,8 @@ jobs: cd build cmake -DCMAKE_INSTALL_PREFIX=../install \ -DENABLE_COVERAGE=OFF \ + -DENABLE_SANITIZER=address \ + -DSANITIZER=address \ -GNinja .. ninja ninja install @@ -161,6 +163,15 @@ jobs: libicu74 \ libsodium23 \ libhyperscan5 \ + libpcre2-8-0 \ + libjemalloc2 \ + libmagic1 \ + libarchive13 \ + libzstd1 \ + libbrotli1 \ + libfann2 \ + libstemmer0d \ + libasan8 \ && rm -rf /var/lib/apt/lists/* COPY install /usr diff --git a/test/integration/scripts/integration-test.sh b/test/integration/scripts/integration-test.sh index 2e97c0a614..91a644c0ab 100755 --- a/test/integration/scripts/integration-test.sh +++ b/test/integration/scripts/integration-test.sh @@ -154,9 +154,10 @@ echo "============================================================" echo "" echo "Scanning $TOTAL_EMAILS emails (parallelism: $PARALLEL)..." -# rspamc can scan directories recursively -rspamc -h "$RSPAMD_HOST:$CONTROLLER_PORT" -P "$PASSWORD" -n "$PARALLEL" -j \ - "$CORPUS_DIR" > "$DATA_DIR/scan_results.json" 2>&1 +# Scan the same files we used for training (from shuffled list) +# Use xargs with -a to read from file and avoid argument list too long +xargs -a "$DATA_DIR/shuffled_files.txt" rspamc -h "$RSPAMD_HOST:$CONTROLLER_PORT" \ + -P "$PASSWORD" -n "$PARALLEL" -j > "$DATA_DIR/scan_results.json" 2>&1 echo "✓ Scanning complete" echo ""