From patchwork Sat May 4 00:33:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Masami Hiramatsu (Google)" X-Patchwork-Id: 13653697 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73ECC6AB9; Sat, 4 May 2024 00:33:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714782794; cv=none; b=DAcFbFgrqaFk6SkumRUFBs9nStnFUv1aPutmj0ON9AIXc6LU88QWxwG+f/gk3LR4pzABk9zK21l7rhUBtYuaRkmJ2cHVCvEc8sm39gJvjSIoXxPLfsSjSlRecoro7LM6DjTwZyynIYnfgWf7ygCE5GQ/4Bd+ocJaDZV/bePfiaE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714782794; c=relaxed/simple; bh=l/mKd3Tz3NUZlmQupCqAk03v+/7KAwnTs3xvrc0YAWM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=aNsTLYoudi6juuSpPmdToJWwIb5FWUBrd/8aAJ4c2S0B4zCbvJLWR9vOzcYM7Ws9g0Fip/Y4sR5F42I1aMaDhoRQZdTXrBrYM/RkYvivCI/uXgyArKt8ypEhI7/1LwlzqNGRb1RVDhXpGdyIi57EuRvy2gochREozysqys7iLL8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gr8bi6Mh; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gr8bi6Mh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81B2AC116B1; Sat, 4 May 2024 00:33:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714782794; bh=l/mKd3Tz3NUZlmQupCqAk03v+/7KAwnTs3xvrc0YAWM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gr8bi6Mhcg9xLL6FPZaVqvxubWa+K1C9apfuLoNG8/iwGhsG+JFlfqgh8HegQSfW7 5+HL45bC7+Z+q4YEo/iJI4gSDJ1e/OYIkxKhqXit5ssNs2EGPT+M9TwYzvw92cMtG0 7Nux+SUxp1e+a86K+93USw9HZh6Y5+y/jTD2qIn+EzuRGNLmRGd5YvWYf5qZ7Bl+OZ IQgtHDc6ShvbrA/cLcJmDDkYXHjzXkQpn/yNHSkNmblWwPpIxZAjYAfKnQgGGW9B4Y jKgWL6pSiPgkDojbo12y5AlvFPewKkXCGv/UsVN1UxRtzg15UKu9x+WaxyLfznvMFQ 8/BwjT/FIAtFQ== From: "Masami Hiramatsu (Google)" To: Steven Rostedt , Shuah Khan Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, mhiramat@kernel.org, Jiri Olsa , linux-kselftest@vger.kernel.org Subject: [PATCH 1/2] selftests/ftrace: Fix BTFARG testcase to check fprobe is enabled correctly Date: Sat, 4 May 2024 09:33:10 +0900 Message-Id: <171478279040.109670.8403406322028922001.stgit@devnote2> X-Mailer: git-send-email 2.34.1 In-Reply-To: <171478277880.109670.10932081511777701353.stgit@devnote2> References: <171478277880.109670.10932081511777701353.stgit@devnote2> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Masami Hiramatsu (Google) Since the dynevent/add_remove_btfarg.tc test case forgets to ensure that fprobe is enabled for some structure field access tests which uses the fprobe, it fails if CONFIG_FPROBE=n or CONFIG_FPROBE_EVENTS=n. Fixes it to ensure the fprobe events are supported. Fixes: d892d3d3d885 ("selftests/ftrace: Add BTF fields access testcases") Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu (Google) --- .../ftrace/test.d/dynevent/add_remove_btfarg.tc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_btfarg.tc b/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_btfarg.tc index b9c21a81d248..c0cdad4c400e 100644 --- a/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_btfarg.tc +++ b/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_btfarg.tc @@ -53,7 +53,7 @@ fi echo > dynamic_events -if [ "$FIELDS" ] ; then +if [ "$FIELDS" -a "$FPROBES" ] ; then echo "t:tpevent ${TP2} obj_size=s->object_size" >> dynamic_events echo "f:fpevent ${TP3}%return path=\$retval->name:string" >> dynamic_events echo "t:tpevent2 ${TP4} p->se.group_node.next->prev" >> dynamic_events From patchwork Sat May 4 00:33:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Masami Hiramatsu (Google)" X-Patchwork-Id: 13653698 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 93D161859; Sat, 4 May 2024 00:33:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714782805; cv=none; b=qLMuXxYnyDvgabgcwtVPTC9xq9KE/CQap5N6PurqLoLEtHbyyBE+bR01jaP2FZHwmqK+ENsikJyc0DptKyureLz2fWxH3Gusfwvjg6gZC2zKr1V4eZ2AkAnr/VUCNVsM7V6WWdRpa4k8LO6k0kEpiDxDgwPmWvnvOR88LaCTT9s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714782805; c=relaxed/simple; bh=F04mcxzFyrySYotptkIyuShPMhd/MamWCEQNHFiPe4s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=lZDnxvDG1gl4zISDXO9B/wdAsl5VvnJZToENl4b4XV4MjnRoTW+3alkgSmoNJAeJHrY/S3SYLWez6JwPMqwIQ/p8dHR3GqoYxeyBWuM6x1TKkLWR6cuAyzJFiz18g+b6qCEGjaOZ9Wsuxb2jeuwDMiDeG9K6ta6aMEOESIZ71DQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LdZTNfMA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LdZTNfMA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 400AFC116B1; Sat, 4 May 2024 00:33:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714782804; bh=F04mcxzFyrySYotptkIyuShPMhd/MamWCEQNHFiPe4s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LdZTNfMAnWtkW8i+qkLuHhCdIv72R8o30pNTV4GqcxiVz6YhcXVndn6vnmMxqcWPe IGlpWbljcV/Dtcc0Q6b8QP7Dt5xNf2l9hwokXUglRP6KxfOcblnnoJ9XR2/bYbbz8d 660I6rRyEPtmfDJjo/isq80TtCk6dR3CXdswbDpDhnWfjsKk+SqbADRhp4t59upwqu RNNU5eFo7S1EphMZxAr62nyn6NTy9cyjf8ZgGwNfwDYfXEI+Gl0if3iv7mlMxwzW2J WQEGpzrWsqs4Qq83Bej7iH4vhMyhmbAu+zgfAVdbVsA4mnmsL+xgzxnfkl45ewR/Wl iYl98KyUqIn6Q== From: "Masami Hiramatsu (Google)" To: Steven Rostedt , Shuah Khan Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, mhiramat@kernel.org, Jiri Olsa , linux-kselftest@vger.kernel.org Subject: [PATCH 2/2] selftests/ftrace: Fix checkbashisms errors Date: Sat, 4 May 2024 09:33:19 +0900 Message-Id: <171478279972.109670.4978406413990459886.stgit@devnote2> X-Mailer: git-send-email 2.34.1 In-Reply-To: <171478277880.109670.10932081511777701353.stgit@devnote2> References: <171478277880.109670.10932081511777701353.stgit@devnote2> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Masami Hiramatsu (Google) Fix the below checkbashisms errors. Because of these errors, these tests will fail on dash shell. possible bashism in test.d/kprobe/kretprobe_entry_arg.tc line 14 ('function' is useless): function streq() { possible bashism in test.d/dynevent/fprobe_entry_arg.tc line 14 ('function' is useless): function streq() { Fixes: f6e2253a617c ("selftests/ftrace: Add test cases for entry args at function exit") Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu (Google) --- .../ftrace/test.d/dynevent/fprobe_entry_arg.tc | 2 +- .../ftrace/test.d/kprobe/kretprobe_entry_arg.tc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/ftrace/test.d/dynevent/fprobe_entry_arg.tc b/tools/testing/selftests/ftrace/test.d/dynevent/fprobe_entry_arg.tc index d183b8a8ecf8..1e251ce2998e 100644 --- a/tools/testing/selftests/ftrace/test.d/dynevent/fprobe_entry_arg.tc +++ b/tools/testing/selftests/ftrace/test.d/dynevent/fprobe_entry_arg.tc @@ -11,7 +11,7 @@ echo 1 > events/tests/enable echo > trace cat trace > /dev/null -function streq() { +streq() { test $1 = $2 } diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_entry_arg.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_entry_arg.tc index 53b82f36a1d0..e50470b53164 100644 --- a/tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_entry_arg.tc +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_entry_arg.tc @@ -11,7 +11,7 @@ echo 1 > events/kprobes/enable echo > trace cat trace > /dev/null -function streq() { +streq() { test $1 = $2 }