Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
9cac47e
feat(v2): add Bazel fuzzing
tkilias Sep 17, 2026
5402dca
ci: harden v2 fuzzing workflow
tkilias Sep 17, 2026
0f5d4b8
ci: run v2 fuzzing through nox
tkilias Sep 17, 2026
5778cc3
ci: gate v2 fuzzing pull requests
tkilias Sep 17, 2026
29b8857
ci: fix Poetry nox invocation
tkilias Sep 17, 2026
715d1f3
ci: upgrade artifact upload action
tkilias Sep 17, 2026
fc7acbd
Merge origin/main into feature/v2-bazel-fuzzing
tkilias Sep 17, 2026
f9b5a9b
ci: exclude fuzz tests from Sonar analysis
tkilias Sep 17, 2026
3bd6b40
ci: discover fuzz targets dynamically
tkilias Sep 17, 2026
febf41a
ci: re-enable Sonar analysis for fuzz tests
tkilias Sep 17, 2026
5476623
fix(v2): address Sonar fuzz test findings
tkilias Sep 17, 2026
b2f4b0d
fix(ci): exclude fuzz targets from coverage
tkilias Sep 18, 2026
edd69d3
test(v2): seed queue fuzz corpus
tkilias Sep 18, 2026
6621f28
docs: restructure developer guide
tkilias Sep 18, 2026
d945629
docs: fix v2 developer guide links
tkilias Sep 18, 2026
03cd6c5
Remove prematurely cherry-picked schema validation session
tkilias Sep 19, 2026
24d2166
Add Mull mutation testing workflow
tkilias Sep 18, 2026
51c9c22
Enforce mutation score threshold
tkilias Sep 19, 2026
f6bf814
Apply suggestion from @tkilias
tkilias Sep 19, 2026
6304b6a
Discover Mull tests by default
tkilias Sep 19, 2026
39725ff
Fix Mull target discovery command
tkilias Sep 19, 2026
4c1f9c8
Fix Poetry Nox invocations
tkilias Sep 19, 2026
756334d
Add Mull mutation smoke test
tkilias Sep 19, 2026
64281cd
Make Mull Nox session target agnostic
tkilias Sep 19, 2026
a3ed996
Generate Mull include paths from Bazel
tkilias Sep 19, 2026
b6dd060
Fix dynamic library lookup for Mull
tkilias Sep 19, 2026
95e8d84
Fix Mull output path and score parsing
tkilias Sep 19, 2026
521fd18
Fix Mull config propagation in Bazel
tkilias Sep 19, 2026
072272a
Exclude zero-mutant tests from Mull
tkilias Sep 19, 2026
e57fe04
Keep waitable queue in Mull testing
tkilias Sep 19, 2026
5817ea2
Suppress implicit waitable queue instantiation
tkilias Sep 19, 2026
bd8463c
Move waitable queue instantiation into test target
tkilias Sep 19, 2026
c5c22fa
Support local Mull runs with limited resources
tkilias Sep 19, 2026
68c4626
Extract waitable queue notification logic
tkilias Sep 20, 2026
8ade013
Fix mutation testing CI lint
tkilias Sep 20, 2026
978fa94
Fix notification drain lint
tkilias Sep 20, 2026
6322c20
Document template mutation testing pattern
tkilias Sep 20, 2026
fa291e7
Reintegrate waitable queue notification
tkilias Sep 20, 2026
e9aa587
Exclude waitable queue from Mull
tkilias Sep 20, 2026
69b71a3
Restore waitable queue files
tkilias Sep 20, 2026
303f934
Exclude test files from Sonar coverage
tkilias Sep 20, 2026
86b461b
Merge origin/main
tkilias Sep 24, 2026
cdefbe1
Fix Mull guide Markdown fence
tkilias Sep 24, 2026
caada0c
Clarify Mull mutation testing scope
tkilias Sep 24, 2026
0828e02
Add Mull workflow ticket to changelog
tkilias Sep 24, 2026
7d815c8
Update noxfile.py
tkilias Sep 25, 2026
a1a7916
Merge origin/main into Mull mutation testing
tkilias Sep 25, 2026
4846ef2
Provision Poetry in Lima template
tkilias Sep 25, 2026
238ce92
Refactor Mull Nox session
tkilias Sep 25, 2026
9a49d05
Merge branch 'main' into mull-mutation-testing
tkilias Sep 25, 2026
8a55d32
#60: Fix Mull mutation targets
tkilias Sep 25, 2026
f21b621
#60: Provision Mull in Lima
tkilias Sep 25, 2026
7a6b41b
#60: Add Mull cleanup session
tkilias Sep 25, 2026
fea19c2
Merge origin/main into mull mutation testing
tkilias Sep 25, 2026
e9f6428
Allow Mull targets with no mutants
tkilias Sep 25, 2026
7968447
Run waitable queue test with Mull
tkilias Sep 25, 2026
ecf6476
Parse Mull mutation reports after runner failures
tkilias Sep 25, 2026
088a1fc
Document viewing Mull HTML reports
tkilias Sep 25, 2026
6398eb6
Separate Linux EventFd from waitable queue
tkilias Sep 25, 2026
f2c4b69
Replace Linux waitable queue wrapper with factories
tkilias Sep 25, 2026
c659cba
Update artifact uploads to Node.js 24
tkilias Sep 25, 2026
baadf81
Fix EventFd clang-format alignment
tkilias Sep 25, 2026
9c64476
Fix v2 formatter violations
tkilias Sep 25, 2026
6a88027
Add coverage-eligible tests for the Linux waitable-queue factories
tkilias Sep 25, 2026
27b5efb
Merge remote-tracking branch 'origin/main' into mull-mutation-testing
tkilias Sep 26, 2026
326ecec
Exclude eventfd/waitable-queue factory wrappers from Sonar coverage gate
tkilias Sep 26, 2026
c4ee9d6
Update doc/changes/unreleased.md
tkilias Sep 26, 2026
a489aa7
Update doc/developer_guide/v2/v2_code_quality.md
tkilias Sep 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check_bazel_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ jobs:
OPENSSL_LIBRARY_PREFIX: "/usr/lib/x86_64-linux-gnu"
OPENSSL_INCLUDE_PREFIX: "/usr/include/openssl"

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v6
if: failure()
with:
name: "${{ matrix.name }}"
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/check_mull.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Check Mull Mutation Tests

