Linux-Trace-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Yordan Karadzhov <y.karadz@gmail.com>
Cc: Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Subject: Re: [PATCH] kernel-shark: kernel-shark: Avoid a duplicate error message from capture
Date: Wed, 10 Jul 2019 12:31:50 -0400
Message-ID: <20190710123150.43b2719e@gandalf.local.home> (raw)
In-Reply-To: <CAE858AmPCXOTqx+80ukPMG3ovSTeoiMWSesMKR6iFVBQ+jkw_Q@mail.gmail.com>

On Wed, 10 Jul 2019 19:00:43 +0300
Yordan Karadzhov <y.karadz@gmail.com> wrote:

> On Wed, Jul 10, 2019, 18:39 Yordan Karadzhov (VMware) <y.karadz@gmail.com>
> wrote:
> 
> > If the capture process finishes with an error the _captureError() slot
> > will print an error message. We do not need to print identical message
> > in _captureFinished().
> >
> > However, we have to keep in mind that the process that we started is
> > "pkexec" and the capture dialog is a child process of "pkexec". So if
> > the capture dialog failed to start or crashed the "pkexec" process
> > itself will have a normal exit, however its return value will be
> > different from 0 (it will just pass the return value of the capture
> > dialog executable). In this case _captureError() is not triggered,
> > but we still want to see an error message.
> >
> > Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
> > ---
> >  kernel-shark/src/KsMainWindow.cpp | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/kernel-shark/src/KsMainWindow.cpp
> > b/kernel-shark/src/KsMainWindow.cpp
> > index 29d44d9..c127ad1 100644
> > --- a/kernel-shark/src/KsMainWindow.cpp
> > +++ b/kernel-shark/src/KsMainWindow.cpp
> > @@ -1180,7 +1180,7 @@ void KsMainWindow::_captureFinished(int ret,
> > QProcess::ExitStatus st)
> >                 return;
> >         }
> >
> > -       if (ret != 0 || st != QProcess::NormalExit) {
> > +       if (ret != 0 || st == QProcess::NormalExit) {
> >
> 
> Ohh, I made stupid mistake in the rush. Must use AND instead of OR

Heh, want me to just make the fix, or can you send a v2?

-- Steve

> 
>                 QString message = "Capture process failed:<br>";
> >
> >                 message += capture->errorString();
> > --
> > 2.20.1
> >
> >


      parent reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-10 15:39 Yordan Karadzhov (VMware)
     [not found] ` <CAE858AmPCXOTqx+80ukPMG3ovSTeoiMWSesMKR6iFVBQ+jkw_Q@mail.gmail.com>
2019-07-10 16:31   ` Steven Rostedt [this message]

Reply instructions:

You may reply publically 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=20190710123150.43b2719e@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=y.karadz@gmail.com \
    /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

Linux-Trace-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-trace-devel/0 linux-trace-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-trace-devel linux-trace-devel/ https://lore.kernel.org/linux-trace-devel \
		linux-trace-devel@vger.kernel.org linux-trace-devel@archiver.kernel.org
	public-inbox-index linux-trace-devel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-trace-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox