From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98AD6ECAAA1 for ; Mon, 12 Sep 2022 08:34:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230269AbiILIex (ORCPT ); Mon, 12 Sep 2022 04:34:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230222AbiILIet (ORCPT ); Mon, 12 Sep 2022 04:34:49 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9392F767F; Mon, 12 Sep 2022 01:34:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662971684; x=1694507684; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=murEwCFkCD0pF4LQRqPXhNOKMoRN9erLVSHjV8QLSns=; b=aCdnuSpCxRD+lVIyvS2cVqMfb9OQzjhhEBctTa4/i5afEWaf1fGnKJBX B7yPbjsSspdfAYZRHLQbdqn9sYNU9gVDFny+TB4zElayBwOkUhUvpv/Na wvvHo39nawE/YDbklrVbb+FpwfZS4KzlSD7ExpmgAAh26oIkTmVhxsUXu l+MXID37kZCCnltUwdGlISkHAbZJwmA7af03PC62M7MLEivDa7Xx7d+qG iJDn7oaXfMIEFQUQ4koH/SzrfkQH8Ex7g63HoSuUQcLeHZg4G0llVtGCr hpJ9LkRvTJU7HyXCjQ8xioR38PYrolaKrimChMqOR/KwCEBlceEvQTVfm A==; X-IronPort-AV: E=McAfee;i="6500,9779,10467"; a="299153645" X-IronPort-AV: E=Sophos;i="5.93,308,1654585200"; d="scan'208";a="299153645" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Sep 2022 01:34:43 -0700 X-IronPort-AV: E=Sophos;i="5.93,308,1654585200"; d="scan'208";a="611688306" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.46.215]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Sep 2022 01:34:41 -0700 From: Adrian Hunter To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , Namhyung Kim , Ian Rogers , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: [PATCH 08/11] perf test: test_intel_pt.sh: Fix return checking Date: Mon, 12 Sep 2022 11:34:09 +0300 Message-Id: <20220912083412.7058-9-adrian.hunter@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220912083412.7058-1-adrian.hunter@intel.com> References: <20220912083412.7058-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org The use of set -e will cause a function that returns non-zero to terminate the script unless the result is consumed by || for example. That is OK if there is only 1 test function, but not if there are more. Prepare for more by using ||. Signed-off-by: Adrian Hunter --- tools/perf/tests/shell/test_intel_pt.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/perf/tests/shell/test_intel_pt.sh b/tools/perf/tests/shell/test_intel_pt.sh index 075b780fe9ed..7d2f3136ce19 100755 --- a/tools/perf/tests/shell/test_intel_pt.sh +++ b/tools/perf/tests/shell/test_intel_pt.sh @@ -72,11 +72,11 @@ count_result() return fi err_cnt=$((err_cnt + 1)) + ret=0 } -test_system_wide_side_band - -count_result $? +ret=0 +test_system_wide_side_band || ret=$? ; count_result $ret cleanup -- 2.25.1