Skip to content

Commit e331fed

Browse files
committed
[Change] Tests: batsman v1.4.0 features; per-test timeout; GHA parallelism
[Change] Per-test 180s timeout via BATSMAN_TEST_TIMEOUT prevents hung scans from blocking entire suite (was unbounded — caused 50min anvil hangs) [Change] GHA workflow upgraded from batsman v1.2.2 to v1.4.0: file-groups=3 splits 53 test files into 3 groups per OS (8x3=24 parallel matrix jobs), parallel-jobs=4 for intra-container BATS parallelism, JUnit XML reports [Change] yara-x GHA job: added per-test timeout and --jobs 4 parallelism
1 parent b37edcc commit e331fed

4 files changed

Lines changed: 18 additions & 1 deletion

File tree

.github/workflows/smoke-test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ on:
88

99
jobs:
1010
smoke-test:
11-
uses: rfxn/batsman/.github/workflows/test.yml@v1.2.2
11+
uses: rfxn/batsman/.github/workflows/test.yml@v1.4.0
1212
with:
1313
project-name: lmd
1414
os-matrix: '["debian12","centos6","centos7","rocky8","rocky9","rocky10","ubuntu2004","ubuntu2404"]'
1515
timeout: 25
16+
file-groups: 3
17+
parallel-jobs: 4
18+
reports: true
19+
docker-run-flags: '-e BATS_TEST_TIMEOUT=180'
1620

1721
yara-x:
1822
runs-on: ubuntu-latest
@@ -41,9 +45,11 @@ jobs:
4145
run: |
4246
mkdir -p "${{ runner.temp }}/reports"
4347
docker run --rm \
48+
-e BATS_TEST_TIMEOUT=180 \
4449
-v "${{ runner.temp }}/reports:/reports" \
4550
lmd-test-yara-x \
4651
bats --formatter tap \
52+
--jobs 4 \
4753
--report-formatter junit --output /reports \
4854
/opt/tests/
4955
- name: Upload yara-x test reports

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ v2.0.1 | Mar 25 2026:
222222
when .info file is corrupt or has fewer than 9 fields
223223
[Fix] Docs: document scan_hashtype=both in man page, README, and conf.maldet
224224
[Fix] Packaging: tar fallback excludes pkg/ directory (was pkg/build only)
225+
[Change] Tests: batsman v1.4.0; per-test 180s timeout prevents hung scans;
226+
GHA file-groups (3) for 24-way parallel matrix; BATS --jobs 4 intra-container
227+
parallelism; JUnit XML reports
225228
[Fix] restore() and restore_hitlist(): return exit 1 on all error paths
226229
[Fix] YARA rules no longer counted as active when no engine available (YARA(no engine))
227230

CHANGELOG.RELEASE

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,3 +224,6 @@ v2.0.1 | Mar 25 2026:
224224
when .info file is corrupt or has fewer than 9 fields
225225
[Fix] Docs: document scan_hashtype=both in man page, README, and conf.maldet
226226
[Fix] Packaging: tar fallback excludes pkg/ directory (was pkg/build only)
227+
[Change] Tests: batsman v1.4.0; per-test 180s timeout prevents hung scans;
228+
GHA file-groups (3) for 24-way parallel matrix; BATS --jobs 4 intra-container
229+
parallelism; JUnit XML reports

tests/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ BATSMAN_OS_ALL := $(BATSMAN_OS_MODERN) $(BATSMAN_OS_LEGACY) $(BATSMAN_OS_DEEP
66
BATSMAN_RUN_TESTS := ./run-tests.sh
77
BATSMAN_PROJECT := lmd
88

9+
# Per-test timeout (seconds): prevents hung scans from blocking the entire suite.
10+
# 180s accommodates heavy scan tests; genuine hangs run 45+ minutes.
11+
# Override at invocation: make test BATSMAN_TEST_TIMEOUT=60
12+
export BATSMAN_TEST_TIMEOUT ?= 180
13+
914
include infra/include/Makefile.tests
1015

1116
# UAT override: --init reaps orphaned background processes (monitor mode tests),

0 commit comments

Comments
 (0)