diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-09-29 06:31:14 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:59:29 -0500 |
commit | 4f13ebef5d6711ac121b9c41e2fbbe2cd3b6da0e (patch) | |
tree | 9c97145fdcde8e5e7d9d2736b0571caae530db7e /source4/include/includes.h | |
parent | 173b61817b23c7338a30cae819cc63879543587f (diff) | |
download | samba-4f13ebef5d6711ac121b9c41e2fbbe2cd3b6da0e.tar.gz samba-4f13ebef5d6711ac121b9c41e2fbbe2cd3b6da0e.tar.bz2 samba-4f13ebef5d6711ac121b9c41e2fbbe2cd3b6da0e.zip |
r2744: ben elliston taught me about gcov today, which allows you to measure
the % coverage in terms of lines of code of a test suite. I thought a
good first place to start with gcov was the talloc test suite. When I
started the test suite covered about 60% of all lines of code in
talloc.c, and now it covers about 99%. The only lines not covered are
talloc corruption errors, as that would cause smb_panic() to fire.
It will be interesting to try gcov on the main Samba test suite for
smbd. We won't achieve 100% coverage, but it would be nice to get to
90% or more.
I also modified the talloc.c sources to be able to be build standalone, using:
gcc -c -D_STANDALONE_ -Iinlcude lib/talloc.c
that should make it much easier to re-use talloc in other projects
(This used to be commit 8d4dc99b82efdf24b6811851c7bdd4af5a4c52c9)
Diffstat (limited to 'source4/include/includes.h')
-rw-r--r-- | source4/include/includes.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/include/includes.h b/source4/include/includes.h index d29353cafc..06e9b91347 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -1068,7 +1068,9 @@ time_t timegm(struct tm *tm); #include <sys/xattr.h> #endif -#define discard_const_p(type, ptr) (type *)discard_const(ptr) +#define discard_const_p(type, ptr) ((type *)discard_const(ptr)) + +#define TALLOC_ABORT(reason) smb_panic(reason) #endif /* _INCLUDES_H */ |