+conventions:
+
+each test is in a separate file at a path like src/directory/file.c with
+its own main
+
+the test should return 0 on success and non-0 on failure, on failure it
+should print error messages to standard out if possible, on success no
+message should be printed
+
+to help with the above test protocol use t_error function for printing
+errors and return t_status from main, see src/common/test.h
+(t_error allows standard printf formatting, outputs at most 512bytes
+in a single write call to fd 1, so there is no buffering, long outputs
+are truncated, it sets the global t_status to 1)
+
+it is common to do many similar checks in a test, in such cases macros
+may be used to simplify the code like
+#define T1(a,b) (check(a,b) || (t_error("check(%s,%s) failed\n", a, b),0))
+#define T2(f,w) (result=(f), result==(w) || (t_error("%s failed: got %s, want %s\n", #f, result, w),0))
+
+binaries should be possible to run from arbitrary directory.
+the build system runs the tests using the src/common/run tool which
+kills the test process after a timeout and reports the exit status
+in case of failure
+
+directories:
+
+src/api: interface tests, build time include header tests
+src/common: common utilities compiled into libtest.a
+src/functional: functional tests aiming for large coverage of libc
+src/math: tests for each math function with input-output test vectors
+src/regression: regression tests aiming for testing particular bugs
+
+initial set of functional tests are derived from the libc-testsuit of
+Rich Felker, regression tests should contain reference of the bug
+(musl commit hash, glibc bug tracker url, etc)
+
+build system: