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=-8.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 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 72022C433DB for ; Wed, 10 Feb 2021 01:25:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 24B9E64E54 for ; Wed, 10 Feb 2021 01:25:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234556AbhBJBY5 (ORCPT ); Tue, 9 Feb 2021 20:24:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:37338 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234657AbhBIW64 (ORCPT ); Tue, 9 Feb 2021 17:58:56 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id DCF9B64E3E; Tue, 9 Feb 2021 22:58:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612911494; bh=uqy909NFHjuNyS/LN4Ctg42SorG3pgKl7CZF8ihTw4U=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=n7nKtjoTtgIvFtu4vaYvYlTku43Osb+tTl9RONiKCCW6msvr95LLx9ONawLikMyAC CbQ27LCqqsfN/rfY9z6XZLOBArzIGhseW9lB4xRw83ZDlOlZZR2bPr8lNh18l8u3pP DmQz+xBgoSAFNoGVqiOrNj0VqqrR4rEhIGrBI5+8jQCtnVETMyP+txXCsggF4bKNZI 8c8GJWZ3RbYjTh5ZDCvrC4eD9DFs8nRa3MsROqWAZjAGi1UWgML2mSPDthKCbgH2Yy muytiy9tFUD+2Hidq0B/Wq3WFxN1Vni17EWv97Josu7+nk01vqqcmbS67bVShMC1AA Sst9fK494Ku/g== Message-ID: Subject: Re: [PATCH v7 0/6] tracing: More synthetic event error fixes From: Tom Zanussi To: Steven Rostedt Cc: axelrasmussen@google.com, mhiramat@kernel.org, dan.carpenter@oracle.com, linux-kernel@vger.kernel.org Date: Tue, 09 Feb 2021 16:58:12 -0600 In-Reply-To: <20210209160909.28cc8d3b@gandalf.local.home> References: <20210209160909.28cc8d3b@gandalf.local.home> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Steve, On Tue, 2021-02-09 at 16:09 -0500, Steven Rostedt wrote: > On Mon, 1 Feb 2021 13:48:10 -0600 > Tom Zanussi wrote: > > > Hi, > > > > This is v7 of the synthetic event error fix patchset. This version > > addresses the comments from v6: > > > > - moved check_command() from '[PATCH v6 3/6] tracing: Update > > synth > > command errors' to '[PATCH v6 2/6] tracing: Rework synthetic > > event > > command parsing'. > > > > - in __create_synth_event(), moved mutex_lock(&event_mutex) after > > is_good_name() check and changed related error handling. > > > > - simplified check_command() a bit by calling argv_free() sooner > > as > > suggested by Steve. > > > > - added Steve's comment about check_field_version() into that > > function and added additional comments to the caller. > > > > After applying these, the following test fails: > > test.d/trigger/inter-event/trigger-synthetic_event_syntax_errors.tc > Did you apply '[PATCH v7 5/6] selftests/ftrace: Update synthetic event syntax errors' before you ran the test? It actually removes the test that failed. Here's what I get with all patches applied: # ./ftracetest test.d/trigger/inter-event/ === Ftrace unit tests === [1] event trigger - test inter-event histogram trigger expected fail actions [XFAIL] [2] event trigger - test field variable support [PASS] [3] event trigger - test inter-event combined histogram trigger [PASS] [4] event trigger - test multiple actions on hist trigger [PASS] [5] event trigger - test inter-event histogram trigger onchange action [PASS] [6] event trigger - test inter-event histogram trigger onmatch action [PASS] [7] event trigger - test inter-event histogram trigger onmatch-onmax action [PASS] [8] event trigger - test inter-event histogram trigger onmax action [PASS] [9] event trigger - test inter-event histogram trigger snapshot action [PASS] [10] event trigger - test synthetic event create remove [PASS] [11] event trigger - test inter-event histogram trigger trace action with dynamic string param [PASS] [12] event trigger - test synthetic_events syntax parser errors [PASS] [13] event trigger - test synthetic_events syntax parser [PASS] [14] event trigger - test inter-event histogram trigger trace action [PASS] # of passed: 13 # of failed: 0 # of unresolved: 0 # of untested: 0 # of unsupported: 0 # of xfailed: 1 # of undefined(test bug): 0 > It appears that: > > echo 'myevent char str[];; int v' > synthetic_events > > doesn't error after these changes. > Right, it shouldn't fail any more - that was one of the reasons for reworking the parser, so things like that wouldn't fail. My assumption, and the reason for adding '[PATCH v7 4/6] tracing: Add a backward-compatibility check for synthetic event creation', was that we didn't want previously-working things to suddenly start failing after the rework, but not that things that used to fail would continue to backwards-compatibly fail. Tom > -- Steve