Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp796190ybz; Fri, 1 May 2020 08:42:00 -0700 (PDT) X-Google-Smtp-Source: APiQypLLvWZZrZ99Ne5C7ta0nL+8idWMOkOnZcTKeOwoCowl3KMkkQdrS9hOUYYLqN91KLu58gzQ X-Received: by 2002:a50:ec0c:: with SMTP id g12mr4192077edr.140.1588347720700; Fri, 01 May 2020 08:42:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588347720; cv=none; d=google.com; s=arc-20160816; b=Z+THADvfYOVGbNfi0MaGHnxi4qq6womVRsqOZWS2WVQjoL4PyfiSLJOitPcuNJLOnY 4tK4K51+WkYif/UdBUfSerRBB2mgp73TWaZaB0NaG3P6MlpPkoYonxOG3p8D0ZdADO0H Mqp0fy/nK9ll/RQYurO1pH68+NUYNHHwh8y6xFBa8a45B4pQq0Uc40EGkM+L5CoD93Of QR6aY+wnl6tsJRilwQBilo8fmQhi2oce4s+EZ2ONsqLcYRL9W6b6SXKagieE2ur0Ze7v 7YZN65T6VDsEkq6h/jY0bVJKnxvuEJc6xrEhyeRD3PjuG5X6dqexKYU0AfeY0ZBHUHP1 tR7A== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=eJ7Kv21ubbRNQO9aWVgZfDdwX2Nrd7712fu5Npqv8UU=; b=smlgvnlwRwMSA/mpkJoYPRL/lMd7paDAtLUrFmJa0HtasjMHXrSH8fnnlnmkUwF7D7 +nzFMWYF9HA4F7XxKjdNRmWwtXqpnNbALHWh1avJzwnoHgVMfquB9f0YLWeeVqlGbe3o TX3EYOGX/SxzK1u9VBDJBrd8xnTHOUIFc3n7ET7k+RNXTqiisWeFlWQtBssmnX52gIIF wFAfBZd+d8COefxIbAA1KDb4EJICNZY15HTykLeIBDISIgDfBoEdRtoodvoTrVFnOFuE LhXOSB2QqMOGVlywwOEmSCnJhy6uk/wZV01f1ERqXBMbzoRPe27EXJiwujPYuJi1iMzN bWPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="wbdP/MH9"; 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 w8si1788370eju.477.2020.05.01.08.41.37; Fri, 01 May 2020 08:42:00 -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="wbdP/MH9"; 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 S1730134AbgEAPjE (ORCPT + 99 others); Fri, 1 May 2020 11:39:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:53754 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728893AbgEAPjD (ORCPT ); Fri, 1 May 2020 11:39:03 -0400 Received: from [192.168.1.112] (c-24-9-64-241.hsd1.co.comcast.net [24.9.64.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9FE0724958; Fri, 1 May 2020 15:39:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588347543; bh=XipnPd5rd2M5w8iTqFjOmWhstavs032S5pyhbIG9/UM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=wbdP/MH9AxBlALdz6uIDyNQCScm1mDXLUX94+vwX4Ws/3t29JSUBUesuuqO0E90Zq pZR+1LICO8k27qfVnpJu4OPDJKnzKEIdMiJHcE2dOB//YZs4NyiPKRmXKa5VWbeuB1 /AJyzP0YHu0kG/y6Qt++Ijb3Y1T/RVfs9NN3kfdw= Subject: Re: [PATCH 2/3] selftests/ftrace: Pick only the first kprobe event to test To: Steven Rostedt , Masami Hiramatsu Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Tom Zanussi , Li Philip , Liu Yiding , skhan@linuxfoundation.org, shuah References: <158834025077.28357.15141584656220094821.stgit@devnote2> <158834027133.28357.11196486193798517250.stgit@devnote2> <20200501101718.5a15e557@gandalf.local.home> From: shuah Message-ID: <7751734b-83f1-bf14-9d8e-9092b0b7be3e@kernel.org> Date: Fri, 1 May 2020 09:38:59 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200501101718.5a15e557@gandalf.local.home> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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" thanks, -- Shuah