Overview
In the TestRIG evidence, regression testing is described operationally as collecting a library of instruction-trace tests that can be used to quickly check all previous counterexamples. These regression tests are derived from instruction traces rather than hand-written assertion tests, and the evidence states that they do not require maintenance in the way hand-written tests with assertions do.
Test artifact format
TestRIG instruction traces can be converted to and from a human-readable format. The same mechanism is used for terminal reporting and for reading and writing trace files, either individually or in bulk from a directory. This import/export capability is what enables the collection of a regression-test library based on prior counterexamples.
Counterexample reduction before regression use
The evidence connects regression-test creation with TestRIG’s counterexample shrinking and simplification workflow. In model-based testing, shrinking or simplification is described as safe to try because any changed trace that still diverges is kept. Simplification can remove esoteric instructions that distract from the root cause; for example, a trapping memory operation may be simplified to an ecall, an instruction that only traps, to make the error more obvious.
TestRIG also uses smart shrinking after QCVEngine finds a counterexample. QuickCheck’s list-shrinking removes irrelevant sequences and retests, while additional smart shrinking can transform a sequence, such as propagating an instruction’s output register into future input operands, allowing further reduction. This can turn a larger counterexample into a shorter trace that still exposes the bug.
Practical role
Within this evidence, regression testing serves as a fast re-check mechanism for failures already discovered during randomized, model-based CPU testing. The regression suite preserves previous counterexamples as replayable traces, while shrinking and simplification make those traces easier to inspect and less dependent on unrelated instructions.