diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-09-26 15:45:58 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2013-09-26 15:45:58 +0800 |
commit | ffc167572a9d56c52908aebefe62ba3e3e2a9cf8 (patch) | |
tree | 9878d068dc4994dcad32c37ea6321f0995193ab2 /test/parser/test-grub2-parser-error.c | |
parent | 300859ca50c0ea5d9c17d27fd3e3538ce966e08a (diff) | |
download | talos-petitboot-ffc167572a9d56c52908aebefe62ba3e3e2a9cf8.tar.gz talos-petitboot-ffc167572a9d56c52908aebefe62ba3e3e2a9cf8.zip |
discover/grub2: Clean up error-handling for grub2 parser & lexer
Rather than printf() & exit(), use the pb logging functions and abort
the parse.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'test/parser/test-grub2-parser-error.c')
-rw-r--r-- | test/parser/test-grub2-parser-error.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/parser/test-grub2-parser-error.c b/test/parser/test-grub2-parser-error.c new file mode 100644 index 0000000..a7a00a4 --- /dev/null +++ b/test/parser/test-grub2-parser-error.c @@ -0,0 +1,13 @@ + +#include "parser-test.h" + +#if 0 /* PARSER_EMBEDDED_CONFIG */ +{ +#endif + +void run_test(struct parser_test *test) +{ + test_read_conf_embedded(test); + test_run_parser(test, "grub2"); + check_boot_option_count(test->ctx, 0); +} |