Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4617202img; Tue, 26 Mar 2019 13:03:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqyryhwC0FhQ78Q1F7WVtv5ue5oIGonU6iSgXQLKVwGDxmcp8gnmcl8CE9UI9J5XMwRXE73e X-Received: by 2002:a62:1187:: with SMTP id 7mr31291195pfr.119.1553630626251; Tue, 26 Mar 2019 13:03:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553630626; cv=none; d=google.com; s=arc-20160816; b=d8khQEjRdJEZYl/4KTHd1GIPdWBn26YqqaQhoEuFDt7Oh1rJhhsjM62mKo16aWYGih 7B37xHTwRR2oJBjAhl95quHE+Hkns4OLmuDR07mYmSLfB1JF7MUoZgpnXP8VYdarcAUz q7j6AGkyPPBT7RrKvCzaxNWtrGBLhBFJ3b629aAYjHoE5JVTKuHbN2k69wzK4IXGX8Nn cCGNk85RdLQjhg+jHGKaoairpVQh6D1ilAwCYEA021F0x36LIH5ymZLYdM6GFnNGPgXG YQvedF/HjDvPmcGQo3vFVSQlLNBsxchxcikfLP4p8T75yUbR1EMMuFuFfQpT0K/7UPLL wicw== 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=SD+W5aK7nnazV2mQ2Ey17ArA/utUcIxtAbubUlQkOug=; b=tw1P0hvdPXXTUxKcMw9ONT1+5dVMyAGuOKc23TgOyO6bpZ5bA5zxUx8huMTYJy6c+M 1hdB0FQKvC2BJctY0ukxFPjoc2lfU3iZuzYC+F9jtZXMGv9iiY+AWsypTJkK+NEM2JhT SJvUK+Oh8T9QHWklwSOETEu2c4B5Up1Y9B5ym3g+VnZSxB7SGap1cWblDYI2/0TyXsbz UwGZ+ecphwhvc5IBkbJ0fLdWa15voqMKaT/RlWlJuxg3qV+0DGkFkTV6EeKHxchjVeYD SWtpoQWN1T28CYxMYTrBIUhIC9TIQke22AMlGbgOLe5PfOfTyv6Kyts5Ln+dEQLL9ked lSqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k3si16965008pfb.100.2019.03.26.13.03.21; Tue, 26 Mar 2019 13:03:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732232AbfCZUCq (ORCPT + 99 others); Tue, 26 Mar 2019 16:02:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:57676 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732032AbfCZUCq (ORCPT ); Tue, 26 Mar 2019 16:02:46 -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 894FD2075C; Tue, 26 Mar 2019 20:02:45 +0000 (UTC) Date: Tue, 26 Mar 2019 16:02:43 -0400 From: Steven Rostedt To: Tzvetomir Stoyanov Cc: linux-trace-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 8/8] tools/lib/traceevent: remove call to exit() from tep_filter_add_filter_str() Message-ID: <20190326160243.1d8da575@gandalf.local.home> In-Reply-To: <20190326154328.28718-9-tstoyanov@vmware.com> References: <20190326154328.28718-1-tstoyanov@vmware.com> <20190326154328.28718-9-tstoyanov@vmware.com> 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 Tue, 26 Mar 2019 17:43:28 +0200 Tzvetomir Stoyanov wrote: > This patch removes call to exit() from tep_filter_add_filter_str(). A library > function should not force the application to exit. In the current implementation > tep_filter_add_filter_str() calls exit() when a special "test_filters" mode is > set, used only for debugging purposes. When this mode is set and a filter is > added - its string is printed to the console and exit() is called. This patch > changes the logic - when in "test_filters" mode, the filter string is still > printed, but the exit() is not called. It is up to the application to track when > "test_filters" mode is set and to call exit, if needed. I applied this one too (after changing tep back to pevent so that it will apply without the other patches). I'll start testing these and then send them to Arnaldo when complete. Thanks! -- Steve > > Signed-off-by: Tzvetomir Stoyanov > --- > tools/lib/traceevent/parse-filter.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/tools/lib/traceevent/parse-filter.c b/tools/lib/traceevent/parse-filter.c > index 298694356277..552592d153fb 100644 > --- a/tools/lib/traceevent/parse-filter.c > +++ b/tools/lib/traceevent/parse-filter.c > @@ -1346,9 +1346,6 @@ enum tep_errno tep_filter_add_filter_str(struct tep_event_filter *filter, > > free_events(events); > > - if (rtn >= 0 && tep->test_filters) > - exit(0); > - > return rtn; > } >