From patchwork Fri May 6 10:20:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiezhu Yang X-Patchwork-Id: 12840974 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 5219AC433F5 for ; Fri, 6 May 2022 10:20:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1390890AbiEFKY1 (ORCPT ); Fri, 6 May 2022 06:24:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1390898AbiEFKYO (ORCPT ); Fri, 6 May 2022 06:24:14 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A4F5751331; Fri, 6 May 2022 03:20:30 -0700 (PDT) Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9BxENtn9nRiaBAMAA--.48713S3; Fri, 06 May 2022 18:20:24 +0800 (CST) From: Tiezhu Yang To: Thomas Bogendoerfer , Masami Hiramatsu , Steven Rostedt , Shuah Khan Cc: Xuefeng Li , linux-mips@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] selftests/ftrace: Save kprobe_events to test log Date: Fri, 6 May 2022 18:20:22 +0800 Message-Id: <1651832423-7932-2-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1651832423-7932-1-git-send-email-yangtiezhu@loongson.cn> References: <1651832423-7932-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANSID: AQAAf9BxENtn9nRiaBAMAA--.48713S3 X-Coremail-Antisp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73UjIFyTuYvjfU5UUUUUUUU X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org It may lead to kernel panic when execute the following testcase on mips: # cd tools/testing/selftests/ftrace # ./ftracetest test.d/kprobe/multiple_kprobes.tc A preliminary analysis shows that the issue is related with echo 1 > events/kprobes/enable after add the 256 probe points. In order to find the root cause, I want to verify which probe point has problem, so it is necessary to save kprobe_events to test log. With this patch, we can get the 256 probe points in the test log through the following command: # ./ftracetest test.d/kprobe/multiple_kprobes.tc -vvv -k Signed-off-by: Tiezhu Yang Acked-by: Masami Hiramatsu --- tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc b/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc index 312d237..be754f5 100644 --- a/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc +++ b/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc @@ -25,6 +25,8 @@ if [ $L -ne 256 ]; then exit_fail fi +cat kprobe_events >> $testlog + echo 1 > events/kprobes/enable echo 0 > events/kprobes/enable echo > kprobe_events