on:
pull_request:
workflow_dispatch:

env:
USE_BAZEL_VERSION: 8.3.1

jobs:
discover_mull_targets:
runs-on: ubuntu-24.04
outputs:
mull_matrix: ${{ steps.discover.outputs.mull_matrix }}
steps:
- uses: actions/checkout@v6

- uses: bazel-contrib/setup-bazel@8cb04a772ab4c1eb984e9c1b493a182e96c5e425 # 0.19.0
with:
bazelisk-cache: true

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v9
with:
python-version: "3.10"
poetry-version: "2.3.0"

- name: Install Poetry dependencies
run: poetry install --with dev

- name: Discover Mull targets
id: discover
run: poetry run -- nox --sessions=mull-targets -- --github-output-var mull_matrix

mull:
needs: discover_mull_targets
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.discover_mull_targets.outputs.mull_matrix) }}
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6

- uses: bazel-contrib/setup-bazel@8cb04a772ab4c1eb984e9c1b493a182e96c5e425 # 0.19.0
with:
bazelisk-cache: true

- name: Install LLVM and Mull
run: |
sudo apt-get update
sudo apt-get install -y clang-20
curl -1sLf 'https://dl.cloudsmith.io/public/mull-project/mull-stable/setup.deb.sh' | sudo -E bash
sudo apt-get install -y mull-20=0.34.1
mull-runner-20 --version

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v9
with:
python-version: "3.10"
poetry-version: "2.3.0"

