From patchwork Thu Aug 16 16:38:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Masami Hiramatsu (Google)" X-Patchwork-Id: 10567825 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B5692139A for ; Thu, 16 Aug 2018 16:38:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1D872B46F for ; Thu, 16 Aug 2018 16:38:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9522D2B477; Thu, 16 Aug 2018 16:38:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 797272B46F for ; Thu, 16 Aug 2018 16:38:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392426AbeHPTiG (ORCPT ); Thu, 16 Aug 2018 15:38:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:53034 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728011AbeHPTiG (ORCPT ); Thu, 16 Aug 2018 15:38:06 -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 6012D20C0D; Thu, 16 Aug 2018 16:38:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1534437512; bh=2KPmnuGrjaCtGamcyKB0pHqRshE5pKlcvcRAScFpe3o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DRRO+pZQM/r72A0fSvHeCL/0bJoyiR2T9gw1M3YW0FP0xwshCD4zaId4EhKtMxIv8 mnVqGueaX/oZqn1VXs/RV4Aq2XFbVZq95GWzY6yyHd8mLIASlfciAws9yMum7i0S68 IY33WZ6khNW76npMAw4oR/O4dfL8tOXM+92VAF1k= From: Masami Hiramatsu To: Shuah Khan , Steven Rostedt Cc: Ingo Molnar , Masami Hiramatsu , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 19/32] selftests/ftrace: Add a testcase for nop tracer Date: Fri, 17 Aug 2018 01:38:09 +0900 Message-Id: <153443748943.23257.13855745627496095446.stgit@devbox> X-Mailer: git-send-email 2.13.6 In-Reply-To: <153443695002.23257.13628220023468200991.stgit@devbox> References: <153443695002.23257.13628220023468200991.stgit@devbox> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a testcase for nop tracer. This tracer has 2 test options, so check it too. Signed-off-by: Masami Hiramatsu --- .../testing/selftests/ftrace/test.d/tracer/nop.tc | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tools/testing/selftests/ftrace/test.d/tracer/nop.tc diff --git a/tools/testing/selftests/ftrace/test.d/tracer/nop.tc b/tools/testing/selftests/ftrace/test.d/tracer/nop.tc new file mode 100644 index 000000000000..ca63e316e0f5 --- /dev/null +++ b/tools/testing/selftests/ftrace/test.d/tracer/nop.tc @@ -0,0 +1,22 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# description: Test nop tracer + +# nop must be supported always +grep -q "nop" available_tracers + +echo "nop" > current_tracer + +# nop provides 2 test options +grep -q "test_nop_accept" trace_options +grep -q "test_nop_refuse" trace_options + +# nop_accept always success +echo "test_nop_accept" > trace_options +echo "notest_nop_accept" > trace_options + +# nop_refuse always failed +! echo "test_nop_refuse" > trace_options +! echo "notest_nop_refuse" > trace_options + +exit 0