# Testing signals — sqlite/sqlite

> Canonical page: https://codevetter.com/unpack/sqlite/testing-signals

# Testing signals — sqlite/sqlite

Scanned commit fde3a84dddf35f4c19797c8afad04a44c596f4d8 (2026-09-21). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

Testing is TCL-first: 1,195 `.test` scripts in `test/` are executed by `testfixture`, an augmented tclsh built from `src/tclsqlite.c` plus 44 `src/test*.c` harness modules that expose internals (malloc fault injection, VFS shims, thread control, syscall interception) to TCL. `test/testrunner.tcl` parallelizes across cores and drives named suites and permutations; `permutations.test` defines 58 test_suite configurations. `make devtest` — the developers' minimum pre-check-in bar — chains `srctree-check` (generated files up to date) and `sourcetest` before running `testrunner.tcl mdevtest`. Fuzzing is a separate, substantial tier: `fuzzcheck` replays fuzzer corpora stored as SQLite databases, and `ossfuzz.c` is the OSS-Fuzz entry point. No CI configuration lives in the repo; extension suites are colocated with their extensions.
- The test corpus is 1,195 `.test` TCL scripts under `test/`, run by the `testfixture` binary built from `$(TESTFIXTURE_SRC)`; `make smoketest` runs just `./testfixture test/main.test` as the fast sanity check. — [test/main.test](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/test/main.test) [main.mk#L1821](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/main.mk#L1821) [main.mk#L1928-L1930](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/main.mk#L1928-L1930)
- `make devtest` depends on `srctree-check` and `sourcetest`, then runs `test/testrunner.tcl mdevtest`; `test`, `quicktest` and the legacy `fulltest`/`alltest`/`soaktest` targets are aliases onto `devtest` or `releasetest`. — [main.mk#L1868-L1912](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/main.mk#L1868-L1912)
- `tool/srctree-check.tcl` is a guard against stale generated artifacts: it regenerates `autoconf/Makefile.msc` via `tool/mkmsvcmin.tcl` and diffs it, and checks `VERSION` against `autoconf/tea/configure.ac`, exiting non-zero with a suggested fix command. — [tool/srctree-check.tcl#L1-L45](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/tool/srctree-check.tcl#L1-L45)
- `test/testrunner.tcl` bootstraps its own interpreter: `find_interpreter` tries `package require sqlite3`, falls back to sourcing a local `pkgIndex.tcl`, then to re-execing under `./testfixture`, and finally offers to build the TCL extension — which is why `make tclextension-install` is recommended before testing. — [test/testrunner.tcl#L26-L60](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/test/testrunner.tcl#L26-L60) [main.mk#L1719](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/main.mk#L1719) [AGENTS.md](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/AGENTS.md)
- The runner estimates work per job class with weights `tcl=1`, `fuzz=22`, `bld=66`, `make=102` (optionally overridden by `test/testrunner_estwork.tcl`) so parallel scheduling packs long builds first. — [test/testrunner.tcl#L11-L21](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/test/testrunner.tcl#L11-L21)
- `test/testrunner_data.tcl` is the declarative test matrix: `trd_builds`, `trd_configs`, `trd_extras`, `trd_all_configs`, `trd_fuzztest_data` and `trd_buildscript` define per-platform build configurations and which suites each one runs, mirroring the old `all.test`. — [test/testrunner_data.tcl#L72-L90](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/test/testrunner_data.tcl#L72-L90) [test/testrunner_data.tcl#L372-L470](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/test/testrunner_data.tcl#L372-L470)
- `test/permutations.test` defines 58 `test_suite` permutations, letting the same `.test` files be re-run under different pragma/compile configurations (this is also what `make valgrindtest` invokes with the `valgrind` permutation). — [test/permutations.test](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/test/permutations.test) [main.mk#L1920-L1922](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/main.mk#L1920-L1922)
- 44 `src/test*.c` modules expose internals to TCL for white-box testing, including `test_malloc.c` (allocation fault injection), `test_vfs.c`/`test_devsym.c`/`test_demovfs.c` (VFS simulation), `test_journal.c`, `test_syscall.c` (syscall interception), `test_thread.c`, `test_mutex.c` and `test_pcache.c`. — [src/test_malloc.c](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/src/test_malloc.c) [src/test_vfs.c](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/src/test_vfs.c) [src/test_syscall.c](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/src/test_syscall.c) [src/test_thread.c](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/src/test_thread.c) [src/test1.c](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/src/test1.c)
- `test/fuzzcheck.c` replays fuzzer output stored in SQLite databases with `db(dbid, dbcontent)` and `xsql(sqlid, sqltext)` tables, looking only for crashes, assertion faults and leaks — it explicitly does not verify output; eight `fuzzdata*.db` corpora ship in-tree. — [test/fuzzcheck.c#L12-L50](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/test/fuzzcheck.c#L12-L50) [test/fuzzdata1.db](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/test/fuzzdata1.db) [test/fuzzdata8.db](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/test/fuzzdata8.db) [main.mk#L1840](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/main.mk#L1840)
- `test/ossfuzz.c` is the Google OSS-Fuzz `LLVMFuzzerTestOneInput` harness with debug flags (`FUZZ_SQL_TRACE`, `FUZZ_SHOW_MAX_DELAY`, `FUZZ_SHOW_ERRORS`) that can be driven interactively through `test/ossshell.c`. — [test/ossfuzz.c#L1-L35](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/test/ossfuzz.c#L1-L35) [test/ossshell.c](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/test/ossshell.c)
- Additional specialized fuzzers exist for distinct attack surfaces: `test/dbfuzz.c` and `test/dbfuzz2.c` (database file images), `test/sessionfuzz.c` (changeset blobs), `test/optfuzz.c` (query optimizer equivalence), and `test/fuzzinvariants.c` (result invariants). — [test/dbfuzz2.c](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/test/dbfuzz2.c) [test/sessionfuzz.c](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/test/sessionfuzz.c) [test/optfuzz.c](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/test/optfuzz.c) [test/fuzzinvariants.c](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/test/fuzzinvariants.c)
- Extension test suites live beside their extensions rather than in `test/`: 149 files under `ext/fts5/test`, 44 `.test` files in `ext/session/`, 43 in `ext/rbu/`, 27 in `ext/rtree/`, 15 in `ext/recover/`, and 5 in `ext/intck/`. — [ext/fts5/test](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/ext/fts5/test) [ext/session/sqlite3session.c](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/ext/session/sqlite3session.c) [ext/rbu](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/ext/rbu) [ext/recover/recovercorrupt.test](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/ext/recover/recovercorrupt.test) [ext/intck/intck1.test](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/ext/intck/intck1.test)
- Multi-process concurrency is tested by a separate harness, `mptest/mptest.c` with `config01.test`, `config02.test`, `crash01.test`, `crash02.subtest` and `multiwrite01.test`, exercising cross-process locking that single-process TCL tests cannot reach. — [mptest/mptest.c](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/mptest/mptest.c) [mptest/crash01.test](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/mptest/crash01.test) [mptest/multiwrite01.test](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/mptest/multiwrite01.test)
- Failure triage is documented and tooled: `test/testrunner.tcl errors` and `status` targets are wired into `main.mk`, and AGENTS.md instructs checking `grep '!' testrunner.log`. — [main.mk#L1878-L1886](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/main.mk#L1878-L1886) [doc/testrunner.md#L1-L40](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/doc/testrunner.md#L1-L40) [AGENTS.md](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/AGENTS.md)
- No in-repo CI exists — there is no `.github/`, `.gitlab-ci.yml`, or `.travis.yml` — so coverage of the release matrix (`releasetest`, valgrind, MSVC via `tool/build-all-msvc.bat`, `tool/omittest.tcl` for OMIT-flag combinations) depends on developers running it locally. — [main.mk#L1902-L1906](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/main.mk#L1902-L1906) [tool/build-all-msvc.bat](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/tool/build-all-msvc.bat) [tool/omittest.tcl](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/tool/omittest.tcl) [.fossil-settings/ignore-glob](https://github.com/sqlite/sqlite/blob/fde3a84dddf35f4c19797c8afad04a44c596f4d8/.fossil-settings/ignore-glob)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
