From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 294CEC433DF for ; Thu, 15 Oct 2020 00:16:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D5B3C2223F for ; Thu, 15 Oct 2020 00:16:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602720994; bh=HGiBqzUWkqntE8fU1EZdxLl6YCsWiuRv5UJhNz7ST3o=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=Ncd7XjtQoshT+gEpGrb4JrklU8mYSRDMXoq/w3N+5P01Pl7r+3oZgndvu8N+bjKju fHNy4U7xYSCxijRy9DPNSHV9Y0FTHqD/Bp7Yfcyva4Q6Pv8YlZ744XjrpC6qmtQlsL IbO3UhAmG3jv+L3teOEyXb3v1LytkChk+26qbCC8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732068AbgJOAQd (ORCPT ); Wed, 14 Oct 2020 20:16:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:55632 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730634AbgJOAQd (ORCPT ); Wed, 14 Oct 2020 20:16:33 -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 66C29221FF; Thu, 15 Oct 2020 00:16:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602720992; bh=HGiBqzUWkqntE8fU1EZdxLl6YCsWiuRv5UJhNz7ST3o=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BYrdwsZ7Xn/Zjavtp7qY8rDaXCu0OdTR5JxgivkC46n51JWXwgCAWDGyKJa422rQ2 IYXhK0a8aitH+YzRPprcFKtG4a0VLCDG0NxV683KBPxa6bpMR6FuBBr+R+StKXo25m LARg18c0ZK1KNqTbaWZ8pn0FispCDUgVFhr6EEQU= Date: Thu, 15 Oct 2020 09:16:29 +0900 From: Masami Hiramatsu To: Steven Rostedt Cc: Tom Zanussi , axelrasmussen@google.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 7/7] selftests/ftrace: Add test case for synthetic event syntax errors Message-Id: <20201015091629.924b20723493d072ce14505c@kernel.org> In-Reply-To: <20201014133215.21d066e4@gandalf.local.home> References: <20201014110636.139df7be275d40a23b523b84@kernel.org> <20201014133215.21d066e4@gandalf.local.home> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Steve, On Wed, 14 Oct 2020 13:32:15 -0400 Steven Rostedt wrote: > On Wed, 14 Oct 2020 11:06:36 +0900 > Masami Hiramatsu wrote: > > > Hi Tom, > > > > On Tue, 13 Oct 2020 09:17:58 -0500 > > Tom Zanussi wrote: > > > > > Add a selftest that verifies that the syntax error messages and caret > > > positions are correct for most of the possible synthetic event syntax > > > error cases. > > > > > > Signed-off-by: Tom Zanussi > > > --- > > > .../trigger-synthetic_event_syntax_errors.tc | 19 +++++++++++++++++++ > > > 1 file changed, 19 insertions(+) > > > create mode 100644 tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic_event_syntax_errors.tc > > > > > > diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic_event_syntax_errors.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic_event_syntax_errors.tc > > > new file mode 100644 > > > index 000000000000..ada594fe16cb > > > --- /dev/null > > > +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic_event_syntax_errors.tc > > > @@ -0,0 +1,19 @@ > > > +#!/bin/sh > > > +# SPDX-License-Identifier: GPL-2.0 > > > +# description: event trigger - test synthetic_events syntax parser errors > > > +# requires: synthetic_events error_log > > > > This also requires dynamic strings support. So, its "requires" line should be > > > > # requires: synthetic_events error_log "char name[]' >> synthetic_events":README > > > > > + > > > +check_error() { # command-with-error-pos-by-^ > > > + ftrace_errlog_check 'synthetic_events' "$1" 'synthetic_events' > > > +} > > > + > > > > BTW, some errors looks a bit odd. > > > > > +check_error 'myevent ^chr arg' # INVALID_TYPE > > > +check_error 'myevent ^char str[];; int v' # INVALID_TYPE > > > > I think there is a wrong "void" argument between ";", instead of invalid type. > > > > > +check_error 'myevent char ^str]; int v' # INVALID_NAME > > > +check_error 'myevent char ^str;[]' # INVALID_NAME > > > > This is also not an invalid name but '[]' is an invalid type. > > > > > +check_error 'myevent ^char str[; int v' # INVALID_TYPE > > > +check_error '^mye;vent char str[]' # BAD_NAME > > > +check_error 'myevent char str[]; ^int' # INVALID_FIELD > > > > Isn't it an incomplete command? > > > > > +check_error '^myevent' # INCOMPLETE_CMD > > > + > > > +exit 0 > > > > Hi Masami, > > I finished testing this series along with other patches (some from you), > and I'm ready to push this to next, and hopefully soon to Linus. You have a > "tested-by" for the entire series. Are you OK with this patch too? Can we > push this forward and fix up any issues you have later? I think this is OK to push at least for the upstream kernel (unless backporting). The above issues can be fixed in another series :) Thank you, -- Masami Hiramatsu