Skip to content
A public database of C compiler test cases, minimal test runners, and public test results.
Branch: master
Clone or download
Latest commit 2d714c8 Aug 31, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
ci fix link Aug 28, 2018
runners/single-exec add c2go (#32) Aug 28, 2018
scripts be pedantic Aug 31, 2018
tests import from tcc tests2 Aug 31, 2018
.travis.yml document dependencies Aug 25, 2018
LICENSE licensing Aug 25, 2018 update readme links Aug 28, 2018
single-exec Search (#24) Aug 28, 2018


This project aims to be a collaborative database of C compiler test cases, minimal test runners, and public test results. The general idea is that the various test suites here adhere to well defined, simple interfaces and projects can contribute tests back that match those interfaces, or use those tests by implementing runner scripts matching the specifications.

There are many tools that may benefit such as C compilers, transpilers, interpreters and emulators, so we should seek to agree on simple easy test interfaces, and implement those interfaces for a variety of tools.

results are published daily to

Test suites

The top level test-suite runners output output.

single-exec suite

entry point is ./single-exec


The runner will be invoked as:

$ ./runners/single-exec/$NAME test/single-exec/case.c

The runner is free to output any data it wants, but must return nonzero on failure.

The runner will be considered a failure if it takes more than 5 minutes.


  • Single .c file tests.
  • 'main' is the entry point.
  • The file $t.c.expected must match stdout+stderr of the test.
  • The test programs exit with 0 on success.

C standard, Portability, preprocessor and libc requirements are specified via tags that can be filtered against using search queries, that can generate skip lists.


$ ./single-exec gcc-x86_64

Skipping tests

Try to skip a test if your compiler platform can NEVER pass it, the test is not appropriate. In that case, there is only one mechanism, add a command that prints a list of tests to skip on stdout named:


Search and query

All tests have a matching $t.tags file. This file specifies attributes of the test that can be filtered and queried.

The query language is based off of tags.

The query language grammar is shown here:

Support tags are currently

suite={single-exec, ...}
	The test should be portable C.
	The test should pass on x86_64
    Test relies on the preprocessor
    Test relies on libc

Implicit tags:

c89 implies c99 and c11 c99 implies c11

example query:

$ ./scripts/make-search-index
$ ./scripts/search-tests "c99 suite=single-exec (portable or arch-amd64)"

These queries can be used to generate skip lists.

otags files

otag files are intended to allow a tests origin to be discovered. They contain the following fields.



Running tests

  • posix sh
  • python3
  • coreutils
  • tool under test

Querying tests:

Currently test search is based on

We are sympathetic to those who do not wish to deal with installing a lesser known third party tool, so will think of ways to ease the burden in the future.


Naming test cases

The names are not stable for now, so if you refer to a test case in your issue tracker, it is best to name it something like c-testsuite/$CTESTGITCOMMIT/path/to/test.

Getting a summary from the command line

./single-exec $runner | ./scripts/tapsummary | head

The full TAP test suites report can be viewed or 'curl'ed

For example:

You can’t perform that action at this time.