We have parsers passing discover_contexts around, which we want to hook
into the test framework. Add a void * member, which the test code can
use to reference the test.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ctx = talloc(handler, struct discover_context);
ctx->device = device;
ctx->conf_url = NULL;
+ ctx->test_data = NULL;
list_init(&ctx->boot_options);
return ctx;
struct list boot_options;
struct pb_url *conf_url;
enum conf_method method;
+ void *test_data;
};
struct device_handler *device_handler_init(struct discover_server *server,
list_init(&ctx->boot_options);
ctx->device = test_create_device_simple(test);
+ ctx->test_data = test;
device_handler_add_device(test->handler, ctx->device);
return ctx;