Skip to content
hw.dev
hw.dev/signal/ipcraft-cocotb-zero-test-false-pass-2026
SignalIPcraft

A Generated FPGA Test Passed Without Running Its Test

IPcraft's generated pytest wrapper named a nonexistent Cocotb test, and the command still exited successfully after running zero hardware tests.

Thesis connection

Generated verification becomes trustworthy only when the build proves that the expected hardware test actually ran.

#fpga#eda#testing#verification
Read Original

IPcraft generates a Cocotb testbench, which uses Python to drive and inspect simulated chip logic, plus a pytest wrapper that launches it. The wrapper asked for test_register_access, while the generated test was named test_register_semantics. Cocotb ran zero tests and pytest still returned success, giving a green result for a check that never happened.

The repaired generator uses the real test name. More important, its integration test now runs pytest against a generated project and inspects the extensible markup language (XML) results for an actual test case. That second assertion checks execution rather than trusting the shell status alone.

Generated verification has two products: the test source and evidence that the runner discovered it. Teams that emit benches from register maps or hardware descriptions should make expected test count part of the build contract. Start with an exact count for generated suites; if that is impractical, require at least one discovered case and fail on every skip that lacks an approved reason.