[glib/wip/pwithnall/converter-stream-debugging] WIP
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/pwithnall/converter-stream-debugging] WIP
- Date: Tue, 5 Apr 2022 17:11:40 +0000 (UTC)
commit 8107685aff123f7c6eefce94debcda841a5908d2
Author: Philip Withnall <pwithnall endlessos org>
Date: Tue Apr 5 18:10:44 2022 +0100
WIP
Signed-off-by: Philip Withnall <pwithnall endlessos org>
gio/gconverterinputstream.c | 11 -----------
gio/tests/converter-stream.c | 12 ------------
2 files changed, 23 deletions(-)
---
diff --git a/gio/gconverterinputstream.c b/gio/gconverterinputstream.c
index 4197770e36..e4bbf0439b 100644
--- a/gio/gconverterinputstream.c
+++ b/gio/gconverterinputstream.c
@@ -370,9 +370,6 @@ fill_input_buffer (GConverterInputStream *stream,
priv->input_buffer.end += nread;
priv->need_input = FALSE;
}
- else
- g_message ("%s: nread %ld, tailspace: %lu, blocking: %u, at_least_size %lu",
- G_STRFUNC, nread, buffer_tailspace (&priv->input_buffer), blocking, at_least_size);
return nread;
}
@@ -425,8 +422,6 @@ read_internal (GInputStream *stream,
!priv->at_input_end)
{
nread = fill_input_buffer (cstream, count, blocking, cancellable, error);
- if (error != NULL && *error != NULL)
- g_message ("fill_input_buffer error: %s", (*error)->message);
if (nread < 0)
return -1;
if (nread == 0)
@@ -462,8 +457,6 @@ read_internal (GInputStream *stream,
{
/* No previously read data and no "special" error, return error */
g_propagate_error (error, my_error);
- if (error != NULL && *error != NULL)
- g_message ("convert error: %s", (*error)->message);
return -1;
}
else
@@ -544,8 +537,6 @@ read_internal (GInputStream *stream,
/* Can't read any more data, return that error */
g_error_free (my_error);
g_propagate_error (error, my_error2);
- if (error != NULL && *error != NULL)
- g_message ("fill_input_buffer error 2: %s", (*error)->message);
priv->need_input = TRUE;
return -1;
}
@@ -573,8 +564,6 @@ read_internal (GInputStream *stream,
/* Any other random error, return it */
g_propagate_error (error, my_error);
- if (error != NULL && *error != NULL)
- g_message ("random error: %s", (*error)->message);
return -1;
}
diff --git a/gio/tests/converter-stream.c b/gio/tests/converter-stream.c
index 284f436516..fbda1642b8 100644
--- a/gio/tests/converter-stream.c
+++ b/gio/tests/converter-stream.c
@@ -1015,22 +1015,16 @@ test_converter_pollable (void)
outptr = expanded;
inptr = converted;
- g_test_message ("Starting loop");
-
while (TRUE)
{
error = NULL;
- g_test_message ("Starting loop iteration");
-
if (outptr < expanded_end)
{
res = g_output_stream_write (socket_out,
outptr,
MIN (1000, (expanded_end - outptr)),
NULL, &error);
- g_test_message ("Wrote %ld bytes; now expanded_end - outptr = %lu",
- res, expanded_end - outptr);
g_assert_cmpint (res, >, 0);
outptr += res;
}
@@ -1038,7 +1032,6 @@ test_converter_pollable (void)
{
g_output_stream_close (socket_out, NULL, &error);
g_assert_no_error (error);
- g_test_message ("Closed socket_out");
g_object_unref (right);
socket_out = NULL;
}
@@ -1048,18 +1041,13 @@ test_converter_pollable (void)
* test, so just poll. */
while (!g_pollable_input_stream_is_readable (pollable_in))
{
- g_test_message ("pollable_in is not readable; sleeping");
g_usleep (80L);
}
is_readable = g_pollable_input_stream_is_readable (pollable_in);
- g_test_message ("pollable_in is %s (%u)", is_readable ? "readable" : "not readable", is_readable);
res = g_pollable_input_stream_read_nonblocking (pollable_in,
inptr, 1,
NULL, &error);
- g_test_message ("read %ld bytes", res);
- if (error != NULL)
- g_test_message ("Got error %s", error->message);
/* is_readable can be a false positive, but not a false negative */
if (!is_readable)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]