chiark / gitweb /
regress: Move Texit into hnonfuzz
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 19 Nov 2016 18:40:13 +0000 (18:40 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 11 Jun 2020 15:13:02 +0000 (16:13 +0100)
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 <ijackson@chiark.greenend.org.uk>
regress/hcommon.c.m4
regress/hnonfuzz.c

index 74e483e5c82d39cbb7180a3b967cf522865c92de..112caef8240e9aad18f3550e214c9dba568f3c9f 100644 (file)
@@ -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);
index 82c0fcd2ebcce37de9d3fba43c0a8ccfd400abd6..9d4860ca590bc054471767bef271dc54bc2fccb1 100644 (file)
@@ -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;