From patchwork Tue Jan 31 02:33:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 50574 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2516927wrn; Mon, 30 Jan 2023 18:35:55 -0800 (PST) X-Google-Smtp-Source: AMrXdXv2bZ9ifiAHqaly9EC6FR0FHI02sSU4frtC8Ziz9C8VTZiBIqmiMlvBT8knW5iOECQY7jvV X-Received: by 2002:a17:906:7748:b0:7c0:e30a:d3e5 with SMTP id o8-20020a170906774800b007c0e30ad3e5mr49128331ejn.18.1675132554754; Mon, 30 Jan 2023 18:35:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675132554; cv=none; d=google.com; s=arc-20160816; b=P+m1mRFCNojx2lzYI1oZkmJ2i+mvVqvq/1aa7L6NQ7rV8udrRbfQz9A/Tc5ZJAlKvK a42dQCcD2CFIx5u4Hyp1IJ7Z+Fqdq9YfoMLDizXEK8jH+bXRIOEEqH18iE+XLJNNChh+ Q8GoSDnv86ibWSlGUGyYIRBPgoj3Bcf2Ld3K0sRXmqBzS0QsZUoAm8mdDXJiOqJm4F2C HI5qgIejcGwTrGsn1u2h7Sey1GH/qYvm+KCaZEUtaW5WnLfveV+iyxBI1pcIm17ZdLyP o/+Z4Wyl9WeLxpU9G0CdrAxlbdFGGSqqJ6ZeoJDtyS4nu/bK+Rk9lxjjk4IbggRX61p3 i4yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=HRrV7TjTlPA/BkPaOPUYQ8wwbHiOpKT0qv7GK3Tslrg=; b=nLI17Y0j5LnMascJCxrN53i5PVUzb2V/qnnBlG6v5dWv6tDUA7i0AYjKA0Ch4VV/UI 04mzMdcR28Pj2nCSAwu7OwbsJLwTiaclqtl5YLSYCM926mEmCm/y+wwSdcRNyeuVsUCG tphwf/wIMqktqUrOYoYYxcOFVK8EphNvy88U8W3rrjq6sx5TzY8kUotOHD+tu9vVUoFL lkiGu07UD+mJpM9xcovJ2YhqSVa8QkSYFAlK4yd1oCNvQyQpoo2QbyZr+nVeAxL7LxJa TZUJeaoj5suj+8AQPlz9lagRJj8dMlDY8tid7+sCfia973bpcTuGQLKn1G7KsxqWuHGh XD2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fFDIWDUF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p16-20020a170906935000b0084d7c8a4bdfsi14250427ejw.276.2023.01.30.18.35.31; Mon, 30 Jan 2023 18:35:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fFDIWDUF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230106AbjAaCeK (ORCPT + 99 others); Mon, 30 Jan 2023 21:34:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229911AbjAaCeE (ORCPT ); Mon, 30 Jan 2023 21:34:04 -0500 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D725336084; Mon, 30 Jan 2023 18:33:59 -0800 (PST) Received: by mail-pl1-x630.google.com with SMTP id b5so6408715plz.5; Mon, 30 Jan 2023 18:33:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=HRrV7TjTlPA/BkPaOPUYQ8wwbHiOpKT0qv7GK3Tslrg=; b=fFDIWDUFi/gMbk90i7BKU0biXYThbFrvns3JS/E/592VMsOumS8JfuTb8g+/ucdJvt DBbjZGK029lXRrU5R4C5odHdMjMagiLVyNsiPyM1ImMxDqP10zh1XWsfg6RWyfSRQXSw FULktgF4zgF31YYcYTcwNF/hS2OU+PmAk2g60nxMoSXv8qatZ6KGId6+wCZ0EWYTUViz rdDzmTyL0I2Q8HHAiwL5hRMwkrL8Lw/15o02vW9CD5SmUYWKUr83ZigvcMKeFS0uOuhN kWyjfC8RzHXZf1AXW+cpWu4aCfreXq8rwfUZIZqKcfUJbzqUmcitWSwDG7PYE6azh7o2 ES7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=HRrV7TjTlPA/BkPaOPUYQ8wwbHiOpKT0qv7GK3Tslrg=; b=B+wO5DfKZrC/0jQ53RKORCPfLKbvLFjEEkaNudgsMxbk6f5Bt510RPPS104/5fPCAI npGNIS/Hon+779BhfYCILZGv/SnZagkMEAfg4HxblNBdmTY+jphCTtDg/1vU9TcJjAfF zoJRp82W2o7Y596kfwsNqWYqJCoz7ihTQUxjBT3G0/mniUqMnS0wYzLjNzPYvO94Kbwo EbjCH9WkQo+zw9KIfgiOkyuQkK6j7H6Hc2M2b9UhRsEZLcKZEtyoWmFoiOk5Ycu9ycy3 08SEQFIGsryXd0QB/dRLqjrRd+spK16bdpExNUsFKNBNEfVhn/kpuP6XZdgeNS+jIset XEtQ== X-Gm-Message-State: AFqh2kozbiIdcZ9eV1O+bCGccarJQkVdh03ynqyNoNFz+4XbZXJMFvE4 VAzw37uM+kcMrZ5qJQNtO+YsLwGiwMo= X-Received: by 2002:a17:90a:b798:b0:229:d641:9ef2 with SMTP id m24-20020a17090ab79800b00229d6419ef2mr46407332pjr.40.1675132439097; Mon, 30 Jan 2023 18:33:59 -0800 (PST) Received: from balhae.hsd1.ca.comcast.net ([2601:647:6780:ff0:3f41:4035:c56c:92cc]) by smtp.gmail.com with ESMTPSA id u13-20020a17090a6a8d00b00228f45d589fsm7640582pjj.29.2023.01.30.18.33.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 18:33:58 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa , Adrian Hunter Cc: Ingo Molnar , Peter Zijlstra , LKML , Ian Rogers , linux-perf-users@vger.kernel.org, James Clark , Leo Yan , Stephane Eranian Subject: [PATCH 4/4] perf test: Add pipe mode test to the Intel PT test suite Date: Mon, 30 Jan 2023 18:33:50 -0800 Message-Id: <20230131023350.1903992-5-namhyung@kernel.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131023350.1903992-1-namhyung@kernel.org> References: <20230131023350.1903992-1-namhyung@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756503793327037716?= X-GMAIL-MSGID: =?utf-8?q?1756503793327037716?= The test_pipe() function will check perf report and perf inject with pipe input. Signed-off-by: Namhyung Kim --- tools/perf/tests/shell/test_intel_pt.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tools/perf/tests/shell/test_intel_pt.sh b/tools/perf/tests/shell/test_intel_pt.sh index f5ed7b1af419..4ddb17cb83c5 100755 --- a/tools/perf/tests/shell/test_intel_pt.sh +++ b/tools/perf/tests/shell/test_intel_pt.sh @@ -620,6 +620,22 @@ test_event_trace() return 0 } +test_pipe() +{ + echo "--- Test with pipe mode ---" + # Check if it works with pipe + if ! perf_record_no_bpf -o- -e intel_pt//u uname | perf report -q -i- --itrace=i10000 ; then + echo "perf record + report failed with pipe mode" + return 1 + fi + if ! perf_record_no_bpf -o- -e intel_pt//u uname | perf inject -b > /dev/null ; then + echo "perf record + inject failed with pipe mode" + return 1 + fi + echo OK + return 0 +} + count_result() { if [ "$1" -eq 2 ] ; then @@ -647,6 +663,7 @@ test_virtual_lbr || ret=$? ; count_result $ret ; ret=0 test_power_event || ret=$? ; count_result $ret ; ret=0 test_no_tnt || ret=$? ; count_result $ret ; ret=0 test_event_trace || ret=$? ; count_result $ret ; ret=0 +test_pipe || ret=$? ; count_result $ret ; ret=0 cleanup