Added tailpipe.py and improved redirecting test trace/log output over fifos

This mostly involved futzing around with some of the less intuitive
parts of Unix's named-pipes behavior.

This is a bit important since the tests can quickly generate several
gigabytes of trace output.
This commit is contained in:
Christopher Haster
2022-08-27 16:50:03 -05:00
parent 5279fc6022
commit c9a6e3a95b
5 changed files with 268 additions and 90 deletions
+22 -1
View File
@@ -1,7 +1,26 @@
#ifndef TEST_RUNNER_H
#define TEST_RUNNER_H
#include "lfs.h"
// override LFS_TRACE
void test_trace(const char *fmt, ...);
#define LFS_TRACE_(fmt, ...) \
test_trace("%s:%d:trace: " fmt "%s\n", \
__FILE__, \
__LINE__, \
__VA_ARGS__)
#define LFS_TRACE(...) LFS_TRACE_(__VA_ARGS__, "")
#define LFS_TESTBD_TRACE(...) LFS_TRACE_(__VA_ARGS__, "")
// note these are indirectly included in any generated files
#include "bd/lfs_testbd.h"
#include <stdio.h>
// give source a chance to define feature macros
#undef _FEATURES_H
#undef _STDIO_H
// generated test configurations
@@ -10,6 +29,8 @@ enum test_flags {
};
typedef uint8_t test_flags_t;
struct lfs_config;
struct test_case {
const char *id;
const char *name;