summaryrefslogtreecommitdiff
path: root/testsuite/testsuite.h
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2012-01-25 17:46:52 -0200
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2012-01-26 16:05:05 -0200
commit3dbb8dea5ff4fb23484b604d0c4b9c9ae77a03a5 (patch)
tree8870e55db2efa3de6fdf602d10dff0e9cd5b770a /testsuite/testsuite.h
parent45481ee28c44c66a25015b7682f355d093c3b94a (diff)
downloadkmod-3dbb8dea5ff4fb23484b604d0c4b9c9ae77a03a5.tar.gz
kmod-3dbb8dea5ff4fb23484b604d0c4b9c9ae77a03a5.tar.bz2
kmod-3dbb8dea5ff4fb23484b604d0c4b9c9ae77a03a5.zip
testsuite: match outputs of test with a known correct one
Tests may put the correct output in a file and tell testsuite to check if it matches the output from the test running. Testsuite compares the outputs while running the test: it creates a pipe between parent and child; parent reads both stdout and stderr from child and compares with the correct output.
Diffstat (limited to 'testsuite/testsuite.h')
-rw-r--r--testsuite/testsuite.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/testsuite/testsuite.h b/testsuite/testsuite.h
index e06ecf2..b2831d4 100644
--- a/testsuite/testsuite.h
+++ b/testsuite/testsuite.h
@@ -20,6 +20,10 @@ enum test_config {
struct test {
const char *name;
const char *description;
+ struct {
+ const char *stdout;
+ const char *stderr;
+ } output;
testfunc func;
const char *config[_TC_LAST];
bool need_spawn;