Received: by 10.213.65.68 with SMTP id h4csp1716814imn; Thu, 5 Apr 2018 02:31:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/dWhs74F9h04oisnUGke/O91t+jBoLVF5qPvP4hLu3IruwFoWSF9bYAHbOKIYy3PdF2gM8 X-Received: by 10.99.113.94 with SMTP id b30mr14193772pgn.196.1522920697127; Thu, 05 Apr 2018 02:31:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522920697; cv=none; d=google.com; s=arc-20160816; b=i+x3HHELNeFp8WNeUwjlHV6FvixyimROy0P6gHjCmcObP/A0PVL5Ah//+y8s0t74LU 1Rm+QgDPvJFwlH2tUfBqa8j7RMYlhq/GuKO8dbrhHI5ZiRr/tgEmpMbb3177wfgwVBZx XjnxjubaQQSxOhynE2GzyEtZHMiCZoVtX9PUF24nHL03RVc29o3Xn4VLUz4VpBeTxBps eL8DLY57aNjIdFiD9rVFov6KlBV67Q10yDIfGfH7EIROHv+vi3WSVGVPUFmIWzzTe6lY Pw++PS3HIj9Yhc49SOUMva64bRt8bTJ1O3fJQW/ySNGb2om6h1WWlWktikNeQSEpE3XK Ol7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dmarc-filter:arc-authentication-results; bh=QIEIVfRVxQOxx06TNtHu8cJ6lLTc++LHo8Wi2L4SToI=; b=NDH8UQolzac6cfDPEPCIhQWeer46nBurMEgDRaUEStRkzNdKInsV4/lD2oQJrJoWHf FJY7tJAg1Ki/VmdO8pIhfpaE8hoIbm0jXpjXaV+Fe4RPfW8HJ+kIcFS9+zD0/qLSd30h lE1cR1JTaQmHV3sc0gkITWNgpA1qh5W9bAoAbC7Ha4zgo4jzdxCRAR1Hz3B7qIy3vBV3 8YczgKFT3KnMcxkcR8dpLwyIqOOmpI1kGNaWIyZpIsJESOeaakkZohFbLrV0GdxRgOFH ED0SZOSCdUfCR3Gj/kDhL1rIqgen59j+KMWMJIl67BDoTaw0ACt17SzcnQdLE8hUsrKs PGPA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 189si5181681pge.444.2018.04.05.02.31.23; Thu, 05 Apr 2018 02:31:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751623AbeDEJ3i (ORCPT + 99 others); Thu, 5 Apr 2018 05:29:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:49506 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751104AbeDEJ3h (ORCPT ); Thu, 5 Apr 2018 05:29:37 -0400 Received: from localhost.localdomain (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7828F217CE; Thu, 5 Apr 2018 09:29:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7828F217CE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=mhiramat@kernel.org From: Masami Hiramatsu To: Steven Rostedt Cc: Masami Hiramatsu , Tom Zanussi , tglx@linutronix.de, namhyung@kernel.org, vedang.patel@intel.com, bigeasy@linutronix.de, joel.opensrc@gmail.com, joelaf@google.com, mathieu.desnoyers@efficios.com, baohong.liu@intel.com, rajvi.jingar@intel.com, julia@ni.com, fengguang.wu@intel.com, linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org Subject: [PATCH 2/2] selftests: ftrace: Add a testcase for multiple actions on trigger Date: Thu, 5 Apr 2018 18:29:12 +0900 Message-Id: <152292055227.15769.6327959816123227152.stgit@devbox> X-Mailer: git-send-email 2.13.6 In-Reply-To: <152292049091.15769.13306554953968999494.stgit@devbox> References: <152292049091.15769.13306554953968999494.stgit@devbox> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a testcase for multiple actions with different parameters on an event trigger, which has been fixed by commit 192c283e93bd ("tracing: Add action comparisons when testing matching hist triggers"). Signed-off-by: Masami Hiramatsu --- .../inter-event/trigger-multi-actions-accept.tc | 44 ++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-multi-actions-accept.tc diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-multi-actions-accept.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-multi-actions-accept.tc new file mode 100644 index 000000000000..c193dce611a2 --- /dev/null +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-multi-actions-accept.tc @@ -0,0 +1,44 @@ +#!/bin/sh +# description: event trigger - test multiple actions on hist trigger + + +do_reset() { + reset_trigger + echo > set_event + clear_trace +} + +fail() { #msg + do_reset + echo $1 + exit_fail +} + +if [ ! -f set_event ]; then + echo "event tracing is not supported" + exit_unsupported +fi + +if [ ! -f synthetic_events ]; then + echo "synthetic event is not supported" + exit_unsupported +fi + +clear_synthetic_events +reset_tracer +do_reset + +echo "Test multiple actions on hist trigger" +echo 'wakeup_latency u64 lat; pid_t pid' >> synthetic_events +TRIGGER1=events/sched/sched_wakeup/trigger +TRIGGER2=events/sched/sched_switch/trigger + +echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="cyclictest"' > $TRIGGER1 +echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0 if next_comm=="cyclictest"' >> $TRIGGER2 +echo 'hist:keys=next_pid:onmatch(sched.sched_wakeup).wakeup_latency(sched.sched_switch.$wakeup_lat,next_pid) if next_comm=="cyclictest"' >> $TRIGGER2 +echo 'hist:keys=next_pid:onmatch(sched.sched_wakeup).wakeup_latency(sched.sched_switch.$wakeup_lat,prev_pid) if next_comm=="cyclictest"' >> $TRIGGER2 +echo 'hist:keys=next_pid if next_comm=="cyclictest"' >> $TRIGGER2 + +do_reset + +exit 0