From 2268d20b323a82e7e08d47929946df215399d916 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 19 Nov 2016 18:40:13 +0000 Subject: [PATCH] regress: Move Texit into hnonfuzz We are going to want to do this separately in the fuzz playback. This avoids difficulties with adnstest (which calls Texit rather than Hexit) and programs which return from main(), both of which we want to capture the exit status of in the fuzz playbacks. Signed-off-by: Ian Jackson --- regress/hcommon.c.m4 | 5 ----- regress/hnonfuzz.c | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/regress/hcommon.c.m4 b/regress/hcommon.c.m4 index 74e483e..112caef 100644 --- a/regress/hcommon.c.m4 +++ b/regress/hcommon.c.m4 @@ -326,11 +326,6 @@ void Tallocshutdown(void) { } } -void Texit(int rv) { - Tallocshutdown(); - exit(rv); -} - void Hexit(int rv) { vb.used= 0; Tvbf("exit %d", rv); diff --git a/regress/hnonfuzz.c b/regress/hnonfuzz.c index 82c0fcd..9d4860c 100644 --- a/regress/hnonfuzz.c +++ b/regress/hnonfuzz.c @@ -32,6 +32,11 @@ int main(int argc, char **argv) { return Hmain(argc, argv); } FILE *Hfopen(const char *path, const char *mode) { return fopen(path,mode); } +void Texit(int rv) { + Tallocshutdown(); + exit(rv); +} + int Ttestinputfd(void) { const char *fdstr= getenv("ADNS_TEST_IN_FD"); if (!fdstr) return -1; -- 2.30.2