mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexis Berlemont <alexis.berlemont@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Alexis Berlemont <alexis.berlemont@gmail.com>,
	peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
	alexander.shishkin@linux.intel.com
Subject: [PATCH v2 0/1] perf: check that objdump correctly works
Date: Tue, 20 Dec 2016 01:11:36 +0100	[thread overview]
Message-ID: <20161220001137.26773-1-alexis.berlemont@gmail.com> (raw)
In-Reply-To: <20161206193805.GB8257@kernel.org>

Hi Arnaldo,

Here is a patch which checks that objdump works without calling it
first with the "-v" option.

Thanks to the shell pipefail option (which returns the rightmost error
status in the shell pipe) and the grep subshell which prevents
"no-match" errors, we are able the use waitpid on the whole pipeline
and get the appropriate return code.

This is the most simple and straightforward solution I found. The
downside might be that it relies on the availability of "pipefail"
shell option. However, I checked that even busybox's shell implemented
it.

Alexis.

Alexis Berlemont (1):
  perf annotate: check that objdump correctly works

 tools/perf/util/annotate.c | 69 +++++++++++++++++++++++++++++++++++++++++++---
 tools/perf/util/annotate.h |  3 ++
 2 files changed, 68 insertions(+), 4 deletions(-)

-- 
2.11.0

  parent reply	other threads:[~2016-12-20  0:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-01  0:04 [PATCH] " Alexis Berlemont
2016-12-01  0:04 ` [PATCH] perf annotate: " Alexis Berlemont
2016-12-06 19:38   ` Arnaldo Carvalho de Melo
2016-12-09 23:57     ` Alexis Berlemont
2016-12-20  0:11     ` Alexis Berlemont [this message]
2016-12-20  0:11     ` [PATCH v2 1/1] " Alexis Berlemont
2016-12-06 14:44 ` [PATCH] perf: " Arnaldo Carvalho de Melo

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=20161220001137.26773-1-alexis.berlemont@gmail.com \
    --to=alexis.berlemont@gmail.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.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

all inboxes | Powered by JetHome®