After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 755104 - Unify send_reply debug messages
Unify send_reply debug messages
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: daemon
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2015-09-16 09:23 UTC by Ondrej Holy
Modified: 2015-09-23 08:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
job: Unify send_reply debug messages (5.52 KB, patch)
2015-09-16 09:25 UTC, Ondrej Holy
accepted-commit_after_freeze Details | Review

Description Ondrej Holy 2015-09-16 09:23:55 UTC
Sometimes I wonder why I can't see failure in a debug output if job failed. There isn't indication about errors in some send_reply debug messages for some jobs (i.e. close, read, write, seek, truncate).
Comment 1 Ondrej Holy 2015-09-16 09:25:40 UTC
Created attachment 311441 [details] [review]
job: Unify send_reply debug messages

Unify send_reply debug messages for all jobs. Always indicate failure and include error message. Indicate some other info (i.e. offset, size) for some jobs (i.e. seek, read, write).
Comment 2 Ross Lagerwall 2015-09-19 07:48:24 UTC
Review of attachment 311441 [details] [review]:

Nice work, that should be useful. Looks good apart from some minor formatting comments.

::: daemon/gvfsjobcloseread.c
@@ +93,3 @@
   GVfsJobCloseRead *op_job = G_VFS_JOB_CLOSE_READ (job);
   
+  g_debug ("send_reply(%p), failed=%d (%s)\n", job, job->failed, job->failed?job->error->message:"");

Shouldn't there be spaces around ? and :

::: daemon/gvfsjobclosewrite.c
@@ +101,3 @@
   GVfsJobCloseWrite *op_job = G_VFS_JOB_CLOSE_WRITE (job);
   
+  g_debug ("send_reply(%p), failed=%d (%s)\n", job, job->failed, job->failed?job->error->message:"");

ditto for the rest

::: daemon/gvfsjobread.c
@@ +99,3 @@
+
+  g_debug ("send_reply(%p), bytes=%"G_GSIZE_FORMAT", failed=%d (%s)\n",
+	   job, op_job->data_count, job->failed, job->failed?job->error->message:"");

Best not to introduce new tabs.

::: daemon/gvfsjobseekread.c
@@ +98,3 @@
   
+  g_debug ("send_reply(%p), pos=%"G_GOFFSET_FORMAT", failed=%d (%s)\n",
+	   job, op_job->final_offset, job->failed, job->failed?job->error->message:"");

ditto for the rest
Comment 3 Ondrej Holy 2015-09-23 08:19:23 UTC
Thanks for the review.

The spaces around ? and : weren't there before, but I've added them for better readability (also in gvfsjobdbus.c and gvfsjobenumerate.c). I've added also line breaks to avoid more then 80 characters per line.

I've replaced the tabs by spaces. The tabs were added by mistake testing Gnome Builder... (Thanks to your review I've enabled whitespace coloring for git diff and reconfigured Gnome Builder to show tabs using gsettings)

Pushed as commit 766b99b .