Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752941AbdGFGBA (ORCPT ); Thu, 6 Jul 2017 02:01:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:38082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751070AbdGFGA7 (ORCPT ); Thu, 6 Jul 2017 02:00:59 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9217920C51 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=mhiramat@kernel.org Date: Thu, 6 Jul 2017 15:00:54 +0900 From: Masami Hiramatsu To: Steven Rostedt Cc: linux-kselftest@vger.kernel.org, shuah@kernel.org, Ingo Molnar , linux-kernel@vger.kernel.org, naresh.kamboju@linaro.org Subject: Re: [PATCH 4/4] selftests: ftrace: Output only to console with "--logdir -" Message-Id: <20170706150054.5706d4f2df3763dbb1d65320@kernel.org> In-Reply-To: <20170705122917.03346f2d@gandalf.local.home> References: <149915006959.18583.13997841764160473197.stgit@devbox> <149915032497.18583.11626955093827357641.stgit@devbox> <20170705122506.6235765e@gandalf.local.home> <20170705122917.03346f2d@gandalf.local.home> X-Mailer: Sylpheed 3.5.0 (GTK+ 2.24.30; 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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 812 Lines: 37 On Wed, 5 Jul 2017 12:29:17 -0400 Steven Rostedt wrote: > On Wed, 5 Jul 2017 12:25:06 -0400 > Steven Rostedt wrote: > > > > > @@ -255,12 +262,18 @@ __run_test() { # testfile > > > # Run one test case > > > run_test() { # testfile > > > local testname=`basename $1` > > > - local testlog=`mktemp $LOG_DIR/${testname}-log.XXXXXX` > > > + if [ "$LOG_FILE" ] ; then > > > > Shouldn't this be > > > > if [ ! -z "$LOG_FILE" ]; then > > > > ? > > > > OK, I just checked it out. I guess "" is considered zero and > "" is considered 1. > > Hmm, do we do this in other places too. Just makes me unconfortable. OK, in that case, I can cleanup the code with [ ! -z "$VAR" ] Thank you, > > -- Steve > -- Masami Hiramatsu