From b99b97f7ad6fecf61c598ca05847cfd13e790f89 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 27 Nov 2016 10:47:33 +0000 Subject: [PATCH] regress: Make arrangements for fuzzraw of gettimeofday Provide a hook to call in Hgettimeofday which is a stub in all but fuzzraw. Signed-off-by: Ian Jackson --- regress/harness.h.m4 | 1 + regress/hcommon.c.m4 | 1 + regress/hfuzzraw.c.m4 | 13 +++++++------ regress/hplayback.c.m4 | 2 ++ regress/hrecord.c.m4 | 2 ++ 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/regress/harness.h.m4 b/regress/harness.h.m4 index 65c0ba6..9d95778 100644 --- a/regress/harness.h.m4 +++ b/regress/harness.h.m4 @@ -77,5 +77,6 @@ void Texit(int rv) NONRETURNING; void Tcommonshutdown(void); void Tmallocshutdown(void); int Ttestinputfd(void); +void T_gettimeofday_hook(void); #endif diff --git a/regress/hcommon.c.m4 b/regress/hcommon.c.m4 index a20ee17..3a70010 100644 --- a/regress/hcommon.c.m4 +++ b/regress/hcommon.c.m4 @@ -71,6 +71,7 @@ static vbuf vbw; int Hgettimeofday(struct timeval *tv, struct timezone *tz) { Tensurerecordfile(); Tmust("gettimeofday","tz",!tz); + T_gettimeofday_hook(); *tv= currenttime; return 0; } diff --git a/regress/hfuzzraw.c.m4 b/regress/hfuzzraw.c.m4 index c9c24ce..24aff42 100644 --- a/regress/hfuzzraw.c.m4 +++ b/regress/hfuzzraw.c.m4 @@ -85,15 +85,18 @@ static void P_read(void *p, size_t sz) { #define P_READ(x) (P_read(&(x), sizeof((x)))) -static void P_updatetime(void) { -m4_dnl xxx -} - static unsigned P_fdf(int fd) { assert(fd>=0 && fd