From 5ed03ebe52160ab9c1cf8f569258a210084b782f Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sun, 23 Dec 2012 21:33:26 +0100 Subject: test 1503: same as 1502 but with a different cleanup sequence --- tests/libtest/Makefile.inc | 7 ++++++- tests/libtest/lib1502.c | 11 +++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'tests/libtest') diff --git a/tests/libtest/Makefile.inc b/tests/libtest/Makefile.inc index e08176d57..99da5a9c6 100644 --- a/tests/libtest/Makefile.inc +++ b/tests/libtest/Makefile.inc @@ -20,7 +20,7 @@ noinst_PROGRAMS = chkhostname \ lib556 lib539 lib557 lib560 lib562 lib564 lib565 lib566 lib567 lib568 \ lib569 lib570 lib571 lib572 lib573 lib582 lib583 lib585 lib586 lib587 \ lib590 lib591 lib597 lib598 lib599 libauthretry libntlmconnect \ - lib1500 lib1501 lib1502 + lib1500 lib1501 lib1502 lib1503 chkhostname_SOURCES = chkhostname.c $(top_srcdir)/lib/curl_gethostname.c chkhostname_LDADD = @CURL_NETWORK_LIBS@ @@ -218,6 +218,11 @@ lib1501_LDADD = $(TESTUTIL_LIBS) lib1502_SOURCES = lib1502.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) lib1502_LDADD = $(TESTUTIL_LIBS) +lib1502_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1502 + +lib1503_SOURCES = lib1502.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) +lib1503_LDADD = $(TESTUTIL_LIBS) +lib1503_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1503 libauthretry_SOURCES = libauthretry.c $(SUPPORTFILES) diff --git a/tests/libtest/lib1502.c b/tests/libtest/lib1502.c index c24006358..4cf89c4ab 100644 --- a/tests/libtest/lib1502.c +++ b/tests/libtest/lib1502.c @@ -106,11 +106,22 @@ int test(char *URL) test_cleanup: +#ifdef LIB1502 /* undocumented cleanup sequence - type UA */ curl_multi_cleanup(multi); curl_easy_cleanup(easy); curl_global_cleanup(); +#endif + +#ifdef LIB1503 + /* proper cleanup sequence - type PA */ + + curl_multi_remove_handle(multi, easy); + curl_multi_cleanup(multi); + curl_easy_cleanup(easy); + curl_global_cleanup(); +#endif curl_slist_free_all(dns_cache_list); -- cgit v1.2.3