From patchwork Sat Jan 7 13:32:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Masami Hiramatsu (Google)" X-Patchwork-Id: 13092152 X-Patchwork-Delegate: mhiramat@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13B3CC54EBC for ; Sat, 7 Jan 2023 13:32:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232426AbjAGNcq (ORCPT ); Sat, 7 Jan 2023 08:32:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231859AbjAGNcd (ORCPT ); Sat, 7 Jan 2023 08:32:33 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C98795D415; Sat, 7 Jan 2023 05:32:31 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 575A360C14; Sat, 7 Jan 2023 13:32:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B3D1C433D2; Sat, 7 Jan 2023 13:32:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673098350; bh=lA+rE8kKU4UerwopcQ1eDt8yxXIRd212goJdv8X2Ulo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kX2M9ZVPoclER5r+AYgjQNDSJPnG2X0VHHYExO94dzwNPeeIwexodLfSdEtSHz53T bRIVV77kkNHpyFAG0a3VQyfdq7TJ/tJZcYHCehITGUgcpAsHb/yFmG6hV+uyCHlG3W bGMNDuAVxWUt0bzV62ordUOSXhHNPsKi2fi6PEyThPykZUoVpV+CAolu2JAKwUcwzL cCBW3jih6ABBjXOxH4YtoU+S0iTZhLYXUwZUGGhWz7uEZ8Av0Wr7LTav/vja7VdFJM PSmtvrlnuouQVx5BrVyq1kH/3eOds0fy9dbhURyXv7uKocmtRLcUIZfA3j6Rh/9xKx K+U9yjfSNjhng== From: "Masami Hiramatsu (Google)" To: Shuah Khan , Steven Rostedt Cc: Masami Hiramatsu , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH 2/3] selftests/ftrace: Fix eprobe syntax test case to check filter support Date: Sat, 7 Jan 2023 22:32:27 +0900 Message-Id: <167309834742.640500.379128668288448035.stgit@devnote3> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog In-Reply-To: <167309832823.640500.13244630381161014364.stgit@devnote3> References: <167309832823.640500.13244630381161014364.stgit@devnote3> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-kernel@vger.kernel.org From: Masami Hiramatsu (Google) Fix eprobe syntax test case to check whether the kernel supports the filter on eprobe for filter syntax test command. Without this fix, this test case will fail if the kernel supports eprobe but doesn't support the filter on eprobe. Fixes: 9e14bae7d049 ("selftests/ftrace: Add eprobe syntax error testcase") Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu (Google) --- .../test.d/dynevent/eprobes_syntax_errors.tc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/ftrace/test.d/dynevent/eprobes_syntax_errors.tc b/tools/testing/selftests/ftrace/test.d/dynevent/eprobes_syntax_errors.tc index fc1daac7f066..4f5e8c665156 100644 --- a/tools/testing/selftests/ftrace/test.d/dynevent/eprobes_syntax_errors.tc +++ b/tools/testing/selftests/ftrace/test.d/dynevent/eprobes_syntax_errors.tc @@ -22,6 +22,8 @@ check_error 'e:foo/^bar.1 syscalls/sys_enter_openat' # BAD_EVENT_NAME check_error 'e:foo/bar syscalls/sys_enter_openat arg=^dfd' # BAD_FETCH_ARG check_error 'e:foo/bar syscalls/sys_enter_openat ^arg=$foo' # BAD_ATTACH_ARG -check_error 'e:foo/bar syscalls/sys_enter_openat if ^' # NO_EP_FILTER +if grep -q '\..*\[if \]' README; then + check_error 'e:foo/bar syscalls/sys_enter_openat if ^' # NO_EP_FILTER +fi exit 0