From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753664AbcEXDCj (ORCPT ); Mon, 23 May 2016 23:02:39 -0400 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:40922 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751351AbcEXDCi (ORCPT ); Mon, 23 May 2016 23:02:38 -0400 X-Original-SENDERIP: 156.147.1.121 X-Original-MAILFROM: namhyung@kernel.org X-Original-SENDERIP: 165.244.98.204 X-Original-MAILFROM: namhyung@kernel.org X-Original-SENDERIP: 10.177.227.17 X-Original-MAILFROM: namhyung@kernel.org Date: Tue, 24 May 2016 12:02:35 +0900 From: Namhyung Kim To: Steven Rostedt CC: LKML , Masami Hiramatsu , Shuah Khan , Subject: Re: [RFC][PATCH] ftracetest: Fix hist unsupported result in hist selftests Message-ID: <20160524030235.GA5856@sejong> References: <20160523151538.4ea9ce0c@gandalf.local.home> <20160523235438.GA1636@sejong> <20160523215045.583d0fc1@gandalf.local.home> <20160524021630.GA5062@sejong> <20160523223243.1aaab4de@grimm.local.home> MIME-Version: 1.0 In-Reply-To: <20160523223243.1aaab4de@grimm.local.home> User-Agent: Mutt/1.6.1 (2016-04-27) X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB07/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2016/05/24 12:02:35, Serialize by Router on LGEKRMHUB07/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2016/05/24 12:02:35, Serialize complete at 2016/05/24 12:02:35 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 23, 2016 at 10:32:43PM -0400, Steven Rostedt wrote: > On Tue, 24 May 2016 11:16:31 +0900 > Namhyung Kim wrote: > > > > Why not checking "hist" file then? > > I guess that could be done too, but is there anything wrong with my > current solution? Or is it just too hacky? How would one check if > something exists in a file or not? Say, I want to detect if > preemptirqsoff tracer exists or not, and that only happens if I do a > grep of current_tracer (I have tests coming that will need to do that)? There's nothing wrong with your approach IMHO. But I think checking existence of a file is clearer and consistent to other tests. For the preemptirqsoff tracer case, it seems there's no other way to check it simply. It's not hacky to me grep-ing contents to check availability of some option. Thanks, Namhyung