diff options
author | Daniel Stenberg <daniel@haxx.se> | 2012-11-17 00:59:42 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2012-11-17 13:56:38 +0100 |
commit | ee588fe088077785d9ad9263e03e1e525b074261 (patch) | |
tree | 85aea44bd6e3354311ac0c60577c2d8bacf45445 /tests/data | |
parent | db4215f14a9ee2aca01315fa8cf100915284b15d (diff) |
mem-include-scan: verify memory #includes
If we use memory functions (malloc, free, strdup etc) in C sources in
libcurl and we fail to include curl_memory.h or memdebug.h we either
fail to properly support user-provided memory callbacks or the memory
leak system of the test suite fails.
After Ajit's report of a failure in the first category in http_proxy.c,
I spotted a few in the second category as well. These problems are now
tested for by test 1132 which runs a perl program that scans for and
attempts to check that we use the correct include files if a memory
related function is used in the source code.
Reported by: Ajit Dhumale
Bug: http://curl.haxx.se/mail/lib-2012-11/0125.html
Diffstat (limited to 'tests/data')
-rw-r--r-- | tests/data/Makefile.am | 2 | ||||
-rw-r--r-- | tests/data/test1132 | 24 |
2 files changed, 25 insertions, 1 deletions
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index 31b56f417..9210404a5 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -75,7 +75,7 @@ test1094 test1095 test1096 test1097 test1098 test1099 test1100 test1101 \ test1102 test1103 test1104 test1105 test1106 test1107 test1108 test1109 \ test1110 test1111 test1112 test1113 test1114 test1115 test1116 test1117 \ test1118 test1119 test1120 test1121 test1122 test1123 test1124 test1125 \ -test1126 test1127 test1128 test1129 test1130 test1131 \ +test1126 test1127 test1128 test1129 test1130 test1131 test1132 \ test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \ test1208 test1209 test1210 test1211 \ test1220 \ diff --git a/tests/data/test1132 b/tests/data/test1132 new file mode 100644 index 000000000..366ffc77c --- /dev/null +++ b/tests/data/test1132 @@ -0,0 +1,24 @@ +<testcase> +<info> +<keywords> +memory-includes +</keywords> +</info> + +# +# Client-side +<client> +<server> +none +</server> + + <name> +Verify memory #include files in libcurl's C source files + </name> + +<command type="perl"> +%SRCDIR/mem-include-scan.pl %SRCDIR/../lib +</command> +</client> + +</testcase> |