summaryrefslogtreecommitdiffstats
path: root/test/parser/parser-test.h
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-05-15 16:01:14 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-05-16 11:53:34 +0800
commita5a787c5d170708be5d15ee9418520917653a104 (patch)
treea27d0556071c3f36c75b65d3f759438f266fca08 /test/parser/parser-test.h
parent5d16719922866622fc0f42c570b9934f595e3c33 (diff)
downloadtalos-petitboot-a5a787c5d170708be5d15ee9418520917653a104.tar.gz
talos-petitboot-a5a787c5d170708be5d15ee9418520917653a104.zip
test/parser: Allow tests to provide pre-loaded config data
Some tests may want to use an existing buffer as config data, so add test_read_config_data() to allow this. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'test/parser/parser-test.h')
-rw-r--r--test/parser/parser-test.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/parser/parser-test.h b/test/parser/parser-test.h
index e17cbbc..5baa458 100644
--- a/test/parser/parser-test.h
+++ b/test/parser/parser-test.h
@@ -22,6 +22,11 @@ void __register_parser(struct parser *parser);
struct discover_device *test_create_device(struct discover_context *ctx,
const char *name);
+#define test_read_conf_data(t, d) \
+ __test_read_conf_data(t, d, sizeof(d))
+
+void __test_read_conf_data(struct parser_test *test,
+ const char *buf, size_t len);
void test_read_conf_file(struct parser_test *test, const char *filename);
int test_run_parser(struct parser_test *test, const char *parser_name);
OpenPOWER on IntegriCloud