Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp671672imu; Wed, 16 Jan 2019 05:48:54 -0800 (PST) X-Google-Smtp-Source: ALg8bN5Ha38TZ5wkLITsfPw99986A5HVYclaD3NYf2p9RsqOlOKCK750ffd0/EF+p1zXGXX6XhDT X-Received: by 2002:a62:a99:: with SMTP id 25mr9746145pfk.121.1547646534321; Wed, 16 Jan 2019 05:48:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547646534; cv=none; d=google.com; s=arc-20160816; b=v+gpEn5wcUQN9FxFM12vd+4Vu9R0pevLHwd01f5vMMxzTTrmktz3wHp63Z4fHQb0hO bnsj3u5nF2+6lUJ51p1ii5WsSo21vbBHbz4oS/f3e0fdfpRoJLChSPD6nkEvfkJorEDG TckJwhEwlYUAxKE6Ep3yCf7RzZjNF6aEDJLOPVuZw26oh1zgd5YfhVz5uLzYMDzM5Jki nEhl6FDs/rUU0fJrv8GNVby2HNun8Xbw2msJwCfAiBIs3hHu0KyCdCT9tGdwFh/qviSr +JIW86KWhl8WxfMnKjAF+Lng4/mAl5+jnzTron4juVk7O8OLvLN7ftIsutm1HFsWVbgC gZdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=MrMo2uUYGbLSz5qrhZQs0FEt2gT6bcqx1JCmHbwP2U8=; b=oNxp9vQCGxMvBdyo/BxTlUe6k9181RyFKB1sNeoMVqJ5YbUIfwMxPPuAzbYvJTSO3/ fG1yE/HxA2MiqhcmSu5BqgJPN3+RDGE0dBb8MzbT+riknl8Q2kK2OD2u41kfKDlK47OZ q4pf8JJnBeSlU2sl8KNoF3d1J7mhvioTTlRhl1Rm+RriTKRX4PZ7CqUZTl6A1tU/yh/d rDxOm5xyiV5SfYHXV7+404zABDHcjBgHxsqVtxsk+nEfTiLLwn28Kt5vNXoc+xqjH9x6 CbPgrUYMRFTcXbrC+egX/vpzTvb1wl0+6t+yV5q3EGJ3Xgrq9rC+pbuKO6tXiL2PQj+J vrow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EVd7kesF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h17si6156591pgd.538.2019.01.16.05.48.35; Wed, 16 Jan 2019 05:48:54 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=EVd7kesF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391044AbfAOWGj (ORCPT + 99 others); Tue, 15 Jan 2019 17:06:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:49580 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391028AbfAOWGh (ORCPT ); Tue, 15 Jan 2019 17:06:37 -0500 Received: from localhost.localdomain (c-98-220-238-81.hsd1.il.comcast.net [98.220.238.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7567E20866; Tue, 15 Jan 2019 22:06:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547589996; bh=wNXpEvHfF8L0Pgc8OIMtZCLN2O99PXMpLp2xLuYBUGw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=EVd7kesFuH/Milh84r5CwwZ7ssjDbtQ4SMCzsmVsAq9HlxVPaTRrnK1K3EhJmWTpt sWssEz/O4F9yV3kWkdOKFLaDezBiayXGVkuq8Jw0wfxmTrUo38yxkyC8ZOfzsV9NGC dpA/yhXwgAPsj/vGaZPc5LDeDrArKue7GPsywyDc= From: Tom Zanussi To: rostedt@goodmis.org Cc: tglx@linutronix.de, mhiramat@kernel.org, namhyung@kernel.org, vedang.patel@intel.com, bigeasy@linutronix.de, joel@joelfernandes.org, mathieu.desnoyers@efficios.com, julia@ni.com, linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org Subject: [PATCH v12 16/16] tracing: Add hist trigger action 'expected fail' test case Date: Tue, 15 Jan 2019 16:06:00 -0600 Message-Id: <279cbd1a017d9076ef4e393d048cf4c1c795b8a5.1547589128.git.tom.zanussi@linux.intel.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tom Zanussi Add a test case verifying that basic action combinations fail as expected. Signed-off-by: Tom Zanussi --- .../inter-event/trigger-action-hist-xfail.tc | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-action-hist-xfail.tc diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-action-hist-xfail.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-action-hist-xfail.tc new file mode 100644 index 000000000000..1221240f8cf6 --- /dev/null +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-action-hist-xfail.tc @@ -0,0 +1,30 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# description: event trigger - test inter-event histogram trigger expected fail actions + +fail() { #msg + echo $1 + exit_fail +} + +if [ ! -f set_event ]; then + echo "event tracing is not supported" + exit_unsupported +fi + +if [ ! -f snapshot ]; then + echo "snapshot is not supported" + exit_unsupported +fi + +grep -q "snapshot()" README || exit_unsupported # version issue + +echo "Test expected snapshot action failure" + +echo 'hist:keys=comm:onmatch(sched.sched_wakeup).snapshot()' >> /sys/kernel/debug/tracing/events/sched/sched_waking/trigger && exit_fail + +echo "Test expected save action failure" + +echo 'hist:keys=comm:onmatch(sched.sched_wakeup).save(comm,prio)' >> /sys/kernel/debug/tracing/events/sched/sched_waking/trigger && exit_fail + +exit_xfail -- 2.14.1