From d753115a12c9368e24546c04f992740799da0257 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Thu, 31 Aug 2023 11:53:27 -0700 Subject: [PATCH] test: Populate expectation timestamp range --- tl-append-test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tl-append-test.c b/tl-append-test.c index 3ac174c..ea42dc9 100644 --- a/tl-append-test.c +++ b/tl-append-test.c @@ -45,14 +45,16 @@ static ex_t write_to_tl_append(const char *content) { FILE *p = popen("./tl-append", "w"); if (p == NULL) die_err("Couldn't run tl-append"); + time_t start = time(NULL); if (fputs(content, p) == EOF) die("Couldn't write to pipe"); int status = pclose(p); + time_t end = time(NULL); if (status < 0) die_err("Error closing pipe"); if (status != 0) die("tl-append exited abnormally"); - return expectation((time_t)-1, ((time_t)-1), content); + return expectation(start, end, content); } static void verify_log_contents(ex_t exps[]) { -- 2.44.1