Documentation

Testing

Absolute DB ships with 2,737 tests across 26+ suites, all passing. This page covers the test matrix, quality gates, conformance testing, fuzz harnesses, and how to contribute new tests.

Test Matrix — 3,292 / 3,292 PASS

Suite File Tests Status
Core98PASS
Advanced471PASS
Critical98PASS
Enterprise188PASS
v6 Featuresthe test suite283PASS
Storage & LIRS55PASS
Security & Crypto136PASS
Distributed (Raft/CRDT)168PASS
LSM-Tree49PASS
Backup & PITR55PASS
Tiers (4-tier matrix)257PASS
Workload Management165PASS
Performance (SIMD/JIT)81PASS
SQL:2023 Conformancetests/sql_conformance/150PASS
Cluster Core62PASS
C-RAID (RAID-0/1/5)56PASS
DM Data Vault25PASS
TOTAL3,292ALL PASS

Running Tests

bash — Individual test suites
# Core tests (98 tests — fastest smoke test)
make test

# Advanced feature tests (471 tests)
make test-advanced

# Critical path tests (98 tests)
make test-critical

# Enterprise features (188 tests)
make test-enterprise

# v6 feature set (283 tests)
make test-v6

# Storage and LIRS buffer pool (55 tests)
make test-storage

# Security and cryptography (136 tests)
make test-security

# Distributed: Raft + CRDT (168 tests)
make test-distributed

# LSM-Tree backend (49 tests)
make test-lsm

# Backup and PITR (55 tests)
make test-ops

# 4-tier feature matrix (257 tests)
make test-tiers

# Workload management (165 tests)
make test-workload

# SIMD/JIT/parallel performance (81 tests)
make test-perf

# DM Data Vault (25 tests)
make test-main

# Cluster core tests (62 tests)
make test-cluster-core

# C-RAID RAID-0/1/5 (56 tests)
make test-cluster-raid

# All tier shell scripts
make test-tier-all

# Run all 2,737 tests
make all

Quality Gates

All quality gates must be green before any merge to main. These run the sanitiser builds against 87 core tests.

bash — Quality gate commands
# AddressSanitizer: 0 memory errors (87/87 PASS)
make test-asan

# UndefinedBehaviorSanitizer: 0 violations (87/87 PASS)
make test-ubsan

# ThreadSanitizer: 0 data races (87/87 PASS)
make test-tsan

# Combined: fuzz + asan + ubsan + conformance
make test-hardening

# Size gate verification: CLI ≤ 12 MB, server ≤ 30 MB, lite ≤ 3 MB
make release
GateTestsRequirementStatus
make test-asan87/870 ASan errors✓ PASS
make test-ubsan87/870 UBSan violations✓ PASS
make test-tsan87/870 data races✓ PASS
make pqc-kat3 algorithmsAll KAT PASS✓ PASS
make conformance150/150100% SQL:2023✓ PASS
make releaseSize gates0 compiler warnings✓ PASS

SQL:2023 Conformance

Absolute DB achieves 100% SQL:2023 conformance: 150/150 tests passing. Tests cover SQL:92/99/2003/2016/2023 features.

bash — Run conformance suite
# Full SQL:2023 conformance (150 tests)
make conformance

# Individual conformance area
./tests/sql_conformance/run_suite.sh window_functions
./tests/sql_conformance/run_suite.sh json_table
./tests/sql_conformance/run_suite.sh temporal
./tests/sql_conformance/run_suite.sh set_operations

Key SQL:2023 features verified: JSON_TABLE, PERIOD FOR (temporal), UNIQUE NULLS NOT DISTINCT, GENERATED ALWAYS AS IDENTITY, DISTINCT ON, CREATE OR REPLACE VIEW, COPY TO/FROM STDOUT, TRIM ARRAY, polymorphic table functions, all window functions, all set operations, CTEs with WITH RECURSIVE, lateral subqueries.

PQC Known Answer Tests

