From c8ba8740b9c3e7a5054c2d7ba5689778aa26618b Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Tue, 6 Sep 2011 17:47:54 +0200 Subject: [PATCH] test suite: libtest header inclusion cleanup Added missing memoryTracking to test cases 560 and 583. If this triggers leak detection on these, it only means that previously it was going unnoticed. --- tests/libtest/lib502.c | 1 + tests/libtest/lib503.c | 2 -- tests/libtest/lib504.c | 2 -- tests/libtest/lib505.c | 6 ------ tests/libtest/lib506.c | 2 -- tests/libtest/lib518.c | 7 +------ tests/libtest/lib525.c | 2 -- tests/libtest/lib526.c | 2 -- tests/libtest/lib530.c | 10 ---------- tests/libtest/lib533.c | 2 -- tests/libtest/lib536.c | 2 -- tests/libtest/lib537.c | 7 +------ tests/libtest/lib541.c | 13 ------------- tests/libtest/lib542.c | 13 ------------- tests/libtest/lib555.c | 1 + tests/libtest/lib560.c | 1 + tests/libtest/lib562.c | 14 -------------- tests/libtest/lib564.c | 3 --- tests/libtest/lib566.c | 1 - tests/libtest/lib567.c | 2 +- tests/libtest/lib568.c | 1 - tests/libtest/lib569.c | 1 - tests/libtest/lib570.c | 1 - tests/libtest/lib571.c | 4 ---- tests/libtest/lib572.c | 1 - tests/libtest/lib573.c | 2 +- tests/libtest/lib574.c | 1 - tests/libtest/lib575.c | 3 --- tests/libtest/lib576.c | 2 +- tests/libtest/lib578.c | 1 - tests/libtest/lib579.c | 1 - tests/libtest/lib582.c | 2 -- tests/libtest/lib583.c | 5 ++++- 33 files changed, 12 insertions(+), 106 deletions(-) diff --git a/tests/libtest/lib502.c b/tests/libtest/lib502.c index 9040b2b..e8bfe47 100644 --- a/tests/libtest/lib502.c +++ b/tests/libtest/lib502.c @@ -22,6 +22,7 @@ #include "test.h" #include "testutil.h" +#include "warnless.h" #include "memdebug.h" #define MAIN_LOOP_HANG_TIMEOUT 90 * 1000 diff --git a/tests/libtest/lib503.c b/tests/libtest/lib503.c index 53f8f80..7633188 100644 --- a/tests/libtest/lib503.c +++ b/tests/libtest/lib503.c @@ -21,8 +21,6 @@ ***************************************************************************/ #include "test.h" -#include - #include "testutil.h" #include "warnless.h" #include "memdebug.h" diff --git a/tests/libtest/lib504.c b/tests/libtest/lib504.c index e83c661..70aec38 100644 --- a/tests/libtest/lib504.c +++ b/tests/libtest/lib504.c @@ -21,8 +21,6 @@ ***************************************************************************/ #include "test.h" -#include - #include "testutil.h" #include "warnless.h" #include "memdebug.h" diff --git a/tests/libtest/lib505.c b/tests/libtest/lib505.c index 0a255d6..394131e 100644 --- a/tests/libtest/lib505.c +++ b/tests/libtest/lib505.c @@ -24,12 +24,6 @@ #ifdef HAVE_SYS_SOCKET_H #include #endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif #ifdef HAVE_FCNTL_H #include #endif diff --git a/tests/libtest/lib506.c b/tests/libtest/lib506.c index f9d2efd..4477eaa 100644 --- a/tests/libtest/lib506.c +++ b/tests/libtest/lib506.c @@ -20,8 +20,6 @@ * ***************************************************************************/ #include "test.h" -#include -#include #include diff --git a/tests/libtest/lib518.c b/tests/libtest/lib518.c index c483d7a..23f7f17 100644 --- a/tests/libtest/lib518.c +++ b/tests/libtest/lib518.c @@ -21,9 +21,6 @@ ***************************************************************************/ #include "test.h" -#ifdef HAVE_SYS_TYPES_H -#include -#endif #ifdef HAVE_SYS_RESOURCE_H #include #endif @@ -33,10 +30,8 @@ #ifdef HAVE_LIMITS_H #include #endif -#ifdef HAVE_STRING_H -#include -#endif +#include "warnless.h" #include "memdebug.h" #ifndef FD_SETSIZE diff --git a/tests/libtest/lib525.c b/tests/libtest/lib525.c index 4a79cec..5814b03 100644 --- a/tests/libtest/lib525.c +++ b/tests/libtest/lib525.c @@ -21,8 +21,6 @@ ***************************************************************************/ #include "test.h" -#include -#include #include #include "testutil.h" diff --git a/tests/libtest/lib526.c b/tests/libtest/lib526.c index e73eab0..6e16be1 100644 --- a/tests/libtest/lib526.c +++ b/tests/libtest/lib526.c @@ -40,8 +40,6 @@ #include "test.h" -#include -#include #include #include "testutil.h" diff --git a/tests/libtest/lib530.c b/tests/libtest/lib530.c index 6ad946f..03c4a62 100644 --- a/tests/libtest/lib530.c +++ b/tests/libtest/lib530.c @@ -21,16 +21,6 @@ ***************************************************************************/ #include "test.h" -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif -#ifdef HAVE_STRING_H -#include -#endif - #include "testutil.h" #include "warnless.h" #include "memdebug.h" diff --git a/tests/libtest/lib533.c b/tests/libtest/lib533.c index 5b6d8bf..487e018 100644 --- a/tests/libtest/lib533.c +++ b/tests/libtest/lib533.c @@ -23,8 +23,6 @@ #include "test.h" -#include -#include #include #include "testutil.h" diff --git a/tests/libtest/lib536.c b/tests/libtest/lib536.c index 7e81351..4813145 100644 --- a/tests/libtest/lib536.c +++ b/tests/libtest/lib536.c @@ -21,8 +21,6 @@ ***************************************************************************/ #include "test.h" -#include -#include #include #include "testutil.h" diff --git a/tests/libtest/lib537.c b/tests/libtest/lib537.c index 9711912..24d2522 100644 --- a/tests/libtest/lib537.c +++ b/tests/libtest/lib537.c @@ -21,9 +21,6 @@ ***************************************************************************/ #include "test.h" -#ifdef HAVE_SYS_TYPES_H -#include -#endif #ifdef HAVE_SYS_RESOURCE_H #include #endif @@ -33,10 +30,8 @@ #ifdef HAVE_LIMITS_H #include #endif -#ifdef HAVE_STRING_H -#include -#endif +#include "warnless.h" #include "memdebug.h" #if !defined(HAVE_POLL_FINE) && \ diff --git a/tests/libtest/lib541.c b/tests/libtest/lib541.c index 6af7bc5..5fe8dd8 100644 --- a/tests/libtest/lib541.c +++ b/tests/libtest/lib541.c @@ -21,23 +21,10 @@ ***************************************************************************/ #include "test.h" -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif #ifdef HAVE_FCNTL_H #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif - #include "memdebug.h" /* diff --git a/tests/libtest/lib542.c b/tests/libtest/lib542.c index efe8ea2..84f493f 100644 --- a/tests/libtest/lib542.c +++ b/tests/libtest/lib542.c @@ -21,23 +21,10 @@ ***************************************************************************/ #include "test.h" -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif #ifdef HAVE_FCNTL_H #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif - #include "memdebug.h" /* diff --git a/tests/libtest/lib555.c b/tests/libtest/lib555.c index 1e73a5a..b077927 100644 --- a/tests/libtest/lib555.c +++ b/tests/libtest/lib555.c @@ -30,6 +30,7 @@ #include "test.h" #include "testutil.h" +#include "warnless.h" #include "memdebug.h" #define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000 diff --git a/tests/libtest/lib560.c b/tests/libtest/lib560.c index a91d863..cba9aa0 100644 --- a/tests/libtest/lib560.c +++ b/tests/libtest/lib560.c @@ -22,6 +22,7 @@ #include "test.h" #include "warnless.h" +#include "memdebug.h" /* * Simply download a HTTPS file! diff --git a/tests/libtest/lib562.c b/tests/libtest/lib562.c index 657a2d3..a5f0ea5 100644 --- a/tests/libtest/lib562.c +++ b/tests/libtest/lib562.c @@ -19,26 +19,12 @@ * KIND, either express or implied. * ***************************************************************************/ - #include "test.h" -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif #ifdef HAVE_FCNTL_H #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif - #include "memdebug.h" /* diff --git a/tests/libtest/lib564.c b/tests/libtest/lib564.c index 96504bd..9bb3c74 100644 --- a/tests/libtest/lib564.c +++ b/tests/libtest/lib564.c @@ -19,11 +19,8 @@ * KIND, either express or implied. * ***************************************************************************/ - #include "test.h" -#include -#include #include #include "testutil.h" diff --git a/tests/libtest/lib566.c b/tests/libtest/lib566.c index 4aa6d98..ba839d6 100644 --- a/tests/libtest/lib566.c +++ b/tests/libtest/lib566.c @@ -19,7 +19,6 @@ * KIND, either express or implied. * ***************************************************************************/ - #include "test.h" #include "memdebug.h" diff --git a/tests/libtest/lib567.c b/tests/libtest/lib567.c index 7466e74..573529c 100644 --- a/tests/libtest/lib567.c +++ b/tests/libtest/lib567.c @@ -19,8 +19,8 @@ * KIND, either express or implied. * ***************************************************************************/ - #include "test.h" + #include "memdebug.h" /* diff --git a/tests/libtest/lib568.c b/tests/libtest/lib568.c index df0cd88..4b15821 100644 --- a/tests/libtest/lib568.c +++ b/tests/libtest/lib568.c @@ -19,7 +19,6 @@ * KIND, either express or implied. * ***************************************************************************/ - #include "test.h" #ifdef HAVE_SYS_STAT_H diff --git a/tests/libtest/lib569.c b/tests/libtest/lib569.c index 366e4c3..a434d74 100644 --- a/tests/libtest/lib569.c +++ b/tests/libtest/lib569.c @@ -19,7 +19,6 @@ * KIND, either express or implied. * ***************************************************************************/ - #include "test.h" #include diff --git a/tests/libtest/lib570.c b/tests/libtest/lib570.c index 29d30db..a9fac99 100644 --- a/tests/libtest/lib570.c +++ b/tests/libtest/lib570.c @@ -19,7 +19,6 @@ * KIND, either express or implied. * ***************************************************************************/ - #include "test.h" #include diff --git a/tests/libtest/lib571.c b/tests/libtest/lib571.c index 1b2bf7b..c5f7240 100644 --- a/tests/libtest/lib571.c +++ b/tests/libtest/lib571.c @@ -19,12 +19,8 @@ * KIND, either express or implied. * ***************************************************************************/ - #include "test.h" -#ifdef HAVE_SYS_SOCKET_H -# include -#endif #ifdef HAVE_NETINET_IN_H # include #endif diff --git a/tests/libtest/lib572.c b/tests/libtest/lib572.c index b54877c..3df4d03 100644 --- a/tests/libtest/lib572.c +++ b/tests/libtest/lib572.c @@ -19,7 +19,6 @@ * KIND, either express or implied. * ***************************************************************************/ - #include "test.h" #ifdef HAVE_SYS_STAT_H diff --git a/tests/libtest/lib573.c b/tests/libtest/lib573.c index b5fafe1..1d8602e 100644 --- a/tests/libtest/lib573.c +++ b/tests/libtest/lib573.c @@ -19,10 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ - #include "test.h" #include "testutil.h" +#include "warnless.h" #include "memdebug.h" #define MAIN_LOOP_HANG_TIMEOUT 90 * 1000 diff --git a/tests/libtest/lib574.c b/tests/libtest/lib574.c index 8c57816..afb2bce 100644 --- a/tests/libtest/lib574.c +++ b/tests/libtest/lib574.c @@ -19,7 +19,6 @@ * KIND, either express or implied. * ***************************************************************************/ - #include "test.h" #include "memdebug.h" diff --git a/tests/libtest/lib575.c b/tests/libtest/lib575.c index bb84b1a..144d11c 100644 --- a/tests/libtest/lib575.c +++ b/tests/libtest/lib575.c @@ -19,11 +19,8 @@ * KIND, either express or implied. * ***************************************************************************/ - #include "test.h" -#include -#include #include #include "testutil.h" diff --git a/tests/libtest/lib576.c b/tests/libtest/lib576.c index 48841b5..61bb613 100644 --- a/tests/libtest/lib576.c +++ b/tests/libtest/lib576.c @@ -19,8 +19,8 @@ * KIND, either express or implied. * ***************************************************************************/ - #include "test.h" + #include "testutil.h" #include "memdebug.h" diff --git a/tests/libtest/lib578.c b/tests/libtest/lib578.c index 51ead87..a39b317 100644 --- a/tests/libtest/lib578.c +++ b/tests/libtest/lib578.c @@ -19,7 +19,6 @@ * KIND, either express or implied. * ***************************************************************************/ - #include "test.h" #include "memdebug.h" diff --git a/tests/libtest/lib579.c b/tests/libtest/lib579.c index ad8ba7e..56193a1 100644 --- a/tests/libtest/lib579.c +++ b/tests/libtest/lib579.c @@ -19,7 +19,6 @@ * KIND, either express or implied. * ***************************************************************************/ - #include "test.h" #include "memdebug.h" diff --git a/tests/libtest/lib582.c b/tests/libtest/lib582.c index 2f8fcd9..a2c78dd 100644 --- a/tests/libtest/lib582.c +++ b/tests/libtest/lib582.c @@ -21,8 +21,6 @@ ***************************************************************************/ #include "test.h" -#include -#include #include #include "testutil.h" diff --git a/tests/libtest/lib583.c b/tests/libtest/lib583.c index f1270e1..57c9365 100644 --- a/tests/libtest/lib583.c +++ b/tests/libtest/lib583.c @@ -26,9 +26,12 @@ #include "test.h" -#include #include +#include "testutil.h" +#include "warnless.h" +#include "memdebug.h" + int test(char *URL) { CURLMcode retVal; -- 2.7.4