- name: Install Poetry dependencies
run: poetry install --with dev

- name: Run Mull mutation tests
run: poetry run -- nox --sessions=mull -- --target "${{ matrix.target }}"

- name: Upload Mull reports
if: always()
uses: actions/upload-artifact@v6
with:
name: mull-reports-${{ matrix.target }}
path: .build_output/mull/
if-no-files-found: warn
5 changes: 5 additions & 0 deletions doc/changes/unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ n/a

## Internal

* #60: Added Mull mutation testing workflow and report-viewing documentation
for v2; targets without generated mutants now produce warnings instead of
failing the workflow, and separated Linux EventFd code and factory-based
Linux queue construction from the generic waitable-queue mutation target;
updated artifact uploads to the Node.js 24-compatible action version
* #64: Added GoogleTest, GoogleMock, and Google Benchmark support for v2 tests
* #57: Defined and enforced public v2 C++ coding style
* #51: Added agent and contributor guidance for v1/v2 development, SLC workflows, CI testing, and PR conventions
Expand Down
5 changes: 3 additions & 2 deletions doc/developer_guide/slc.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ export DOCKER_HOST="$(limactl list docker-udf-client \
```

After setting `DOCKER_HOST`, run normal `exaslct` commands from the host. The
Lima template provides Bazel, Protobuf, ZeroMQ, SWIG, Python, Poetry, and the
native dependency environment used by the v1 build.
Lima template provides Bazel, Protobuf, ZeroMQ, SWIG, Python, Poetry, the LLVM
20/Mull mutation-testing toolchain, and the native dependency environment used
by the v1 build.

Export the checked-in v1 flavor to a local archive with:

Expand Down
2 changes: 1 addition & 1 deletion doc/developer_guide/v2/v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The v2 developer documentation is split into focused guides:

- [Build and test](v2_build_and_test.md) — Bazel setup and test execution.
- [Code quality](v2_code_quality.md) — clang-tidy and clang-format checks.
- [Code quality](v2_code_quality.md) — clang-tidy, clang-format, and Mull mutation checks.
- [Coverage](v2_coverage.md) — local LCOV and HTML coverage reports.
- [Coding style](v2_coding_style.md) — public C++ conventions for v2 code.
- [Fuzzing](v2_fuzzing.md) — libFuzzer targets, Nox campaigns, and regression
Expand Down
63 changes: 63 additions & 0 deletions doc/developer_guide/v2/v2_code_quality.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,66 @@ alias(
tags = ["noclangtidy"],
)
```

## Mutation testing with Mull

Mutation testing for the functional v2 C++ tests uses [Mull](https://mull-project.com/)
with the pinned Mull 0.34.1 release and matching LLVM 20 toolchain. The
`docker-udf-client` Lima template provisions these tools automatically; on
other environments install the LLVM 20 compiler and `mull-20`, then verify
that `mull-runner-20` and `/usr/lib/mull-ir-frontend-20` are available.

Run the mutation session from the repository root:

```bash
poetry run -- nox --sessions=mull
```

If Bazel reports stale or incompatible Mull output from a previous VM or host
build, clean the Mull-specific output roots and reports before retrying:

```bash
poetry run -- nox --sessions=mull-clean
```

If the Bazel executable is named `bazelisk`, run:
`BAZEL=bazelisk poetry run -- nox --sessions=mull`.

The session discovers Bazel `cc_test` targets and runs each eligible target with
Mull instrumentation. It writes reports to `.build_output/mull/` and enforces
an 80% mutation-score threshold for every target that produces at least one
mutant. Targets for which Mull produces no mutants emit a warning and succeed;
the warning is shown in local Nox output and as a GitHub Actions annotation.
Build failures, test failures, invalid reports, and mutation scores below 80%
remain errors. The LLVM major version can be changed with `MULL_LLVM_VERSION`;
custom tool paths can be supplied with `MULL_CXX`, `MULL_RUNNER`, and
`MULL_IR_FRONTEND`. The C compiler used by Bazel can be overridden with
`MULL_CC`.

### Viewing Mull HTML reports

Mull writes an HTML page and its matching JSON data file for each target to
`.build_output/mull/`. The HTML page loads the JSON file dynamically, so serve
the directory over HTTP instead of opening the page directly with `file://`:

