Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756198AbcLTAQg (ORCPT ); Mon, 19 Dec 2016 19:16:36 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34898 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755962AbcLTAQe (ORCPT ); Mon, 19 Dec 2016 19:16:34 -0500 From: Alexis Berlemont To: linux-kernel@vger.kernel.org Cc: Alexis Berlemont , 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 Message-Id: <20161220001137.26773-1-alexis.berlemont@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20161206193805.GB8257@kernel.org> References: <20161206193805.GB8257@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 822 Lines: 26 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