From nobody Tue May 7 21:24:26 2024 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 3AED1C47088 for ; Fri, 2 Dec 2022 17:04:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234402AbiLBREl convert rfc822-to-8bit (ORCPT ); Fri, 2 Dec 2022 12:04:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234179AbiLBREP (ORCPT ); Fri, 2 Dec 2022 12:04:15 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4830CE802B; Fri, 2 Dec 2022 09:03:37 -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 ams.source.kernel.org (Postfix) with ESMTPS id DDB57B821F7; Fri, 2 Dec 2022 17:03:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 98815C433C1; Fri, 2 Dec 2022 17:03:33 +0000 (UTC) Date: Fri, 2 Dec 2022 12:03:31 -0500 From: Steven Rostedt To: LKML , linux-kselftest@vger.kernel.org Cc: Shuah Khan , Shuah Khan , Masami Hiramatsu , Tom Zanussi Subject: [PATCH] selftests/ftrace: Use long for synthetic event probe test Message-ID: <20221202120331.343a821d@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From 8bb1734388b89bdb2ac176882786dc02b7df92c2 Mon Sep 17 00:00:00 2001 From: "Steven Rostedt (Google)" Date: Wed, 30 Nov 2022 17:31:34 -0500 Subject: [PATCH] selftests/ftrace: Use long for synthetic event probe test On 32bit the trigger-synthetic-eprobe.tc selftest fails with the error: hist:syscalls:sys_exit_openat: error: Param type doesn't match synthetic ev= ent field type Command: hist:keys=3Dcommon_pid:filename=3D$__arg__1,ret=3Dret:onmatch(sy= scalls.sys_enter_openat).trace(synth_open,$filename,$ret) = ^ This is because the synth_open synthetic event is created with: echo "$SYNTH u64 filename; s64 ret;" > synthetic_events Which works fine on 64 bit, as filename is a pointer and the return is also a long. But for 32 bit architectures, it doesn't work. Use "unsigned long" and "long" instead so that it works for both 64 bit and 32 bit architectures. Signed-off-by: Steven Rostedt (Google) --- .../test.d/trigger/inter-event/trigger-synthetic-eprobe.tc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trig= ger-synthetic-eprobe.tc b/tools/testing/selftests/ftrace/test.d/trigger/int= er-event/trigger-synthetic-eprobe.tc index 6461c375694f..c2a8ab01e13b 100644 --- a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-syn= thetic-eprobe.tc +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-syn= thetic-eprobe.tc @@ -14,7 +14,7 @@ FIELD=3D"filename" SYNTH=3D"synth_open" EPROBE=3D"eprobe_open" =20 -echo "$SYNTH u64 filename; s64 ret;" > synthetic_events +echo "$SYNTH unsigned long filename; long ret;" > synthetic_events echo "hist:keys=3Dcommon_pid:__arg__1=3D$FIELD" > events/$SYSTEM/$START/tr= igger echo "hist:keys=3Dcommon_pid:filename=3D\$__arg__1,ret=3Dret:onmatch($SYST= EM.$START).trace($SYNTH,\$filename,\$ret)" > events/$SYSTEM/$END/trigger =20 --=20 2.35.1