From 93cbe569582626793f79e5626970703059f88933 Mon Sep 17 00:00:00 2001 From: Arkadiusz Hiler Date: Mon, 1 Apr 2019 09:32:34 +0300 Subject: runner: Refactor metadata parsing To aid testing function parsing metadata.txt is split into outer helper that operates on dirfd and inner function that operates on FILE*. This allows us to test the parsing using fmemopen(), limiting the amount of necessary boilerplate. Signed-off-by: Arkadiusz Hiler Reviewed-by: Petri Latvala --- runner/executor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runner/executor.c') diff --git a/runner/executor.c b/runner/executor.c index a40e2dd1..0e91b7ab 100644 --- a/runner/executor.c +++ b/runner/executor.c @@ -1112,7 +1112,7 @@ bool initialize_execute_state_from_resume(int dirfd, memset(state, 0, sizeof(*state)); state->resuming = true; - if (!read_settings(settings, dirfd) || + if (!read_settings_from_dir(settings, dirfd) || !read_job_list(list, dirfd)) { close(dirfd); return false; -- cgit v1.2.3