chiark / gitweb /
regress: fuzzraw: Tshutdown: Tolerate lack of Tensuresetup
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 30 Nov 2016 23:50:43 +0000 (23:50 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 11 Jun 2020 15:13:02 +0000 (16:13 +0100)
If no syscalls were made, Tensuresetup won't have been called.

(We don't want to call it because it's what handles the first
gettimeofday timestamp, so we need to call it exactly when
hplayback.c.m4 calls it.)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
regress/hfuzzraw.c.m4

index 0ed71a2c326232cba12bb4e72fdac6b58ea575ec..339611c5934cbbbde695c2c55ae47312140a495c 100644 (file)
@@ -91,6 +91,7 @@ static void Pformat(const char *what) {
 }
 
 extern void Tshutdown(void) {
+  if (!Tinputfile) return;
   int c= fgetc(Tinputfile);
   if (c!=EOF) Pformat("unwanted additional syscall reply data");
   if (ferror(Tinputfile)) Tfailed("read test log input (at end)");