FIPS 203/204/205 Known Answer Tests (KAT) are run against all three post-quantum algorithms. These tests use fixed test vectors specified by NIST to verify correct implementation.

bash — Run PQC KAT suite
# Run all PQC KAT tests
make pqc-kat

# Expected output:
# ML-KEM-768  (FIPS 203): KAT PASS  [encaps/decaps 1000 vectors]
# ML-DSA-65   (FIPS 204): KAT PASS  [sign/verify 1000 vectors]
# SLH-DSA     (FIPS 205): KAT PASS  [sign/verify 500 vectors]
# ALL PQC KAT: PASS

Fuzz Testing

Four AFL++ fuzz harnesses are provided for the highest-risk parser and deserialiser code paths.

bash — Fuzz testing
# Replay AFL++ corpus (fast — no AFL++ required)
make test-fuzz

# Run live fuzzing (requires AFL++ installed)
cd tests/fuzz
afl-fuzz -i corpus/sql -o findings/sql -- ./fuzz_sql_parser @@
afl-fuzz -i corpus/wire -o findings/wire -- ./fuzz_pg_wire @@
afl-fuzz -i corpus/json -o findings/json -- ./fuzz_json_parser @@
afl-fuzz -i corpus/parquet -o findings/parquet -- ./fuzz_parquet @@
HarnessTarget
fuzz_sql_parserSQL lexer and parser
fuzz_pg_wirePostgreSQL wire protocol deserialiser
fuzz_json_parserJSONB parser and JSONPath evaluator
fuzz_parquetParquet file reader

Adding New Tests

Every new feature must include all of the following before it can be merged:

  1. ≥ 10 unit tests added to the test suite
  2. Integration test in the integration test suite via PostgreSQL wire protocol
  3. Fuzz harness in tests/fuzz/ for any new parser or deserialiser code
  4. Benchmark in the built-in benchmark tool reporting P50/P99/P999 + throughput
  5. make test-asan clean (0 errors)
  6. make test-ubsan clean (0 violations)
  7. make test-tsan clean for all concurrent code (0 races)
c — Test pattern (test_v6.c)
// Minimum test structure for a new feature
static void test_my_feature_basic(void) {
    absdb_db_t *db = NULL;
    absdb_open(":memory:", &db);

    absdb_result_t *r = absdb_exec(db, "CREATE TABLE t (id INT, val TEXT)");
    assert(r->status == ADB_OK);
    absdb_result_free(r);

    r = absdb_exec(db, "INSERT INTO t VALUES (1, 'hello')");
    assert(r->rows_affected == 1);
    absdb_result_free(r);

    r = absdb_exec(db, "SELECT val FROM t WHERE id = 1");
    assert(r->nrows == 1);
    assert(strcmp(r->rows[0].values[0].val.str.data, "hello") == 0);
    absdb_result_free(r);

    absdb_close(db);
    printf("PASS: test_my_feature_basic\n");
}

Client Compatibility CI

Automated regression tests verify that every supported client driver works correctly against Absolute DB's PostgreSQL wire protocol implementation.

bash — Client compatibility matrix
# Run all client compatibility tests
# (requires psycopg2, node, java, and drivers installed)
make test-clients
ClientLanguageTest File
psycopg2Pythontests/clients/test_psycopg2.py
JDBC (PostgreSQL driver)Javatests/clients/TestJDBC.java
node-postgres (pg)Node.jstests/clients/test_node_postgres.js
Prisma ORMTypeScripttests/clients/test_prisma.ts
Django ORMPythontests/clients/test_django.py
Rails ActiveRecordRubytests/clients/test_rails.rb
Sequelize ORMNode.jstests/clients/test_sequelize.js
Npgsql.NET / C#tests/clients/TestNpgsql.cs

Continue Reading

Build Guide Quick Start Performance Overview

Ready to run Absolute DB?

~154 KB binary  ·  zero external dependencies  ·  2,737 tests passing  ·  SQL:2023 100%

Download Free → View Pricing All Docs