From patchwork Tue Oct 18 14:03:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Naveen N. Rao" X-Patchwork-Id: 4198 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1985498wrs; Tue, 18 Oct 2022 07:18:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM79BcZr8L2UuFNsNlG0JfqTmWL9RNQUaNcQFqtie/9m0swYx7WU3nparBpilStsDjJ+2S1x X-Received: by 2002:a17:902:da83:b0:185:5837:f43a with SMTP id j3-20020a170902da8300b001855837f43amr3582930plx.26.1666102719780; Tue, 18 Oct 2022 07:18:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666102719; cv=none; d=google.com; s=arc-20160816; b=KC9JmtB54dc2xQjutjLOa9EIBd+4NO43xefLD4lZ3KmA4SRLXq3iHD0185cA1GYyEv Eh2JEay5EkGjHcoNaEvcu1MFScJ56zza6e6G1JaYE4vNfD+L2mQ82u2IFC5gnObGiRDi sebI7YgF2eKA+zmAAw0w7jn4qCxO1Jn4largS+Rc96qqTtEXuhICBXH9fvEkFHIelyUF fiMalaxHYx5yq0X+TDad7J+TlPl+K1SkLGLZrueiRrY4pCJfvNxQ/ImnnJYO41SjCcjR BS37uVowCbZ7Xvr11VBak4j8MxLdD1zJkq3rJZO7thgR2/O7lhFLQQUyixjzofN7uAuS wdBg== 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 :dkim-signature; bh=3xCvfhPsbclwHDbgf/plPrMlOtES/xpwnsdnKcR/Mk4=; b=raceoI3ZjfTfvZHlddc43DTWUJ39qnVEZmH0CTvQJoulSE+otc54RcHnfUJCcVAvQI CxnSHIPxS6eflY810SqLAf2ozaGqC1OnNOSyAVbLsGuRHjD4M7nwP2yhrD5aMhp2eMxV oiMrfmtsoU+k3I4aavQC/YT+43x8Mi1JqY8kGoBDLtB/u9zU18aIRDmI8cgAwaEXkODv WJGJ4JJNBCbi0L+t3+KG+EuLgHf6+JgypMOq6NvxWS2qTt6yR3gyRCllzVgTCKZLxmG9 bXXI0Jhs0p028eXfsq7Kh7rVjoVd5DuEbNVE9bBdFKQxcjdhZXDAd8p8/VQCR8BqPHDC m5jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=JelZKKzc; 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=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o7-20020a17090a744700b0020329ca07cbsi18489850pjk.119.2022.10.18.07.18.25; Tue, 18 Oct 2022 07:18:39 -0700 (PDT) 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=@ibm.com header.s=pp1 header.b=JelZKKzc; 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231424AbiJROEo (ORCPT + 99 others); Tue, 18 Oct 2022 10:04:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231202AbiJROEU (ORCPT ); Tue, 18 Oct 2022 10:04:20 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C7A5D03AE for ; Tue, 18 Oct 2022 07:04:16 -0700 (PDT) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29IDPdWG008480; Tue, 18 Oct 2022 14:04:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=3xCvfhPsbclwHDbgf/plPrMlOtES/xpwnsdnKcR/Mk4=; b=JelZKKzccfFrGZhyQs4gqworl4RwG22LmeTJgYVqprOMyREKZayGnO/UpB0LMCAS/9iH tQiomY+Bk/CjrzwGAxLljfGNIztTj8JHh0aCnLAKgbKyBbwa8Q9sc7Qj+i5vKY//QPs+ Gt14wlChTUj6CDa7FQb2ztBDl3np+B9L9BbDVkrVwlQNm0Tsu1j7TWGJKpExoFbhpCtz JsDbRqkSWU1q+FfifrHOVM6sDCwSNwPyj7sX5FmYdKm8LXsuY3fqUZBUaY9e21PiMz6p 4xjiSwCkO47I+fE1+hkZhTAzHLBeQTzs3MhOlB+fxeTBhR/xBPw8J6Bn85me9cfUdQ/E 4A== Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3k9w139tmu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Oct 2022 14:04:12 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 29IDtLNJ022006; Tue, 18 Oct 2022 14:03:56 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma03ams.nl.ibm.com with ESMTP id 3k7mg95cxg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Oct 2022 14:03:56 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 29IE4R7W52363684 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Oct 2022 14:04:27 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A510DA4040; Tue, 18 Oct 2022 14:03:54 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EDBD8A4051; Tue, 18 Oct 2022 14:03:52 +0000 (GMT) Received: from li-NotSettable.ibm.com.com (unknown [9.43.89.190]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 18 Oct 2022 14:03:52 +0000 (GMT) From: "Naveen N. Rao" To: Steven Rostedt , Shuah Khan Cc: , Masami Hiramatsu , Akanksha J N Subject: [PATCH v2 1/2] selftests/ftrace: Add check for ping command for trigger tests Date: Tue, 18 Oct 2022 19:33:40 +0530 Message-Id: <4ec67d1b5c5d4e693a4826a89c9fd4eca5343eb6.1666101523.git.naveen.n.rao@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: Wm_vRCtpsSz00DlHjBVUolwA4WYFcDXa X-Proofpoint-ORIG-GUID: Wm_vRCtpsSz00DlHjBVUolwA4WYFcDXa X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-18_04,2022-10-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 spamscore=0 priorityscore=1501 mlxlogscore=999 clxscore=1015 bulkscore=0 adultscore=0 mlxscore=0 lowpriorityscore=0 phishscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210180080 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham 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?1747035325353294819?= X-GMAIL-MSGID: =?utf-8?q?1747035325353294819?= All these tests depend on the ping command and will fail if it is not found. Allow tests to specify dependencies on programs through the 'requires' field. Add dependency on 'ping' for some of the trigger tests. Reported-by: Akanksha J N Suggested-by: Steven Rostedt Signed-off-by: Naveen N. Rao Reviewed-by: Steven Rostedt (Google) Acked-by: Masami Hiramatsu (Google) --- tools/testing/selftests/ftrace/test.d/functions | 8 +++++++- .../trigger/inter-event/trigger-field-variable-support.tc | 2 +- .../inter-event/trigger-inter-event-combined-hist.tc | 2 +- .../trigger/inter-event/trigger-onchange-action-hist.tc | 2 +- .../trigger/inter-event/trigger-onmatch-action-hist.tc | 2 +- .../inter-event/trigger-onmatch-onmax-action-hist.tc | 2 +- .../trigger/inter-event/trigger-onmax-action-hist.tc | 2 +- .../trigger/inter-event/trigger-snapshot-action-hist.tc | 2 +- .../inter-event/trigger-synthetic-event-dynstring.tc | 2 +- .../trigger/inter-event/trigger-trace-action-hist.tc | 2 +- 10 files changed, 16 insertions(+), 10 deletions(-) diff --git a/tools/testing/selftests/ftrace/test.d/functions b/tools/testing/selftests/ftrace/test.d/functions index 5f6cbec847fc99..779f3e62ec9005 100644 --- a/tools/testing/selftests/ftrace/test.d/functions +++ b/tools/testing/selftests/ftrace/test.d/functions @@ -142,9 +142,15 @@ finish_ftrace() { check_requires() { # Check required files and tracers for i in "$@" ; do + p=${i%:program} r=${i%:README} t=${i%:tracer} - if [ $t != $i ]; then + if [ $p != $i ]; then + if ! which $p ; then + echo "Required program $p is not found." + exit_unresolved + fi + elif [ $t != $i ]; then if ! grep -wq $t available_tracers ; then echo "Required tracer $t is not configured." exit_unsupported diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-field-variable-support.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-field-variable-support.tc index 41119e0440e960..04c5dd7d0acc4b 100644 --- a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-field-variable-support.tc +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-field-variable-support.tc @@ -1,7 +1,7 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0 # description: event trigger - test field variable support -# requires: set_event synthetic_events events/sched/sched_process_fork/hist +# requires: set_event synthetic_events events/sched/sched_process_fork/hist ping:program fail() { #msg echo $1 diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-inter-event-combined-hist.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-inter-event-combined-hist.tc index 9098f1e7433fd0..f7447d800899ac 100644 --- a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-inter-event-combined-hist.tc +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-inter-event-combined-hist.tc @@ -1,7 +1,7 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0 # description: event trigger - test inter-event combined histogram trigger -# requires: set_event synthetic_events events/sched/sched_process_fork/hist +# requires: set_event synthetic_events events/sched/sched_process_fork/hist ping:program fail() { #msg echo $1 diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onchange-action-hist.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onchange-action-hist.tc index adaabb873ed4ab..91339c1308324b 100644 --- a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onchange-action-hist.tc +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onchange-action-hist.tc @@ -1,7 +1,7 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0 # description: event trigger - test inter-event histogram trigger onchange action -# requires: set_event "onchange(var)":README +# requires: set_event "onchange(var)":README ping:program fail() { #msg echo $1 diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmatch-action-hist.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmatch-action-hist.tc index 20e39471052e9a..d645abcf11c4f7 100644 --- a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmatch-action-hist.tc +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmatch-action-hist.tc @@ -1,7 +1,7 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0 # description: event trigger - test inter-event histogram trigger onmatch action -# requires: set_event synthetic_events events/sched/sched_process_fork/hist +# requires: set_event synthetic_events events/sched/sched_process_fork/hist ping:program fail() { #msg echo $1 diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmatch-onmax-action-hist.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmatch-onmax-action-hist.tc index f4b03ab7c28714..c369247efb3501 100644 --- a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmatch-onmax-action-hist.tc +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmatch-onmax-action-hist.tc @@ -1,7 +1,7 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0 # description: event trigger - test inter-event histogram trigger onmatch-onmax action -# requires: set_event synthetic_events events/sched/sched_process_fork/hist +# requires: set_event synthetic_events events/sched/sched_process_fork/hist ping:program fail() { #msg echo $1 diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmax-action-hist.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmax-action-hist.tc index 71c9b5911c7067..e28dc5f11b2be0 100644 --- a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmax-action-hist.tc +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmax-action-hist.tc @@ -1,7 +1,7 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0 # description: event trigger - test inter-event histogram trigger onmax action -# requires: set_event synthetic_events events/sched/sched_process_fork/hist +# requires: set_event synthetic_events events/sched/sched_process_fork/hist ping:program fail() { #msg echo $1 diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-snapshot-action-hist.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-snapshot-action-hist.tc index 67fa328b830f5f..147967e86584ac 100644 --- a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-snapshot-action-hist.tc +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-snapshot-action-hist.tc @@ -1,7 +1,7 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0 # description: event trigger - test inter-event histogram trigger snapshot action -# requires: set_event snapshot events/sched/sched_process_fork/hist "onchange(var)":README "snapshot()":README +# requires: set_event snapshot events/sched/sched_process_fork/hist "onchange(var)":README "snapshot()":README ping:program fail() { #msg echo $1 diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic-event-dynstring.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic-event-dynstring.tc index 3d65c856eca3e6..213d890ed1886e 100644 --- a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic-event-dynstring.tc +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic-event-dynstring.tc @@ -1,7 +1,7 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0 # description: event trigger - test inter-event histogram trigger trace action with dynamic string param -# requires: set_event synthetic_events events/sched/sched_process_exec/hist "char name[]' >> synthetic_events":README +# requires: set_event synthetic_events events/sched/sched_process_exec/hist "char name[]' >> synthetic_events":README ping:program fail() { #msg echo $1 diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-trace-action-hist.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-trace-action-hist.tc index c126d2350a6d41..d7312047ce2818 100644 --- a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-trace-action-hist.tc +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-trace-action-hist.tc @@ -1,7 +1,7 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0 # description: event trigger - test inter-event histogram trigger trace action -# requires: set_event synthetic_events events/sched/sched_process_fork/hist "trace(":README +# requires: set_event synthetic_events events/sched/sched_process_fork/hist "trace(":README ping:program fail() { #msg echo $1 From patchwork Tue Oct 18 14:03:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Naveen N. Rao" X-Patchwork-Id: 4195 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1983677wrs; Tue, 18 Oct 2022 07:15:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4KJtGWXxbP1s6kIfdu5YVbykb1e/zCEzhuZLM9IUce/IjJK9NNsQpLlEAQTcKXI2EtnqLp X-Received: by 2002:a17:907:6d11:b0:78d:cce7:2bd5 with SMTP id sa17-20020a1709076d1100b0078dcce72bd5mr2575230ejc.43.1666102540480; Tue, 18 Oct 2022 07:15:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666102540; cv=none; d=google.com; s=arc-20160816; b=XG5fSo45SaKtEqUoawswPdN5AZJcFx3Mvr1rmK31AToNw+cnbARWRu1nS+EnKGERrY l/CdHIG2s+P8AF4tul83H7KlBbORmR+Bwn+IiSgN0aKdMxNH5qR7PrGT+sWryhF01THQ Qag1123Ax2FkXom9uzkq9/a8tsCNyQGA9eDp2aHUjNOp5Ue7oGWfeBUpOixxTcZGE3Pd H7SvwLxoE00jyVc/td1QZYpnoUcrw1YI8ojsFq+mfKL2oqKRulr2KayFA94+SksihTXv XcKwbYBY0LsfOWEC1lKOyc5qZ6/YhnY76TtJp7aP1cyn2SMkP4+wakxhIlsLB+814wew 1eTw== 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 :dkim-signature; bh=Q7zIZbq8bl/WgD9Febs1/muk7cb1YTij7a3YfpRq9GY=; b=AY1a2ZjqeJ5HB4M8ke6crM+Zu1bghlSdPP0Ka+TEWyeE6Gru5qqK5lkk8tQ4QszKRP isAueH9PrSyMzmpZ70Gghmu389RC1FwNw9pkdbHIQLc2WEAqkT+XICHnSwMj9RxM2LGX 2uh5R7nKQ0EJyLuYqFrjfpicI1g/GXtdbtEss28FY+RROW13coULyjQ/KyH3UDPMTQ0C nNKkG/NI4rYhGtV40XS7AmegFuUqhHgQCgqOZqtsVGbzM2rzO7A//AX8aV6fXVqmH7a9 blO0VyfE7EwF7Zbk9pz3x0hQIJ13Re4GxHim+wUKLM1CRu/mLEO6ceVt9d2xR5TW3GVU 9qTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="cwA/Nj2Y"; 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=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v20-20020a170906489400b00777795f0725si10080044ejq.139.2022.10.18.07.15.14; Tue, 18 Oct 2022 07:15:40 -0700 (PDT) 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=@ibm.com header.s=pp1 header.b="cwA/Nj2Y"; 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231415AbiJROEh (ORCPT + 99 others); Tue, 18 Oct 2022 10:04:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231458AbiJROEM (ORCPT ); Tue, 18 Oct 2022 10:04:12 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11A58D25B1 for ; Tue, 18 Oct 2022 07:04:06 -0700 (PDT) Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29IDNeIG014331; Tue, 18 Oct 2022 14:04:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=Q7zIZbq8bl/WgD9Febs1/muk7cb1YTij7a3YfpRq9GY=; b=cwA/Nj2Y1Em/yc+JUJ0A7htH+xoaFof2WyT4UJsnQN+L8RFFumbyhnSrK4z1IUaYARB5 RMPsGDsuVn8X8Avt5REDO8S3OIgzF3wTlpTkgGWTd1BH+xg+A4qJJKTXPf3KF8Sj47QC ovmqhgCy4GOn/uaZY5po49jqC9mi65QrAmHzRTt57gpcGfTzmunYfWrq+X77LTuLHKmm yK4j5joqpiUQdIqRcF40Omr6Ziw+uQNzN9mYvtAMN7oXf0j/I2pVgmAah8iYGJZnYaKY qfMSmf7r834d1NFeLwedoymFxP+yn4TXKTqtYxW6fzDGrFFp/65jc9fXLwmlZYLwgI0j NQ== Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3k9tqn7fxf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Oct 2022 14:04:00 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 29IDt8h4021950; Tue, 18 Oct 2022 14:03:59 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma03ams.nl.ibm.com with ESMTP id 3k7mg95cxj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Oct 2022 14:03:58 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 29IE3unp59048414 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Oct 2022 14:03:56 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AB3B2A404D; Tue, 18 Oct 2022 14:03:56 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1183AA4040; Tue, 18 Oct 2022 14:03:55 +0000 (GMT) Received: from li-NotSettable.ibm.com.com (unknown [9.43.89.190]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 18 Oct 2022 14:03:54 +0000 (GMT) From: "Naveen N. Rao" To: Steven Rostedt , Shuah Khan Cc: , Masami Hiramatsu , Akanksha J N Subject: [PATCH v2 2/2] selftests/ftrace: Convert tracer tests to use 'requires' to specify program dependency Date: Tue, 18 Oct 2022 19:33:41 +0530 Message-Id: <3a4e12586f82561c154092b2ea87b094c3d4740e.1666101523.git.naveen.n.rao@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 1XEgeyVtkxNDxwm3vdREcnT2QxNajmaz X-Proofpoint-ORIG-GUID: 1XEgeyVtkxNDxwm3vdREcnT2QxNajmaz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-18_04,2022-10-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 bulkscore=0 spamscore=0 mlxlogscore=926 malwarescore=0 phishscore=0 impostorscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 clxscore=1015 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210180080 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham 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?1747035137658318982?= X-GMAIL-MSGID: =?utf-8?q?1747035137658318982?= Now that we have a good way to specify dependency of tests on programs, convert some of the tracer tests to use this method for specifying dependency on 'chrt'. Signed-off-by: Naveen N. Rao Reviewed-by: Steven Rostedt (Google) --- tools/testing/selftests/ftrace/test.d/tracer/wakeup.tc | 7 +------ tools/testing/selftests/ftrace/test.d/tracer/wakeup_rt.tc | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/tools/testing/selftests/ftrace/test.d/tracer/wakeup.tc b/tools/testing/selftests/ftrace/test.d/tracer/wakeup.tc index 11be10e1bf966a..e8f0fac9a110cc 100644 --- a/tools/testing/selftests/ftrace/test.d/tracer/wakeup.tc +++ b/tools/testing/selftests/ftrace/test.d/tracer/wakeup.tc @@ -1,12 +1,7 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0 # description: Test wakeup tracer -# requires: wakeup:tracer - -if ! which chrt ; then - echo "chrt is not found. This test requires nice command." - exit_unresolved -fi +# requires: wakeup:tracer chrt:program echo wakeup > current_tracer echo 1 > tracing_on diff --git a/tools/testing/selftests/ftrace/test.d/tracer/wakeup_rt.tc b/tools/testing/selftests/ftrace/test.d/tracer/wakeup_rt.tc index 3a77198b3c6902..79807656785b0f 100644 --- a/tools/testing/selftests/ftrace/test.d/tracer/wakeup_rt.tc +++ b/tools/testing/selftests/ftrace/test.d/tracer/wakeup_rt.tc @@ -1,12 +1,7 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0 # description: Test wakeup RT tracer -# requires: wakeup_rt:tracer - -if ! which chrt ; then - echo "chrt is not found. This test requires chrt command." - exit_unresolved -fi +# requires: wakeup_rt:tracer chrt:program echo wakeup_rt > current_tracer echo 1 > tracing_on