```bash
cd .build_output/mull
python3 -m http.server 8000
```

Then open `http://localhost:8000/<target>.html`, for example
`http://localhost:8000/event_fd_test.html`. The page also loads the Mutation
Testing Elements JavaScript from its configured CDN and therefore needs network
access.

The Mull workflow uploads these files as the
`mull-reports-<target>` artifact. Download and extract the artifact, start the
same HTTP server in the extracted directory, and open the target's HTML page in
your browser.

Mutation testing is not reliable for C++ template implementations or tests
that only exercise third-party dependencies. Keep those tests in normal Bazel
test coverage and exclude them from Mull with the `no-mull` tag. Production
implementation units with Mull-compatible non-template code should have a
dedicated test target that remains in the mutation matrix.

17 changes: 14 additions & 3 deletions ext/lima_vm_templates/docker-udf-client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
minimumLimaVersion: 1.1.0

base:
- template://_images/ubuntu-lts
- template://_images/ubuntu-24.04
- template://_default/mounts

# containerd is managed by Docker, not by Lima, so the values are set to false here.
Expand Down Expand Up @@ -58,17 +58,28 @@ provision:
curl -fsSL https://get.docker.com | sh
- mode: system
script: |
#!/bin/bash
set -eux -o pipefail
export DEBIAN_FRONTEND=noninteractive
curl -1sLf 'https://dl.cloudsmith.io/public/mull-project/mull-stable/setup.deb.sh' | bash
apt update && apt install -y protobuf-compiler libzmq3-dev openjdk-17-jdk build-essential git python3.12-dev python3-pip libpcre3-dev clang-tidy-20 lcov
apt install -y clang-20 mull-20=0.34.1
mull-runner-20 --version
test -x /usr/lib/mull-ir-frontend-20
curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.27.0/bazelisk-linux-amd64 -o /usr/bin/bazel
chmod +x /usr/bin/bazel
pip install --break-system-packages numpy
curl -L -o swig-2.0.4.tar.gz https://exasol-script-languages-dependencies.s3.eu-central-1.amazonaws.com/swig-2.0.4.tar.gz && tar zxf swig-2.0.4.tar.gz && (cd swig-2.0.4 && ./configure --prefix=/usr && make && make install) && rm -rf swig-2.0.4 swig-2.0.4.tar.gz
curl -sSL https://install.python-poetry.org | POETRY_HOME=/usr/local/bin/poetry python3 -
poetry_home=/opt/poetry
if [ ! -x "$poetry_home/bin/poetry" ]; then
curl -sSL https://install.python-poetry.org | POETRY_HOME="$poetry_home" python3 - --version 2.3.0
fi
ln -sfn "$poetry_home/bin/poetry" /usr/local/bin/poetry
/usr/local/bin/poetry --version
- mode: system
script: |
#!/bin/sh
echo 'export PATH="/usr/local/bin/poetry/bin:$PATH"' > /etc/profile.d/poetry.sh
echo 'export PATH="/opt/poetry/bin:$PATH"' > /etc/profile.d/poetry.sh
chmod +x /etc/profile.d/poetry.sh
probes:
- script: |
Expand Down
11 changes: 11 additions & 0 deletions mull.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Static Mull configuration. The Nox session prepends Bazel-generated
# includePaths before passing this file to Mull.
excludePaths:
- "(^|.*/).*_test\\.(cc|cpp)"
- "(^|.*/).*_benchmark\\.cc"
- "(^|.*/)third_party/.*"
- ".*bazel-out/.*"

parallelization:
workers: 2
executionWorkers: 2
Loading
Loading