qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Prerna <saxenap.ltc@gmail.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] Debug : Add error messages before a call to debug().
Date: Thu, 28 Apr 2016 10:27:40 +0530	[thread overview]
Message-ID: <CALE=2vsfpVWyi3bELNjaSnhhE3Wb00FyjO7QGXziE4-MSBPNbQ@mail.gmail.com> (raw)
In-Reply-To: <5720E204.1090101@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1641 bytes --]

Hi Eric,
Thank you for the review.

On Wed, Apr 27, 2016 at 9:30 PM, Eric Blake <eblake@redhat.com> wrote:

> On 04/14/2016 09:02 PM, Prerna Saxena wrote:
> > Qemu code has abort() calls in various places which raises a SIGABRT;
> > This patch adds error messages before (most)calls to abort(), so that
> > it is easier to determine why QEMU died.
>
> The subject line says you are adding messages before debug(), but the
> rest of the patch is adding message before abort(). You'll need to fix
> that.  Also, subject lines usually don't end in '.'
>

Sorry, the subject line shouldve said : "Add error messages before abort()".
Will resend.


>
> > +++ b/block.c
> > @@ -3725,6 +3725,7 @@ void
> bdrv_remove_aio_context_notifier(BlockDriverState *bs,
> >          }
> >      }
> >
> > +    error_report("Matching context notifier not found for removal.
> Aborting");
> >      abort();
>
> The "Aborting" part of the message is redundant; it's pretty obvious
> that qemu aborted.
>
>
Agree.


> I also wonder if you should be using g_assert_not_reached() instead of
> abort() in some (all?) of the places touched in this patch - at which
> point you don't have to worry about inventing a message that will never
> be printed.  The reason I suggest it is that g_assert_not_reached() is
> self-documenting, and prints a nicer message than abort() if it does
> accidentally get reached.
>
>
Ah, thanks for this suggestion. I will look up g_assert_not_reached() to
see how I can use it (at all places, possibly).

Regards,
Prerna


> --
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
>

[-- Attachment #2: Type: text/html, Size: 2855 bytes --]

  reply	other threads:[~2016-04-28  4:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-15  3:02 [Qemu-devel] [PATCH 0/2] Cleanup and instrumenting qemu exits due to abort() Prerna Saxena
2016-04-15  3:02 ` [Qemu-devel] [PATCH 1/2] Block: Cleanup vvfat.c to remove dead code Prerna Saxena
2016-04-27 15:20   ` Stefan Hajnoczi
2016-04-27 16:07   ` Alex Bennée
2016-04-15  3:02 ` [Qemu-devel] [PATCH 2/2] Debug : Add error messages before a call to debug() Prerna Saxena
2016-04-27 15:38   ` Stefan Hajnoczi
2016-04-27 16:00   ` Eric Blake
2016-04-28  4:57     ` Prerna [this message]
2016-04-28  8:34     ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALE=2vsfpVWyi3bELNjaSnhhE3Wb00FyjO7QGXziE4-MSBPNbQ@mail.gmail.com' \
    --to=saxenap.ltc@gmail.com \
    --cc=eblake@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).