Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp838173ybz; Fri, 1 May 2020 09:25:28 -0700 (PDT) X-Google-Smtp-Source: APiQypLgDINQWvHpr7zGlMLOGyNdkBGprXfVEYoxEtWVRi8CmjLHziVZ20gySyXWwxu5U2KhdqI4 X-Received: by 2002:a50:abe2:: with SMTP id u89mr4397440edc.259.1588350328663; Fri, 01 May 2020 09:25:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588350328; cv=none; d=google.com; s=arc-20160816; b=M5ZUX5R22P05bRwOJtT8kngB2yUOYazP4r4dLfrTH9Q7sr5EmZtsg2pr+tnmRjUWL9 1935gyVdGJRQu1SHQGaeYbmH9jxvke22TYcca29ORrwVzXgMKHQEtlJ3b4MEsaDYtaBS HzlL77aGCJ69ry8+6hglPlgoGyw2OJN9zP0YZLMkmpBVxND14duH8GeTDVEkvJsGzLzi QkT9TuS5w5Z7na4AHuQZjXYFhJyJXo3G1P0sZcAP0NA6gQK4SF/qSq57PxZ3bqCtI9DK 5j/K44lkv/QlzesU0KFvU2K6Olq4N84dFRGscxxC9nZqXXdZZm0OXO8LrMG+MMlU4AdV X5yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=/BtLQMi07fZ4RhJTgH3uFl5KEPC2YsD9qx3Oco0rpx8=; b=LBlaOxdGztZXMxPQPuwTnKzR4P5tSnoC3gQC4gMz+GTJSNar3I9avJnw6Vqe8MERZ4 4lW1bc+CczBd6IUcSuxZMyAeOwsrrj9TdcCRsbk1Nv/v5vGjGQsuRcPJrimBZavZQfGS CbgEbAg7OnBc10lBPTPzxckiYwouU1CieE+3SxDw+nmtlW1LzNKhh+d55PDnl5/OA5Bk pued+XDKr8a6WVVwz9FmX7VARA9R6Rb3rOXJqiA4goDSePIVyiDoI2z/+t2y6PDMQDQ7 DvnDTbVb8Zhi+TwbmvUXGxzkBETy1eLDDxez/yPQSWQ3fwTyT6z06Ud5LNLZHomixYTq I/mg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q6si1777768edb.559.2020.05.01.09.25.04; Fri, 01 May 2020 09:25:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730193AbgEAQUw (ORCPT + 99 others); Fri, 1 May 2020 12:20:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:37398 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729581AbgEAQUw (ORCPT ); Fri, 1 May 2020 12:20:52 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (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 3C6222166E; Fri, 1 May 2020 16:20:51 +0000 (UTC) Date: Fri, 1 May 2020 12:20:49 -0400 From: Steven Rostedt To: shuah Cc: Masami Hiramatsu , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Tom Zanussi , Li Philip , Liu Yiding , skhan@linuxfoundation.org Subject: Re: [PATCH 2/3] selftests/ftrace: Pick only the first kprobe event to test Message-ID: <20200501122049.46a93bb5@gandalf.local.home> In-Reply-To: <7751734b-83f1-bf14-9d8e-9092b0b7be3e@kernel.org> References: <158834025077.28357.15141584656220094821.stgit@devnote2> <158834027133.28357.11196486193798517250.stgit@devnote2> <20200501101718.5a15e557@gandalf.local.home> <7751734b-83f1-bf14-9d8e-9092b0b7be3e@kernel.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 1 May 2020 09:38:59 -0600 shuah wrote: > On 5/1/20 8:17 AM, Steven Rostedt wrote: > > On Fri, 1 May 2020 22:37:51 +0900 > > Masami Hiramatsu wrote: > > > >> Since the kprobe/kprobe_args_type.tc reads out all event logs > >> from the trace buffer, the test can fail if there is another > >> fork event happens. > >> Use head command to pick only the first kprobe event from > >> the trace buffer to test the argument types. > >> > >> Signed-off-by: Masami Hiramatsu > >> --- > >> .../ftrace/test.d/kprobe/kprobe_args_type.tc | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_type.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_type.tc > >> index 1bcb67dcae26..81490ecaaa92 100644 > >> --- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_type.tc > >> +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_type.tc > >> @@ -38,7 +38,7 @@ for width in 64 32 16 8; do > >> echo 0 > events/kprobes/testprobe/enable > >> > >> : "Confirm the arguments is recorded in given types correctly" > >> - ARGS=`grep "testprobe" trace | sed -e 's/.* arg1=\(.*\) arg2=\(.*\) arg3=\(.*\) arg4=\(.*\)/\1 \2 \3 \4/'` > >> + ARGS=`grep "testprobe" trace | head -n 1 | sed -e 's/.* arg1=\(.*\) arg2=\(.*\) arg3=\(.*\) arg4=\(.*\)/\1 \2 \3 \4/'` > >> check_types $ARGS $width > >> > >> : "Clear event for next loop" > > > > I think I've manually added this exact change to my tests to keep it from > > failing. > > > > Reviewed-by: Steven Rostedt (VMware) > > > > Does this conflict with: > > Author: Xiao Yang > Date: Tue Apr 7 14:34:19 2020 +0800 > > selftests/ftrace: Check the first record for kprobe_args_type.tc > > https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?h=next&id=f0c0d0cf590f71b2213b29a7ded2cde3d0a1a0ba > > I went into mainline yesterday in my rc4 pull request. > > Exact change it appears. Ah, then I guess we don't need this patch ;-) -- Steve > > diff --git > a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_type.tc > b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_type.tc > index 1bcb67dcae26..81490ecaaa92 100644 > --- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_type.tc > +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_type.tc > @@ -38,7 +38,7 @@ for width in 64 32 16 8; do > echo 0 > events/kprobes/testprobe/enable > > : "Confirm the arguments is recorded in given types correctly" > - ARGS=`grep "testprobe" trace | sed -e 's/.* arg1=\(.*\) arg2=\(.*\) > arg3=\(.*\) arg4=\(.*\)/\1 \2 \3 \4/'` > + ARGS=`grep "testprobe" trace | head -n 1 | sed -e 's/.* arg1=\(.*\) > arg2=\(.*\) arg3=\(.*\) arg4=\(.*\)/\1 \2 \3 \4/'` > check_types $ARGS $width > > : "Clear event for next loop" > > thanks, > -- Shuah