Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1320007ybz; Fri, 1 May 2020 20:07:37 -0700 (PDT) X-Google-Smtp-Source: APiQypIRnXOpXk9zcbhUu7NJND16G+UUddt1eoPoqc8+ARGGa5Cok/VeT46LVRM851KdD0J6x2WC X-Received: by 2002:aa7:dd84:: with SMTP id g4mr6222012edv.273.1588388856817; Fri, 01 May 2020 20:07:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588388856; cv=none; d=google.com; s=arc-20160816; b=Rgt+vhY4np2b29C17YOVv3GCCkg3xeTVlLy7FdD/Vp/j2HuBMBAdtimoBmqmgPqTbS 9uCZ67eQeD3DDbS9Bkn9Zln+ZZB0tmmaYdU+zTtZlhZ5Nn1IL7q4xiKH0F6Z6s4yT/IO NdJPDfsVg0kpyczfO+il1SBhZjxYnV0UDXIXV+7xrGvEagXywWbQY/CgA+M76c5ZN0kg eo+QwzThpXCpD5KQGax3TkiQb4TpF0pjoPd+1SZDCJvGRvC+xKxqUxE6ksuhxjrH5F1g O3Oar6U5MsyclWVrs8MXDOjCSx4Uin/Uut6p8zrj28Zfb53GJ8tBw7Z2p+OI7xbA8CHi guzw== 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 :dkim-signature; bh=I5ZP9PBmCiKtLs2c7wdPip3jEN9/uFdPtTBP5B0Sys4=; b=bCi4JRDyGbspI8QHSO5WXkDr8iLslDlmpNLdPf0MoUGx+p6WsH6e5+ddUyusTbWbFi 2/VXk7LeSo7nuuULppv7UYyzt7iPyrCcCc+vYx3apjmZdzitdDCwx2fm/BUzdxxLCJjh L/pRR6KGXy9TTC7m4aqAMNzPVXXf3zxgRYBk7y5KwEkC71Oms/Y9ke0XVZ6vGPyhMate nQq1BEF4mcsdq2sOAG/PF9CQCW/O4jWJMumT6POzYncyhWsJbqjxZFd9GaktldtxBi2/ PucGDOCo7EQAhXH4GDcDMjHoiCTW8bbMhHPS2/4jQpqxgR4G0EEqawY5GaqBTb8Inbmg YrZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tu+idBLf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h27si2849450eja.40.2020.05.01.20.07.10; Fri, 01 May 2020 20:07:36 -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; dkim=pass header.i=@kernel.org header.s=default header.b=tu+idBLf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726752AbgEBDFn (ORCPT + 99 others); Fri, 1 May 2020 23:05:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:60560 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726463AbgEBDFn (ORCPT ); Fri, 1 May 2020 23:05:43 -0400 Received: from devnote2 (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (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 A7A8720857; Sat, 2 May 2020 03:05:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588388742; bh=whnRbEL8VMPFploT9OMFbLOr5/cBg0hfDQ+sF+5UN/k=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=tu+idBLfSXLHIdDePFtX9lmD55VCxnpVkMnzmWd5K5D+NHWFseCDotsWOyw+ieSOI sa9Yu3ipnEbPQgyA4qsUMXNa1M7v0v7Ft+xx7Wcuk8nG1A4ndb8MA+2n8o1ziElyMH IreWuCtd6Q76feVs/WmHHIn/jKYD6cGBPUZU5sFc= Date: Sat, 2 May 2020 12:05:37 +0900 From: Masami Hiramatsu To: shuah Cc: Steven Rostedt , 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: <20200502120537.cfa3cdc1d898a12dc0c15471@kernel.org> 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: Sylpheed 3.5.1 (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. > > 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" Oops, yes, please drop this patch. Thank you, > > thanks, > -- Shuah -- Masami Hiramatsu