aboutsummaryrefslogtreecommitdiffstats
path: root/libsimple.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2018-08-28 14:25:50 +0200
committerMattias Andrée <maandree@kth.se>2018-08-28 14:25:50 +0200
commit60301af26f2068f7a483176984c693f04a7e1532 (patch)
tree33d4af87c55464b2f67be2da154708cc9b7e2115 /libsimple.c
parentReplace exit and fprintf (diff)
downloadlibsimple-60301af26f2068f7a483176984c693f04a7e1532.tar.gz
libsimple-60301af26f2068f7a483176984c693f04a7e1532.tar.bz2
libsimple-60301af26f2068f7a483176984c693f04a7e1532.tar.xz
Warn about unran tests under valgrind
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--libsimple.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libsimple.c b/libsimple.c
index 731396d..24c5dd3 100644
--- a/libsimple.c
+++ b/libsimple.c
@@ -990,6 +990,12 @@ main(void)
tv2.tv_sec = 1, tv2.tv_usec = 0L;
assert(libsimple_cmptimeval(&tv1, &tv2) == -1);
+ if (!have_custom_malloc()) {
+ stderr_real = 1;
+ fprintf(stderr, "\nSome tests have not been ran because malloc(3) was not "
+ "replaced, this is normal if running under valgrind(1).\n\n");
+ }
+
return 0;
}