]> git.cworth.org Git - fips/commitdiff
Re-enable termination message at exit.
authorMark Janes <mark.a.janes@intel.com>
Mon, 18 Aug 2014 22:50:04 +0000 (15:50 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 19 Aug 2014 23:26:13 +0000 (16:26 -0700)
The fips unit tests ("make check") rely on a termination message to
verify that the target application was successfully pre-loaded.  This
termination message was inadvertently lost in the refactor of commit
b0e640a505171550746af20e940076c579a0e638 .

metrics.c

index 71e2164bc4a4fb3f1bba6069bf4a86980634f7e3..a3b86e26c9c3a2b198b099de6fd5571510130fb2 100644 (file)
--- a/metrics.c
+++ b/metrics.c
@@ -764,6 +764,12 @@ metrics_collect_available (metrics_t *metrics)
        }
 }
 
+static void
+metrics_exit (void)
+{
+       if (verbose)
+               printf ("fips: terminating\n");
+}
 
 void
 metrics_end_frame (metrics_t *metrics)
@@ -773,6 +779,7 @@ metrics_end_frame (metrics_t *metrics)
 
        if (! initialized) {
                gettimeofday (&tv_start, NULL);
+               atexit (metrics_exit);
                if (getenv ("FIPS_VERBOSE"))
                        verbose = 1;
                initialized = 1;