X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=test%2Fparser%2Futils.c;h=69b0006d1f25c6263b8f58f76e02ad6cd466ab36;hp=a1d0ad24b590d9938dcdd12ed00b3548137d1e97;hb=973a34df046f61a6688c3f3498efa8cd30777441;hpb=e0a7cb18a4237aa826e5e121ff17373814a1872d diff --git a/test/parser/utils.c b/test/parser/utils.c index a1d0ad2..69b0006 100644 --- a/test/parser/utils.c +++ b/test/parser/utils.c @@ -131,7 +131,12 @@ int test_run_parser(struct parser_test *test, const char *parser_name) continue; test->ctx->parser = parser; rc = parser->parse(test->ctx, test->conf.buf, test->conf.size); + break; } + if (i == n_parsers) + errx(EXIT_FAILURE, "%s: parser '%s' not found", + __func__, parser_name); + return rc; }