The Ripper ships with a small offline test family designed for operators building from source. Every test is pure C, linked against the freshly-built liboni_ripper.so, and runnable without an Informix engine, a target database, or any network access. The suite covers the formatting and translation paths that account for most of the customer-visible regressions in practice.
Most operators install via the RPM / DEB package and never need to run these tests. The suite is documented here for the operators who build from source, work on the codebase, or want a quick sanity-check that a clean checkout produces a working library.
. /home/informix/etc/setcsdk make check
Builds every test binary if needed, runs them in order, and returns a clean PASS / FAIL summary with a process exit code (0 if every test passed; 1 if any failed). The exit code makes the target a clean gate for CI or pre-commit hooks.
Typical output on a green build:
——— running offline test suite ——— [test/dialect_test] ... per-cell PASS lines ... test/dialect_test: PASS [test/buffer_test] ... per-cell PASS lines ... test/buffer_test: PASS [test/build_col_spec_test] ... per-case PASS lines ... 26 passed, 0 failed test/build_col_spec_test: PASS ——— ALL OFFLINE TESTS PASSED (3) ———
| Test | What it covers | Why it's offline |
|---|---|---|
| test/dialect_test | The per-target dialect rewriter (INTERVAL, BOOLEAN, MDY, TODAY, NUL splice, DATETIME forms) across every supported dialect — postgres, mysql, mariadb, db2, ingres, oracle, mssql | The rewriter is stateless; pass in source SQL + dialect, get rewritten SQL back. No database required. |
| test/buffer_test | The target-offline buffer subsystem (memory ring + mmap spill + probe thread + startup recovery) | Self-contained subsystem with no DB dependency — buffers byte arrays in memory + on disk. |
| test/build_col_spec_test | The schema-alter helper that builds column-spec strings from cdc_column_t (DECIMAL/MONEY prec-scale, DATETIME/INTERVAL qualifier-aware emission); plus the ALTER-emission diff helper (column ADD / DROP / MODIFY) | Pure metadata-to-string operation. 26 test cases covering DECIMAL / MONEY shapes + DATETIME / INTERVAL qualifiers + the schema-alter regression matrix. |
make tests
Builds every test binary in the suite, including the live ones (test/dialect_live_test) that make check skips. Useful when an operator wants to run the live test separately against a real Informix engine.
The live test (test/dialect_live_test) exercises the rewriter against an actual Informix engine via the CSDK, covering the cases that need a connection (qualifier round-trip through dttoasc / intoasc, locale-driven decimal-separator behaviour, etc.). It's kept out of make check because the suite is meant to be runnable without any DB infrastructure.
To run it manually after make tests:
export INFORMIXSERVER=<server> ./test/dialect_live_test
The live test exits cleanly when no INFORMIXSERVER is set — running it in an environment without an Informix engine is safe; it just reports the skip and returns 0.
Each test is a standalone binary; running it directly gives more verbose output than the make check summary. Useful when a failure surfaces and the operator wants to see which specific case failed.
./test/dialect_test # all dialect cells with verbose output ./test/buffer_test # buffer subsystem cases ./test/build_col_spec_test # DECIMAL/DATETIME/INTERVAL cases + ALTER regression
Each binary returns exit 0 on all-pass, exit 1 on any failure.
Drop the source at test/<name>_test.c (the _test suffix is convention, not a hard requirement) and add the name to TEST_BINS_OFFLINE in the Makefile. The generic test/%: test/%.c $(LIB_REAL) pattern rule picks up the build automatically; the check target's runner iterates TEST_BINS_OFFLINE and reports PASS / FAIL based on exit codes.
For tests that need an Informix engine (or any other external infrastructure), add the binary to TEST_BINS_LIVE instead. Those are built by make tests but skipped by make check.
The offline suite is deliberately narrow: it covers formatting, translation, and the buffer subsystem — the parts that are state-of-machine-only and can be exercised without external infrastructure. End-to-end replay verification against real targets (PostgreSQL / MySQL / MariaDB / Db2 / Oracle / MSSQL via ODBC / Informix) lives in test/run_test.sh -t <mode> which spins up the source DB harness, runs the ripper, replays against a target, and diffs the source vs. target rows via Informix UNLOAD. That's a separate operational test, not part of make check, because it requires the target infrastructure to be provisioned and accessible.
To discuss how Oninit ® can assist please call on +1-913-732-8892 or alternatively just send an email specifying your requirements.
You get all this for free.. think about what you get if you pay us