Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2161216ybk; Mon, 11 May 2020 13:31:07 -0700 (PDT) X-Google-Smtp-Source: APiQypLlo5wWeYDkUTdygj0gVIIpjf9rJiETukHFMus4Mjutsm54vZ8Af7WS1qJOxB6gqi2cHwiy X-Received: by 2002:a17:906:951:: with SMTP id j17mr10505482ejd.352.1589229067342; Mon, 11 May 2020 13:31:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589229067; cv=none; d=google.com; s=arc-20160816; b=l8/XYcQ2xmIMW4PnvpeF1HRw+SmXk6n9iUboxwG6KK68BnFNMyNale+TWRMW8eCCMQ cJCIg96nv91yduhj+gxxEDYsZjFQxXEx0Wzm5v7waEssdFF3/aKExn5LIBYilS0AyIA2 oRHoXMQM/Aa/IpBcDj4pYtLMf7ICNrZUQYxMo2ygsgRqZs7QnFJ2tyrCkz8EfVFNGUw9 vKPrd+elddw80KUk+h8lNlrzZGcZx1fo1kW1EFbuAyTZFUI14FIOPpWGQJ8gGUkbzwif 6uN6av5I8MS9gKOnIpP8Gm9CurdK1jZL9WpGOVVKePF8fwuWqgE69nBWtzUjkFz2nR/c T85Q== 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=4Kl5W7eFKmk9rddRTyhP0ydAFoSMHmoinqbrdsSZwi8=; b=R8QXph2PuItUyBejNUjw+13/f9M+NsQFE5NId+wRXXaTksnHhpvqaiFYMblwgr4OX8 htsyTYNs4HWw9HI86om1ajOIfNdDlPUByV/TqZqUJDsEALUmFZuq8CI49wemVosiXm2A bkQXQE+SVPdd+XLifJrWOfX+u5uAT8XIZWU/ncUXk9qe0lO5Qo2HMf6ii5zadwMgR6gf ybypAQ5MgI3IdIjkvm6TZItgjngZq7f50D9VE6pY10WGv4a4y4P7xj3WTnF9QZgqzeS+ JhYDA1Xc77S1MgqFFEtTwmFQrMNYLDjzvkmn8b7aD+Ae6BsY3l0R+HfqhbyctUq1yQYp 82fQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cb14si6403615ejb.80.2020.05.11.13.30.43; Mon, 11 May 2020 13:31:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731701AbgEKU2p (ORCPT + 99 others); Mon, 11 May 2020 16:28:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:36584 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727873AbgEKU2p (ORCPT ); Mon, 11 May 2020 16:28:45 -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 CEFC220661; Mon, 11 May 2020 20:28:43 +0000 (UTC) Date: Mon, 11 May 2020 16:28:42 -0400 From: Steven Rostedt To: David Laight Cc: 'Masami Hiramatsu' , Shuah Khan , "linux-kselftest@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Tom Zanussi , Li Philip , Liu Yiding , Xiao Yang , Andreas Schwab Subject: Re: [PATCH v2] selftests/ftrace: Use printf for backslash included command Message-ID: <20200511162842.7c198741@gandalf.local.home> In-Reply-To: References: <87imh21x6f.fsf@igel.home> <158920418730.16156.8299185499520876735.stgit@devnote2> <20200511223804.9483cab03c9221818ff4fc5b@kernel.org> 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 Mon, 11 May 2020 14:59:20 +0000 David Laight wrote: > > > echo "Test command: $command" > > > echo > error_log > > > - (! echo "$command" >> "$3" ) 2> /dev/null > > > + (! printf "%s" "$command" >> "$3" ) 2> /dev/null > > WTF is the (! for ?? > The (...) is a subshell. > And ! inverts the exit status. > Neither is needed at all. This is done because the scripts are run with '-e' and will exit the script on any error. This particular test is examining errors in the error log. The command being written into $3 is going to fail, and return an exit code. The "(! ..)" is needed, otherwise that failure will exit out the script. -- Steve