X-Git-Url: https://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=test%2Fparser%2Futils.c;h=8900bd72bebdcf37ea04c316520b45f4b0db1a15;hp=f0796fd30f9beea75005df2bd93c00430e56d50e;hb=9f191cc3c194ed51534c22e2dae15b2c08c8abc2;hpb=1def8f21aecc41ac22652e7b8bd1f5bf7a4dae98 diff --git a/test/parser/utils.c b/test/parser/utils.c index f0796fd..8900bd7 100644 --- a/test/parser/utils.c +++ b/test/parser/utils.c @@ -93,6 +93,7 @@ static struct discover_context *test_create_context(struct parser_test *test) list_init(&ctx->boot_options); ctx->device = test_create_device_simple(test); ctx->test_data = test; + ctx->handler = test->handler; device_handler_add_device(test->handler, ctx->device); return ctx; @@ -309,7 +310,8 @@ int parser_replace_file(struct discover_context *ctx, } struct load_url_result *load_url_async(void *ctx, struct pb_url *url, - load_url_complete async_cb, void *async_data) + load_url_complete async_cb, void *async_data, + waiter_cb stdout_cb, void *stdout_data) { struct conf_context *conf = async_data; struct parser_test *test = conf->dc->test_data; @@ -319,6 +321,10 @@ struct load_url_result *load_url_async(void *ctx, struct pb_url *url, struct test_file *file; int fd; + /* Ignore the stdout callback for tests */ + (void)stdout_cb; + (void)stdout_data; + fd = mkstemp(tmp); if (fd < 0) @@ -352,6 +358,7 @@ struct load_url_result *load_url_async(void *ctx, struct pb_url *url, return NULL; result->local = talloc_strdup(result, tmp); + result->url = url; if (rc < 0) result->status = LOAD_ERROR; else