From f0df55bd32af58daf7c09406003bda637fea99ea Mon Sep 17 00:00:00 2001 From: "Shannon F. Stewman" Date: Fri, 27 Nov 2020 16:29:56 -0500 Subject: [PATCH] Ensures that reperf runners are finalized after each iteration --- src/retest/reperf.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/retest/reperf.c b/src/retest/reperf.c index e19d6b4dd..a1d062f2d 100644 --- a/src/retest/reperf.c +++ b/src/retest/reperf.c @@ -696,13 +696,13 @@ perf_case_run(struct perf_case *c, enum halt halt, } } + ret = ERROR_NONE; + if (c->mt != MATCH_NONE) { struct timespec t0, t1; xclock_gettime(&t0); - ret = ERROR_NONE; - for (iter=0; iter < c->count; iter++) { int r; @@ -721,21 +721,18 @@ perf_case_run(struct perf_case *c, enum halt halt, str_free(&contents); } - if (ret != ERROR_NONE) { - fsm_runner_finalize(&runner); - return ret; - } - - xclock_gettime(&t1); + if (ret == ERROR_NONE) { + xclock_gettime(&t1); - report_delta(&t->run_delta, &t0, &t1); + report_delta(&t->run_delta, &t0, &t1); + } } done: fsm_runner_finalize(&runner); - return ERROR_NONE; + return ret; } static void