diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auth-test.c | 15 | ||||
-rw-r--r-- | tests/cache-test.c | 8 | ||||
-rw-r--r-- | tests/chunk-io-test.c | 2 | ||||
-rw-r--r-- | tests/chunk-test.c | 24 | ||||
-rw-r--r-- | tests/coding-test.c | 39 | ||||
-rw-r--r-- | tests/connection-test.c | 14 | ||||
-rw-r--r-- | tests/context-test.c | 14 | ||||
-rw-r--r-- | tests/continue-test.c | 7 | ||||
-rw-r--r-- | tests/cookies-test.c | 4 | ||||
-rw-r--r-- | tests/forms-test.c | 8 | ||||
-rw-r--r-- | tests/header-parsing.c | 25 | ||||
-rw-r--r-- | tests/misc-test.c | 25 | ||||
-rw-r--r-- | tests/multipart-test.c | 15 | ||||
-rw-r--r-- | tests/no-ssl-test.c | 4 | ||||
-rw-r--r-- | tests/proxy-test.c | 6 | ||||
-rw-r--r-- | tests/redirect-test.c | 13 | ||||
-rw-r--r-- | tests/server-test.c | 8 | ||||
-rw-r--r-- | tests/session-test.c | 4 | ||||
-rw-r--r-- | tests/sniffing-test.c | 2 | ||||
-rw-r--r-- | tests/ssl-test.c | 2 | ||||
-rw-r--r-- | tests/timeout-test.c | 2 | ||||
-rw-r--r-- | tests/xmlrpc-test.c | 18 |
22 files changed, 13 insertions, 246 deletions
diff --git a/tests/auth-test.c b/tests/auth-test.c index ccfed466..cb9f07fb 100644 --- a/tests/auth-test.c +++ b/tests/auth-test.c @@ -294,7 +294,6 @@ do_pipelined_auth_test (void) SOUP_TEST_SKIP_IF_NO_APACHE; - debug_printf (1, "Testing pipelined auth (bug 271540):\n"); session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); authenticated = FALSE; @@ -447,8 +446,6 @@ do_digest_expiration_test (void) SOUP_TEST_SKIP_IF_NO_APACHE; - debug_printf (1, "\nTesting digest nonce expiration:\n"); - session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); uri = g_strconcat (base_uri, "Digest/realm1/", NULL); @@ -552,8 +549,6 @@ do_async_auth_good_password_test (void) SOUP_TEST_SKIP_IF_NO_APACHE; - debug_printf (1, "\nTesting async auth:\n"); - loop = g_main_loop_new (NULL, TRUE); session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); uri = g_strconcat (base_uri, "Basic/realm1/", NULL); @@ -637,7 +632,6 @@ do_async_auth_bad_password_test (void) /* Test that giving the wrong password doesn't cause multiple * authenticate signals the second time. */ - debug_printf (1, "\nTesting async auth with wrong password (#522601):\n"); SOUP_TEST_SKIP_IF_NO_APACHE; @@ -690,7 +684,6 @@ do_async_auth_no_password_test (void) /* Test that giving no password doesn't cause multiple * authenticate signals the second time. */ - debug_printf (1, "\nTesting async auth with no password (#583462):\n"); SOUP_TEST_SKIP_IF_NO_APACHE; @@ -859,8 +852,6 @@ do_select_auth_test (void) SoupAuthDomain *basic_auth_domain, *digest_auth_domain; SoupURI *uri; - debug_printf (1, "\nTesting selection among multiple auths:\n"); - /* It doesn't seem to be possible to configure Apache to serve * multiple auth types for a single URL. So we have to use * SoupServer here. We know that SoupServer handles the server @@ -1015,8 +1006,6 @@ do_auth_close_test (void) SoupURI *uri; AuthCloseData acd; - debug_printf (1, "\nTesting auth when server times out connection:\n"); - server = soup_test_server_new (FALSE); soup_server_add_handler (server, NULL, server_callback, NULL, NULL); @@ -1074,8 +1063,6 @@ do_infinite_auth_test (void) SOUP_TEST_SKIP_IF_NO_APACHE; - debug_printf (1, "\nTesting broken infinite-loop auth:\n"); - session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); g_signal_connect (session, "authenticate", G_CALLBACK (infinite_authenticate), NULL); @@ -1130,8 +1117,6 @@ do_disappearing_auth_test (void) SoupSession *session; int counter; - debug_printf (1, "\nTesting auth when server does not repeat challenge on failure:\n"); - server = soup_test_server_new (FALSE); soup_server_add_handler (server, NULL, server_callback, NULL, NULL); diff --git a/tests/cache-test.c b/tests/cache-test.c index b60fb9c1..c499a776 100644 --- a/tests/cache-test.c +++ b/tests/cache-test.c @@ -272,8 +272,6 @@ do_basics_test (gconstpointer data) char *cache_dir; char *body1, *body2, *body3, *body4, *body5, *cmp; - debug_printf (1, "Cache basics\n"); - cache_dir = g_dir_make_tmp ("cache-test-XXXXXX", NULL); debug_printf (2, " Caching to %s\n", cache_dir); cache = soup_cache_new (cache_dir, SOUP_CACHE_SINGLE_USER); @@ -439,8 +437,6 @@ do_cancel_test (gconstpointer data) char *body1, *body2; guint flags; - debug_printf (1, "Cache cancel tests\n"); - cache_dir = g_dir_make_tmp ("cache-test-XXXXXX", NULL); debug_printf (2, " Caching to %s\n", cache_dir); cache = soup_cache_new (cache_dir, SOUP_CACHE_SINGLE_USER); @@ -526,8 +522,6 @@ do_refcounting_test (gconstpointer data) guint flags; GMainLoop *loop; - debug_printf (1, "Cache refcounting tests\n"); - cache_dir = g_dir_make_tmp ("cache-test-XXXXXX", NULL); debug_printf (2, " Caching to %s\n", cache_dir); cache = soup_cache_new (cache_dir, SOUP_CACHE_SINGLE_USER); @@ -582,8 +576,6 @@ do_headers_test (gconstpointer data) char *body1, *cmp; const char *header_value; - debug_printf (1, "Cache basics\n"); - cache_dir = g_dir_make_tmp ("cache-test-XXXXXX", NULL); debug_printf (2, " Caching to %s\n", cache_dir); cache = soup_cache_new (cache_dir, SOUP_CACHE_SINGLE_USER); diff --git a/tests/chunk-io-test.c b/tests/chunk-io-test.c index 29062a69..1e53eef1 100644 --- a/tests/chunk-io-test.c +++ b/tests/chunk-io-test.c @@ -358,8 +358,6 @@ do_io_tests (void) gssize nread, nwrote, total; gssize chunk_length, chunk_total; - debug_printf (1, "\nI/O tests\n"); - raw_contents = soup_test_get_index (); chunkified = chunkify (raw_contents->data, raw_contents->length); diff --git a/tests/chunk-test.c b/tests/chunk-test.c index de1007d7..7f4fe886 100644 --- a/tests/chunk-test.c +++ b/tests/chunk-test.c @@ -142,24 +142,17 @@ static void do_request_test (gconstpointer data) { RequestTestFlags flags = GPOINTER_TO_UINT (data); - SoupURI *uri = base_uri; + SoupURI *uri; PutTestData ptd; SoupMessage *msg; const char *client_md5, *server_md5; GChecksum *check; int i, length; - debug_printf (1, "PUT"); - if (flags & HACKY_STREAMING) - debug_printf (1, " w/ hacky streaming"); - else if (flags & PROPER_STREAMING) - debug_printf (1, " w/ proper streaming"); - if (flags & RESTART) { - debug_printf (1, " and restart"); + if (flags & RESTART) + uri = soup_uri_new_with_base (base_uri, "/redirect"); + else uri = soup_uri_copy (base_uri); - soup_uri_set_path (uri, "/redirect"); - } - debug_printf (1, "\n"); ptd.session = session; setup_request_body (&ptd); @@ -215,8 +208,7 @@ do_request_test (gconstpointer data) g_object_unref (msg); g_checksum_free (check); - if (uri != base_uri) - soup_uri_free (uri); + soup_uri_free (uri); } typedef struct { @@ -263,8 +255,6 @@ do_response_test (void) SoupMessage *msg; const char *client_md5, *server_md5; - debug_printf (1, "GET\n"); - gtd.current_chunk = NULL; gtd.length = 0; gtd.check = g_checksum_new (G_CHECKSUM_MD5); @@ -324,8 +314,6 @@ do_temporary_test (void) char *client_md5; const char *server_md5; - debug_printf (1, "PUT w/ temporary buffers\n"); - msg = soup_message_new_from_uri ("PUT", base_uri); soup_message_body_append (msg->request_body, SOUP_MEMORY_TEMPORARY, "one\r\n", 5); @@ -375,8 +363,6 @@ do_large_chunk_test (void) int i; LargeChunkData lcd; - debug_printf (1, "PUT w/ large chunk\n"); - msg = soup_message_new_from_uri ("PUT", base_uri); buf_data = g_malloc0 (LARGE_CHUNK_SIZE); diff --git a/tests/coding-test.c b/tests/coding-test.c index a044ad73..d400ca71 100644 --- a/tests/coding-test.c +++ b/tests/coding-test.c @@ -224,8 +224,6 @@ teardown_coding_test (CodingTestData *data, gconstpointer test_data) static void do_coding_test_plain (CodingTestData *data, gconstpointer test_data) { - debug_printf (1, " GET /mbox, plain\n"); - soup_session_send_message (data->session, data->msg); check_response (data, NULL, "text/plain", EXPECT_NOT_DECODED, NULL); } @@ -233,8 +231,6 @@ do_coding_test_plain (CodingTestData *data, gconstpointer test_data) static void do_coding_test_gzip (CodingTestData *data, gconstpointer test_data) { - debug_printf (1, " GET /mbox, Accept-Encoding: gzip\n"); - soup_session_send_message (data->session, data->msg); check_response (data, "gzip", "text/plain", EXPECT_DECODED, NULL); } @@ -242,8 +238,6 @@ do_coding_test_gzip (CodingTestData *data, gconstpointer test_data) static void do_coding_test_gzip_with_junk (CodingTestData *data, gconstpointer test_data) { - debug_printf (1, " GET /mbox, Accept-Encoding: gzip, plus trailing junk\n"); - soup_message_headers_append (data->msg->request_headers, "X-Test-Options", "trailing-junk"); @@ -254,8 +248,6 @@ do_coding_test_gzip_with_junk (CodingTestData *data, gconstpointer test_data) static void do_coding_test_gzip_bad_server (CodingTestData *data, gconstpointer test_data) { - debug_printf (1, " GET /mbox, Accept-Encoding: gzip, with server error\n"); - soup_message_headers_append (data->msg->request_headers, "X-Test-Options", "force-encode"); @@ -271,8 +263,6 @@ do_coding_test_gzip_bad_server (CodingTestData *data, gconstpointer test_data) static void do_coding_test_deflate (CodingTestData *data, gconstpointer test_data) { - debug_printf (1, " GET /mbox, Accept-Encoding: deflate\n"); - soup_message_headers_append (data->msg->request_headers, "X-Test-Options", "prefer-deflate-zlib"); soup_session_send_message (data->session, data->msg); @@ -283,8 +273,6 @@ do_coding_test_deflate (CodingTestData *data, gconstpointer test_data) static void do_coding_test_deflate_with_junk (CodingTestData *data, gconstpointer test_data) { - debug_printf (1, " GET /mbox, Accept-Encoding: deflate, plus trailing junk\n"); - soup_message_headers_append (data->msg->request_headers, "X-Test-Options", "prefer-deflate-zlib, trailing-junk"); soup_session_send_message (data->session, data->msg); @@ -295,8 +283,6 @@ do_coding_test_deflate_with_junk (CodingTestData *data, gconstpointer test_data) static void do_coding_test_deflate_bad_server (CodingTestData *data, gconstpointer test_data) { - debug_printf (1, " GET /mbox, Accept-Encoding: deflate, with server error\n"); - soup_message_headers_append (data->msg->request_headers, "X-Test-Options", "force-encode, prefer-deflate-zlib"); soup_session_send_message (data->session, data->msg); @@ -307,8 +293,6 @@ do_coding_test_deflate_bad_server (CodingTestData *data, gconstpointer test_data static void do_coding_test_deflate_raw (CodingTestData *data, gconstpointer test_data) { - debug_printf (1, " GET /mbox, Accept-Encoding: deflate (raw data)\n"); - soup_message_headers_append (data->msg->request_headers, "X-Test-Options", "prefer-deflate-raw"); soup_session_send_message (data->session, data->msg); @@ -319,8 +303,6 @@ do_coding_test_deflate_raw (CodingTestData *data, gconstpointer test_data) static void do_coding_test_deflate_raw_bad_server (CodingTestData *data, gconstpointer test_data) { - debug_printf (1, " GET /mbox, Accept-Encoding: deflate (raw data), with server error\n"); - soup_message_headers_append (data->msg->request_headers, "X-Test-Options", "force-encode, prefer-deflate-raw"); soup_session_send_message (data->session, data->msg); @@ -385,25 +367,18 @@ do_single_coding_req_test (CodingTestData *data, static void do_coding_req_test_plain (CodingTestData *data, gconstpointer test_data) { - /* Plain text data, no claim */ - debug_printf (1, " GET /mbox, plain\n"); - do_single_coding_req_test (data, NULL, "text/plain", EXPECT_NOT_DECODED); } static void do_coding_req_test_gzip (CodingTestData *data, gconstpointer test_data) { - debug_printf (1, " GET /mbox, Accept-Encoding: gzip\n"); - do_single_coding_req_test (data, "gzip", "text/plain", EXPECT_DECODED); } static void do_coding_req_test_gzip_with_junk (CodingTestData *data, gconstpointer test_data) { - debug_printf (1, " GET /mbox, Accept-Encoding: gzip, plus trailing junk\n"); - soup_message_headers_append (data->msg->request_headers, "X-Test-Options", "trailing-junk"); @@ -413,8 +388,6 @@ do_coding_req_test_gzip_with_junk (CodingTestData *data, gconstpointer test_data static void do_coding_req_test_gzip_bad_server (CodingTestData *data, gconstpointer test_data) { - debug_printf (1, " GET /mbox, Accept-Encoding: gzip, with server error\n"); - soup_message_headers_append (data->msg->request_headers, "X-Test-Options", "force-encode"); do_single_coding_req_test (data, "gzip", "text/plain", EXPECT_NOT_DECODED); @@ -423,8 +396,6 @@ do_coding_req_test_gzip_bad_server (CodingTestData *data, gconstpointer test_dat static void do_coding_req_test_deflate (CodingTestData *data, gconstpointer test_data) { - debug_printf (1, " GET /mbox, Accept-Encoding: deflate\n"); - soup_message_headers_append (data->msg->request_headers, "X-Test-Options", "prefer-deflate-zlib"); do_single_coding_req_test (data, "deflate", "text/plain", EXPECT_DECODED); @@ -433,8 +404,6 @@ do_coding_req_test_deflate (CodingTestData *data, gconstpointer test_data) static void do_coding_req_test_deflate_with_junk (CodingTestData *data, gconstpointer test_data) { - debug_printf (1, " GET /mbox, Accept-Encoding: deflate, plus trailing junk\n"); - soup_message_headers_append (data->msg->request_headers, "X-Test-Options", "prefer-deflate-zlib, trailing-junk"); do_single_coding_req_test (data, "deflate", "text/plain", EXPECT_DECODED); @@ -443,8 +412,6 @@ do_coding_req_test_deflate_with_junk (CodingTestData *data, gconstpointer test_d static void do_coding_req_test_deflate_bad_server (CodingTestData *data, gconstpointer test_data) { - debug_printf (1, " GET /mbox, Accept-Encoding: deflate, with server error\n"); - soup_message_headers_append (data->msg->request_headers, "X-Test-Options", "force-encode, prefer-deflate-zlib"); do_single_coding_req_test (data, "deflate", "text/plain", EXPECT_NOT_DECODED); @@ -453,8 +420,6 @@ do_coding_req_test_deflate_bad_server (CodingTestData *data, gconstpointer test_ static void do_coding_req_test_deflate_raw (CodingTestData *data, gconstpointer test_data) { - debug_printf (1, " GET /mbox, Accept-Encoding: deflate (raw data)\n"); - soup_message_headers_append (data->msg->request_headers, "X-Test-Options", "prefer-deflate-raw"); do_single_coding_req_test (data, "deflate", "text/plain", EXPECT_DECODED); @@ -463,8 +428,6 @@ do_coding_req_test_deflate_raw (CodingTestData *data, gconstpointer test_data) static void do_coding_req_test_deflate_raw_bad_server (CodingTestData *data, gconstpointer test_data) { - debug_printf (1, " GET /mbox, Accept-Encoding: deflate (raw data), with server error\n"); - soup_message_headers_append (data->msg->request_headers, "X-Test-Options", "force-encode, prefer-deflate-raw"); do_single_coding_req_test (data, "deflate", "text/plain", EXPECT_NOT_DECODED); @@ -473,8 +436,6 @@ do_coding_req_test_deflate_raw_bad_server (CodingTestData *data, gconstpointer t static void do_coding_msg_empty_test (CodingTestData *data, gconstpointer test_data) { - debug_printf (1, "\nEmpty allegedly-encoded body test\n"); - soup_message_headers_append (data->msg->request_headers, "X-Test-Options", "empty"); soup_session_send_message (data->session, data->msg); diff --git a/tests/connection-test.c b/tests/connection-test.c index f092944b..a72d2f0a 100644 --- a/tests/connection-test.c +++ b/tests/connection-test.c @@ -166,8 +166,6 @@ do_content_length_framing_test (void) SoupURI *request_uri; goffset declared_length; - debug_printf (1, "\nInvalid Content-Length framing tests\n"); - session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); debug_printf (1, " Content-Length larger than message body length\n"); @@ -353,8 +351,6 @@ do_persistent_connection_timeout_test (void) { SoupSession *session; - debug_printf (1, "\nUnexpected timing out of persistent connections\n"); - debug_printf (1, " Async session, message API\n"); session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); do_timeout_test_for_session (session); @@ -475,8 +471,6 @@ do_max_conns_test (void) { SoupSession *session; - debug_printf (1, "\nExceeding max-conns\n"); - debug_printf (1, " Async session\n"); session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, SOUP_SESSION_MAX_CONNS, MAX_CONNS, @@ -554,8 +548,6 @@ do_non_persistent_connection_test (void) { SoupSession *session; - debug_printf (1, "\nNon-persistent connections are closed immediately\n"); - debug_printf (1, " Async session\n"); session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); do_non_persistent_test_for_session (session); @@ -608,8 +600,6 @@ do_non_idempotent_connection_test (void) { SoupSession *session; - debug_printf (1, "\nNon-idempotent methods are always sent on new connections\n"); - debug_printf (1, " Async session\n"); session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); do_non_idempotent_test_for_session (session); @@ -724,8 +714,6 @@ do_connection_state_test (void) SOUP_TEST_SKIP_IF_NO_APACHE; - debug_printf (1, "\nConnection states\n"); - debug_printf (1, " Async session\n"); session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); do_connection_state_test_for_session (session); @@ -834,8 +822,6 @@ do_connection_event_test (void) SOUP_TEST_SKIP_IF_NO_APACHE; - debug_printf (1, "\nConnection events\n"); - debug_printf (1, " Async session\n"); session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); do_connection_event_test_for_session (session); diff --git a/tests/context-test.c b/tests/context-test.c index 7fe3d60b..727c63ba 100644 --- a/tests/context-test.c +++ b/tests/context-test.c @@ -88,12 +88,6 @@ do_test1 (gconstpointer data) { gboolean use_thread_context = GPOINTER_TO_INT (data); - debug_printf (1, "\nBlocking the main thread does not block other thread\n"); - if (use_thread_context) - debug_printf (1, "(Using g_main_context_push_thread_default())\n"); - else - debug_printf (1, "(Using SOUP_SESSION_ASYNC_CONTEXT)\n"); - test1_loop = g_main_loop_new (NULL, FALSE); g_idle_add (idle_start_test1_thread, GINT_TO_POINTER (use_thread_context)); g_main_loop_run (test1_loop); @@ -198,12 +192,6 @@ do_test2 (gconstpointer data) char *uri; SoupMessage *msg; - debug_printf (1, "\nA session with its own context is independent of the main loop.\n"); - if (use_thread_context) - debug_printf (1, "(Using g_main_context_push_thread_default())\n"); - else - debug_printf (1, "(Using SOUP_SESSION_ASYNC_CONTEXT)\n"); - idle = g_idle_add_full (G_PRIORITY_HIGH, idle_test2_fail, NULL, NULL); async_context = g_main_context_new (); @@ -275,8 +263,6 @@ do_multicontext_test (void) GMainContext *context1, *context2; GMainLoop *loop1, *loop2; - debug_printf (1, "\nUsing multiple async contexts\n"); - session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, SOUP_SESSION_USE_THREAD_CONTEXT, TRUE, NULL); diff --git a/tests/continue-test.c b/tests/continue-test.c index 1736a328..b6a5805f 100644 --- a/tests/continue-test.c +++ b/tests/continue-test.c @@ -59,13 +59,6 @@ do_message (const char *path, gboolean long_body, const char *expected_event; char *actual_event; int expected_status, actual_status; - static int count = 1; - - debug_printf (1, "%d. /%s, %s body, %sExpect, %s password\n", - count++, path, - long_body ? "long" : "short", - expect_continue ? "" : "no ", - auth ? "with" : "without"); uri = g_strdup_printf ("http://%s127.0.0.1:%d/%s", auth ? "user:pass@" : "", diff --git a/tests/cookies-test.c b/tests/cookies-test.c index b36b14af..2c986b5f 100644 --- a/tests/cookies-test.c +++ b/tests/cookies-test.c @@ -55,8 +55,6 @@ do_cookies_accept_policy_test (void) GSList *l, *p; int i; - debug_printf (1, "SoupCookieJarAcceptPolicy test\n"); - session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); soup_session_add_feature_by_type (session, SOUP_TYPE_COOKIE_JAR); jar = SOUP_COOKIE_JAR (soup_session_get_feature (session, SOUP_TYPE_COOKIE_JAR)); @@ -107,8 +105,6 @@ do_cookies_parsing_test (void) SoupCookie *cookie; gboolean got1, got2, got3; - debug_printf (1, "\nSoupCookie parsing test\n"); - session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); soup_session_add_feature_by_type (session, SOUP_TYPE_COOKIE_JAR); jar = SOUP_COOKIE_JAR (soup_session_get_feature (session, SOUP_TYPE_COOKIE_JAR)); diff --git a/tests/forms-test.c b/tests/forms-test.c index a3401db8..1d89743b 100644 --- a/tests/forms-test.c +++ b/tests/forms-test.c @@ -95,8 +95,6 @@ do_hello_tests (gconstpointer uri) return; #endif - debug_printf (1, "Hello tests (GET, application/x-www-form-urlencoded)\n"); - for (n = 0; n < G_N_ELEMENTS (tests); n++) { do_hello_test (n, FALSE, uri); do_hello_test (n, TRUE, uri); @@ -146,8 +144,6 @@ do_md5_test_curl (gconstpointer data) return; #endif - debug_printf (1, "\nMD5 test via curl (POST, multipart/form-data)\n"); - md5 = get_md5_data (NULL, NULL); if (!md5) return; @@ -192,8 +188,6 @@ do_md5_test_libsoup (gconstpointer data) SoupMessage *msg; SoupSession *session; - debug_printf (1, "\nMD5 test via libsoup (POST, multipart/form-data)\n"); - md5 = get_md5_data (&contents, &length); if (!md5) return; @@ -235,8 +229,6 @@ do_form_decode_test (void) return; #endif - debug_printf (1, "\nDecode tests\n"); - /* Test that the code handles multiple values with the same key. */ table = soup_form_decode ("foo=first&foo=second&foo=third"); diff --git a/tests/header-parsing.c b/tests/header-parsing.c index 5f99831f..b5f6bf2f 100644 --- a/tests/header-parsing.c +++ b/tests/header-parsing.c @@ -758,9 +758,8 @@ do_request_tests (void) SoupMessageHeaders *headers; guint status; - debug_printf (1, "Request tests\n"); for (i = 0; i < num_reqtests; i++) { - debug_printf (1, "%2d. %s (%s): ", i + 1, reqtests[i].description, + debug_printf (1, "%2d. %s (%s)\n", i + 1, reqtests[i].description, soup_status_get_phrase (reqtests[i].status)); headers = soup_message_headers_new (SOUP_MESSAGE_HEADERS_REQUEST); @@ -786,7 +785,6 @@ do_request_tests (void) g_free (path); soup_message_headers_free (headers); } - debug_printf (1, "\n"); } static void @@ -798,9 +796,8 @@ do_response_tests (void) SoupHTTPVersion version; SoupMessageHeaders *headers; - debug_printf (1, "Response tests\n"); for (i = 0; i < num_resptests; i++) { - debug_printf (1, "%2d. %s (%s): ", i + 1, resptests[i].description, + debug_printf (1, "%2d. %s (%s)\n", i + 1, resptests[i].description, resptests[i].reason_phrase ? "should parse" : "should NOT parse"); headers = soup_message_headers_new (SOUP_MESSAGE_HEADERS_RESPONSE); @@ -824,7 +821,6 @@ do_response_tests (void) g_free (reason_phrase); soup_message_headers_free (headers); } - debug_printf (1, "\n"); } static void @@ -833,7 +829,6 @@ do_qvalue_tests (void) int i, j; GSList *acceptable, *unacceptable, *iter; - debug_printf (1, "qvalue tests\n"); for (i = 0; i < num_qvaluetests; i++) { debug_printf (1, "%2d. %s:\n", i + 1, qvaluetests[i].header_value); @@ -862,8 +857,6 @@ do_qvalue_tests (void) soup_header_free_list (unacceptable); } else debug_printf (1, "(none)\n"); - - debug_printf (1, "\n"); } } @@ -887,8 +880,6 @@ do_content_disposition_tests (void) SoupMultipart *multipart; SoupMessageBody *body; - debug_printf (1, "Content-Disposition tests\n"); - hdrs = soup_message_headers_new (SOUP_MESSAGE_HEADERS_MULTIPART); params = g_hash_table_new (g_str_hash, g_str_equal); g_hash_table_insert (params, "filename", RFC5987_TEST_FILENAME); @@ -967,8 +958,6 @@ do_content_disposition_tests (void) g_assert_true (strstr (buffer->data, "filename=\"token\"")); soup_buffer_free (buffer); - - debug_printf (1, "\n"); } #define CONTENT_TYPE_TEST_MIME_TYPE "text/plain" @@ -985,8 +974,6 @@ do_content_type_tests (void) GHashTable *params; const char *header, *mime_type; - debug_printf (1, "Content-Type tests\n"); - hdrs = soup_message_headers_new (SOUP_MESSAGE_HEADERS_MULTIPART); params = g_hash_table_new (g_str_hash, g_str_equal); g_hash_table_insert (params, CONTENT_TYPE_TEST_ATTRIBUTE, @@ -1017,8 +1004,6 @@ do_content_type_tests (void) g_assert_null (mime_type); soup_message_headers_free (hdrs); - - debug_printf (1, "\n"); } struct { @@ -1039,8 +1024,6 @@ do_append_param_tests (void) GString *params; int i; - debug_printf (1, "soup_header_g_string_append_param() tests\n"); - params = g_string_new (NULL); for (i = 0; i < G_N_ELEMENTS (test_params); i++) { if (i > 0) @@ -1051,8 +1034,6 @@ do_append_param_tests (void) } g_assert_cmpstr (params->str, ==, TEST_PARAMS_RESULT); g_string_free (params, TRUE); - - debug_printf (1, "\n"); } static const struct { @@ -1075,8 +1056,6 @@ do_bad_header_tests (void) SoupMessageHeaders *hdrs; int i; - debug_printf (1, "bad header rejection tests\n"); - hdrs = soup_message_headers_new (SOUP_MESSAGE_HEADERS_MULTIPART); for (i = 0; i < G_N_ELEMENTS (bad_headers); i++) { debug_printf (1, " %s\n", bad_headers[i].description); diff --git a/tests/misc-test.c b/tests/misc-test.c index 7ee19815..1f6e7773 100644 --- a/tests/misc-test.c +++ b/tests/misc-test.c @@ -99,8 +99,6 @@ do_host_test (void) SoupSession *session; SoupMessage *one, *two; - debug_printf (1, "Host handling\n"); - session = soup_test_session_new (SOUP_TYPE_SESSION_SYNC, NULL); one = soup_message_new_from_uri ("GET", base_uri); @@ -158,8 +156,6 @@ do_callback_unref_test (void) GMainLoop *loop; char *bad_uri; - debug_printf (1, "\nCallback unref handling (msg api)\n"); - /* Get a guaranteed-bad URI */ addr = soup_address_new ("127.0.0.1", SOUP_ADDRESS_ANY_PORT); soup_address_resolve_sync (addr, NULL); @@ -252,8 +248,6 @@ do_callback_unref_req_test (void) GMainLoop *loop; char *bad_uri; - debug_printf (1, "\nCallback unref handling (request api)\n"); - /* Get a guaranteed-bad URI */ addr = soup_address_new ("127.0.0.1", SOUP_ADDRESS_ANY_PORT); soup_address_resolve_sync (addr, NULL); @@ -343,8 +337,6 @@ do_msg_reuse_test (void) SoupURI *uri; guint *signal_ids, n_signal_ids; - debug_printf (1, "\nSoupMessage reuse\n"); - signal_ids = g_signal_list_ids (SOUP_TYPE_MESSAGE, &n_signal_ids); session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); @@ -435,8 +427,6 @@ do_early_abort_test (void) GMainContext *context; GMainLoop *loop; - debug_printf (1, "\nAbort with pending connection (msg api)\n"); - session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); msg = soup_message_new_from_uri ("GET", base_uri); @@ -537,8 +527,6 @@ do_early_abort_req_test (void) GMainLoop *loop; GCancellable *cancellable; - debug_printf (1, "\nAbort with pending connection (request api)\n"); - session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, SOUP_SESSION_USE_THREAD_CONTEXT, TRUE, NULL); @@ -620,8 +608,6 @@ do_accept_language_test (void) { const char *orig_language; - debug_printf (1, "\nAutomatic Accept-Language processing\n"); - orig_language = g_getenv ("LANGUAGE"); do_one_accept_language_test ("C", "en"); do_one_accept_language_test ("fr_FR", "fr-fr, fr;q=0.9"); @@ -705,8 +691,6 @@ do_cancel_while_reading_test (void) { SoupSession *session; - debug_printf (1, "\nCancelling message while reading response (msg api)\n"); - debug_printf (1, " Async session\n"); session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); do_cancel_while_reading_test_for_session (session); @@ -746,7 +730,6 @@ do_cancel_while_reading_immediate_req_test (void) SoupSession *session; guint flags; - debug_printf (1, "\nCancelling (immediately) message while reading response (request api)\n"); flags = SOUP_TEST_REQUEST_CANCEL_CANCELLABLE | SOUP_TEST_REQUEST_CANCEL_IMMEDIATE; debug_printf (1, " Async session\n"); @@ -769,7 +752,6 @@ do_cancel_while_reading_delayed_req_test (void) SoupSession *session; guint flags; - debug_printf (1, "\nCancelling (after 100ms) message while reading response (request api)\n"); flags = SOUP_TEST_REQUEST_CANCEL_CANCELLABLE | SOUP_TEST_REQUEST_CANCEL_SOON; debug_printf (1, " Async session\n"); @@ -792,7 +774,6 @@ do_cancel_while_reading_preemptive_req_test (void) SoupSession *session; guint flags; - debug_printf (1, "\nCancelling (preemptively) message while reading response (request api)\n"); flags = SOUP_TEST_REQUEST_CANCEL_CANCELLABLE | SOUP_TEST_REQUEST_CANCEL_PREEMPTIVE; debug_printf (1, " Async session\n"); @@ -841,8 +822,6 @@ do_aliases_test (void) SoupSession *session; char *aliases[] = { "foo", NULL }; - debug_printf (1, "\nhttp-aliases / https-aliases\n"); - debug_printf (1, " Default behavior\n"); session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); do_aliases_test_for_session (session, "http"); @@ -873,8 +852,6 @@ do_idle_on_dispose_test (void) SoupMessage *msg; GMainContext *async_context; - debug_printf (1, "\nTesting SoupSessionAsync dispose behavior\n"); - async_context = g_main_context_new (); session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, SOUP_SESSION_ASYNC_CONTEXT, async_context, @@ -903,8 +880,6 @@ do_pause_abort_test (void) SoupMessage *msg; gpointer ptr; - debug_printf (1, "\nTesting paused messages don't get leaked on abort\n"); - session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); msg = soup_message_new_from_uri ("GET", base_uri); diff --git a/tests/multipart-test.c b/tests/multipart-test.c index b5ab813d..e057412e 100644 --- a/tests/multipart-test.c +++ b/tests/multipart-test.c @@ -409,19 +409,6 @@ sync_multipart_handling_cb (GObject *source, GAsyncResult *res, gpointer data) g_object_unref (multipart); } -static const char* -multipart_mode_to_string (MultipartMode mode) -{ - if (mode == NO_MULTIPART) - return "NO_MULTIPART"; - else if (mode == SYNC_MULTIPART) - return "SYNC_MULTIPART"; - else if (mode == ASYNC_MULTIPART_SMALL_READS) - return "SYNC_MULTIPART_SMALL_READS"; - - return "ASYNC_MULTIPART"; -} - static void test_multipart (gconstpointer data) { @@ -437,8 +424,6 @@ test_multipart (gconstpointer data) gboolean message_is_multipart = FALSE; GError* error = NULL; - debug_printf (1, "test_multipart(%s)\n", multipart_mode_to_string (multipart_mode)); - request = soup_session_request (session, base_uri_string, &error); g_assert_no_error (error); if (error) diff --git a/tests/no-ssl-test.c b/tests/no-ssl-test.c index feffa5bd..0062c8c0 100644 --- a/tests/no-ssl-test.c +++ b/tests/no-ssl-test.c @@ -28,8 +28,6 @@ do_ssl_tests (gconstpointer uri) { SoupSession *session; - debug_printf (1, "\nSoupSession without SSL support\n"); - debug_printf (1, " plain\n"); session = soup_test_session_new (SOUP_TYPE_SESSION, NULL); do_ssl_test_for_session (session, uri); @@ -54,8 +52,6 @@ do_session_property_tests (void) char *ca_file; SoupSession *session; - debug_printf (1, "session properties\n"); - session = soup_session_async_new (); g_object_get (G_OBJECT (session), diff --git a/tests/proxy-test.c b/tests/proxy-test.c index 423a5598..599ff4e8 100644 --- a/tests/proxy-test.c +++ b/tests/proxy-test.c @@ -220,8 +220,6 @@ do_proxy_test (SoupProxyTest *test, gboolean sync) g_free (http_url); g_free (https_url); - - debug_printf (1, "\n"); } static void @@ -264,8 +262,6 @@ do_proxy_fragment_test (gconstpointer data) SOUP_TEST_SKIP_IF_NO_APACHE; - debug_printf (1, "\nTesting request with fragment via proxy\n"); - proxy_uri = soup_uri_new (proxies[SIMPLE_PROXY]); session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, SOUP_SESSION_PROXY_URI, proxy_uri, @@ -293,8 +289,6 @@ do_proxy_redirect_test (void) SOUP_TEST_SKIP_IF_NO_APACHE; SOUP_TEST_SKIP_IF_NO_TLS; - debug_printf (1, "\nTesting redirection through proxy\n"); - proxy_uri = soup_uri_new (proxies[SIMPLE_PROXY]); session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, SOUP_SESSION_PROXY_URI, proxy_uri, diff --git a/tests/redirect-test.c b/tests/redirect-test.c index 351946da..c9079cf6 100644 --- a/tests/redirect-test.c +++ b/tests/redirect-test.c @@ -163,10 +163,6 @@ do_message_api_test (SoupSession *session, TestCase *test) SoupMessage *msg; TestRequest *treq; - debug_printf (1, "%s %s\n", - test->requests[0].method, - test->requests[0].path); - uri = soup_uri_new_with_base (base_uri, test->requests[0].path); msg = soup_message_new_from_uri (test->requests[0].method, uri); soup_uri_free (uri); @@ -189,7 +185,6 @@ do_message_api_test (SoupSession *session, TestCase *test) soup_test_assert_message_status (msg, test->final_status); g_object_unref (msg); - debug_printf (2, "\n"); } static void @@ -203,10 +198,6 @@ do_request_api_test (SoupSession *session, TestCase *test) GError *error = NULL; guint final_status; - debug_printf (1, "%s %s\n", - test->requests[0].method, - test->requests[0].path); - final_status = test->request_api_final_status; if (!final_status) final_status = test->final_status; @@ -219,7 +210,6 @@ do_request_api_test (SoupSession *session, TestCase *test) g_assert_no_error (error); if (error) { g_error_free (error); - debug_printf (2, "\n"); return; } @@ -248,7 +238,6 @@ do_request_api_test (SoupSession *session, TestCase *test) g_object_unref (msg); g_object_unref (reqh); - debug_printf (2, "\n"); return; } @@ -257,7 +246,6 @@ do_request_api_test (SoupSession *session, TestCase *test) g_error_free (error); g_object_unref (msg); g_object_unref (reqh); - debug_printf (2, "\n"); return; } @@ -274,7 +262,6 @@ do_request_api_test (SoupSession *session, TestCase *test) g_object_unref (msg); g_object_unref (reqh); - debug_printf (2, "\n"); } static void diff --git a/tests/server-test.c b/tests/server-test.c index ec5b6901..1648c4f6 100644 --- a/tests/server-test.c +++ b/tests/server-test.c @@ -65,8 +65,6 @@ do_star_test (void) SoupURI *star_uri; const char *handled_by; - debug_printf (1, "\nOPTIONS *\n"); - session = soup_test_session_new (SOUP_TYPE_SESSION_SYNC, NULL); star_uri = soup_uri_copy (base_uri); soup_uri_set_path (star_uri, "*"); @@ -177,8 +175,6 @@ do_server_aliases_test (void) char *https_bad[] = { "http", "dav", "fred", NULL }; int i; - debug_printf (1, "\nserver aliases test\n"); - for (i = 0; http_good[i]; i++) do_one_server_aliases_test (base_uri, http_good[i], TRUE); for (i = 0; http_bad[i]; i++) @@ -199,8 +195,6 @@ do_dot_dot_test (void) SoupMessage *msg; SoupURI *uri; - debug_printf (1, "\n'..' smuggling test\n"); - session = soup_test_session_new (SOUP_TYPE_SESSION_SYNC, NULL); uri = soup_uri_new_with_base (base_uri, "/..%2ftest"); @@ -243,8 +237,6 @@ do_ipv6_test (void) SoupSession *session; SoupMessage *msg; - debug_printf (1, "\nIPv6 server test\n"); - ipv6_addr = soup_address_new ("::1", SOUP_ADDRESS_ANY_PORT); soup_address_resolve_sync (ipv6_addr, NULL); ipv6_server = soup_server_new (SOUP_SERVER_INTERFACE, ipv6_addr, diff --git a/tests/session-test.c b/tests/session-test.c index 21d97a85..b652ee5c 100644 --- a/tests/session-test.c +++ b/tests/session-test.c @@ -202,8 +202,6 @@ do_priority_tests (gconstpointer data) SOUP_MESSAGE_PRIORITY_HIGH, SOUP_MESSAGE_PRIORITY_NORMAL }; - debug_printf (1, "\nSoupSessionAsync\n"); - session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); g_object_set (session, "max-conns", 1, NULL); @@ -263,8 +261,6 @@ do_property_tests (void) GTlsDatabase *tlsdb, *default_tlsdb; SoupURI *uri; - debug_printf (1, "\nTesting session init properties\n"); - default_proxy_resolver = g_proxy_resolver_get_default (); default_tlsdb = g_tls_backend_get_default_database (g_tls_backend_get_default ()); diff --git a/tests/sniffing-test.c b/tests/sniffing-test.c index 5b0e6ee7..59f874f4 100644 --- a/tests/sniffing-test.c +++ b/tests/sniffing-test.c @@ -397,8 +397,6 @@ test_disabled (gconstpointer data) const char *sniffed_content_type; GError *error = NULL; - debug_printf (1, "test_disabled(\"%s\")\n", path); - uri = soup_uri_new_with_base (base_uri, path); msg = soup_message_new_from_uri ("GET", uri); diff --git a/tests/ssl-test.c b/tests/ssl-test.c index 65e8a558..b042d120 100644 --- a/tests/ssl-test.c +++ b/tests/ssl-test.c @@ -143,8 +143,6 @@ do_session_property_tests (void) SOUP_TEST_SKIP_IF_NO_TLS; - debug_printf (1, "session properties\n"); - session = soup_session_async_new (); g_signal_connect (session, "notify::ssl-use-system-ca-file", G_CALLBACK (property_changed), &use_system_changed); diff --git a/tests/timeout-test.c b/tests/timeout-test.c index 48c672bf..81fb4331 100644 --- a/tests/timeout-test.c +++ b/tests/timeout-test.c @@ -155,8 +155,6 @@ do_req_tests_for_session (SoupSession *timeout_session, SoupSocket *ret, *idle_first, *idle_second; SoupSocket *plain_first, *plain_second; - debug_printf (1, "\n"); - if (idle_session) { g_signal_connect (idle_session, "request-started", G_CALLBACK (request_started_cb), &ret); diff --git a/tests/xmlrpc-test.c b/tests/xmlrpc-test.c index 73518c84..3f26edd4 100644 --- a/tests/xmlrpc-test.c +++ b/tests/xmlrpc-test.c @@ -117,7 +117,7 @@ test_sum (void) SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER; - debug_printf (1, "sum (array of int -> int): "); + debug_printf (2, "sum (array of int -> int): "); ints = g_value_array_new (10); for (i = sum = 0; i < 10; i++) { @@ -153,7 +153,7 @@ test_countBools (void) SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER; - debug_printf (1, "countBools (array of boolean -> struct of ints): "); + debug_printf (2, "countBools (array of boolean -> struct of ints): "); bools = g_value_array_new (10); for (i = trues = falses = 0; i < 10; i++) { @@ -198,7 +198,7 @@ test_md5sum (void) SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER; - debug_printf (1, "md5sum (base64 -> base64)\n"); + debug_printf (2, "md5sum (base64 -> base64)\n"); data = g_byte_array_new (); g_byte_array_set_size (data, 256); @@ -234,7 +234,7 @@ test_dateChange (void) SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER; - debug_printf (1, "dateChange (date, struct of ints -> time)\n"); + debug_printf (2, "dateChange (date, struct of ints -> time)\n"); date = soup_date_new (1970 + (g_random_int_range (0, 50)), 1 + g_random_int_range (0, 12), @@ -343,7 +343,7 @@ test_echo (void) SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER; - debug_printf (1, "echo (array of string -> array of string):\n"); + debug_printf (2, "echo (array of string -> array of string):\n"); originals = g_value_array_new (N_ECHO_STRINGS); for (i = 0; i < N_ECHO_STRINGS; i++) { @@ -395,7 +395,7 @@ test_ping (gconstpointer include_params) SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER; - debug_printf (1, "ping (void (%s) -> string)\n", + debug_printf (2, "ping (void (%s) -> string)\n", include_params ? "empty <params>" : "no <params>"); params = soup_value_array_new (); @@ -464,8 +464,6 @@ test_fault_malformed (void) { SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER; - debug_printf (1, "malformed request: "); - do_bad_xmlrpc ("<methodCall/>"); } @@ -474,8 +472,6 @@ test_fault_method (void) { SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER; - debug_printf (1, "request to non-existent method: "); - do_bad_xmlrpc ("<methodCall><methodName>no_such_method</methodName><params><param><value><int>1</int></value></param></params></methodCall>"); } @@ -484,8 +480,6 @@ test_fault_args (void) { SOUP_TEST_SKIP_IF_NO_XMLRPC_SERVER; - debug_printf (1, "request with invalid args: "); - do_bad_xmlrpc ("<methodCall><methodName>sum</methodName><params><param><value><int>1</int></value></param></params></methodCall>"); } |