From: Ian Jackson Date: Sat, 19 Nov 2016 18:40:13 +0000 (+0000) Subject: regress: Move Texit into hnonfuzz X-Git-Tag: adns-1.6.0~90 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=2268d20b323a82e7e08d47929946df215399d916;p=adns.git 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 --- 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;