Fixup broken tests and add missing gen-test-main.