Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5510848imm; Tue, 16 Oct 2018 11:20:55 -0700 (PDT) X-Google-Smtp-Source: ACcGV634UrQViAd+7kF5sbjn+b4d7eZPYo1k3qdPlqJVokTDka6A/wE2jflVXvWkAtLCaPYEsoYH X-Received: by 2002:a65:41c6:: with SMTP id b6-v6mr21598420pgq.421.1539714055120; Tue, 16 Oct 2018 11:20:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539714055; cv=none; d=google.com; s=arc-20160816; b=tMXqya0+kRlSUQzF9yRzHcY41BrPmP3DBUEDYHUTFbDGSdrVwChQJOKvihymI8yWg0 792HRCBJOLuZb10NWMZJy+xWs5S2JrKstftY7xwZs2KVbqZgO9o0ec7YHiQvWDqy1Qop o01f02mSMug6EzfOPAaodpgmSy8UH6MqkmKCFufhFr4EZ0v1YV6momWjdzzk4IA43SU/ ZlB78CGnrGGtiMvR5wJ9yVjRCJ9uDFkcYkCrDHedHN3qyHVn2Tqhk+/tg0QbfNcGaP59 mvOx+0n/+qnSztd3wnVFfxEiIVHyQLKbFooi8Hqvm5KQnjzn2TV7XIpSHW64gZeRSB4i 2AzQ== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=VTqpykZbu5dnLt2G6I5k9ezwTwb1Dv5K5J5VvPZI9W4=; b=VMDkV6hAjXyNgs/JLYwNXR5pM8Pjd2tjSBNS0D+xzOQWuktQU3acCJr0AifdvRB+vR XRcHlEYmJAlei8bUNZVHd6AiCHaCsiVD7i+NIo9gIRF48FaNdhR5EODOgyG9IJkryNPL ZmcDtroWhs7s7IwO1Z7c2f3VtWZqwhgrVaM6641qyXTN3uKDsnFg2NHnZmdKclIgQAt2 Q4iqOwuAy6kf/Z0AnMr4iNhCxOwqkUASiVmkk7X1se40oMabL+6CHHJj+wEGdwgEvTYV tEASvwzW7fDOcaRxIzZzKy7aJCi2nGgZIt5TeJuR4y27MdOT0vfkGOVXIc4BKZuWYhPv cb1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HtYf8Big; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w4-v6si14150483plz.9.2018.10.16.11.20.38; Tue, 16 Oct 2018 11:20:55 -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; dkim=pass header.i=@linaro.org header.s=google header.b=HtYf8Big; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727213AbeJQCL5 (ORCPT + 99 others); Tue, 16 Oct 2018 22:11:57 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:44981 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727006AbeJQCL5 (ORCPT ); Tue, 16 Oct 2018 22:11:57 -0400 Received: by mail-lf1-f68.google.com with SMTP id m18-v6so17731361lfl.11 for ; Tue, 16 Oct 2018 11:20:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=VTqpykZbu5dnLt2G6I5k9ezwTwb1Dv5K5J5VvPZI9W4=; b=HtYf8Bigky96EFrQTYymdDVvnZvu+X2XNma6mwJFDhQB6cE6p5b1H9VNvvpAmkyCMY CYYUJ09ZSLIHVbbaU7Vbai178984xJ6DjPZD2OAX6G3I8lrE+UajQxfXlws3F47QvYMk j2hx0u6iNGlRw76VqU6JgqaxPHGmwxfpvkTng= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=VTqpykZbu5dnLt2G6I5k9ezwTwb1Dv5K5J5VvPZI9W4=; b=dhNCK5r/CpYdJMoIvAaNoMrd1amQoXvh8NDu4/BL/4yTY3hupLVXuAL639GkveUPfm CIoS2I8Ngrki/h86tl0p/Zod6rwdjBlrdNf3O70s6kyKfFGrXf5H1QJ4TpqMc+F+Fjke YLnPWurqtp12irFD3J5hA1zxtPocNupDPErmNi8WtNTMecjJfLZn/IM0l3WU7NKjspAj lsynvkLH6hET43HCJbxDqxTEY5qBxtT41v/90fPmZJzUZWD5qLQ4PllxUh1Fg/eNx7/y YVRsdbSBp57BDmgTU0mEs4IClbVezBrQLiHzjZELTQYqXHNuzhWJPEIpxhDrdCmkfIF2 12Hw== X-Gm-Message-State: ABuFfohH00sjp4KXlJAqQZPYh0/Js8CLQgMuQWk8EKJSzCnRj3UoyVAm bAcj1kc/ur8g8olwruYvSBVkXcbgGH5etP1//jONag== X-Received: by 2002:a19:6719:: with SMTP id b25-v6mr13256009lfc.54.1539714015062; Tue, 16 Oct 2018 11:20:15 -0700 (PDT) MIME-Version: 1.0 References: <20181016170220.31156-1-daniel.diaz@linaro.org> <037e072a-5695-1343-35d1-37b9450581d4@kernel.org> In-Reply-To: <037e072a-5695-1343-35d1-37b9450581d4@kernel.org> From: =?UTF-8?B?RGFuaWVsIETDrWF6?= Date: Tue, 16 Oct 2018 13:20:03 -0500 Message-ID: Subject: Re: [PATCH] selftests/ftrace: Use colored output when available To: Shuah Khan Cc: linux-kselftest@vger.kernel.org, rostedt@goodmis.org, Ingo Molnar , open list , mhiramat@kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! On Tue, 16 Oct 2018 at 12:43, Shuah Khan wrote: > On 10/16/2018 11:02 AM, Daniel D=C3=ADaz wrote: > > If test is being directly executed (with stdout opened on the > > terminal) and the terminal capabilities indicate enough > > colors, then use the existing scheme of green, red, and blue > > to show when tests pass, fail or end in a different way. > > > > When running the tests redirecting the stdout, for instance, > > to a file, then colors are not shown, thus producing a more > > readable output. > > > > Signed-off-by: Daniel D=C3=ADaz > > --- > > Hi Daniel, > Thanks for the patch. Steve is working on adding this functionality. Plea= se > see the latest linux-kselftest next for the patch. I hadn't seen today's discussion until after Steve replied to this patch. Mine is based on your next branch, building upon Steve's patch. These changes here are somewhat different, in that color is enabled only if color is available in the terminal in the first place! And if the standard output is redirected to a file (which is what Masami reported today), then colors are avoided even if available. Greetings! Daniel D=C3=ADaz daniel.diaz@linaro.org > Steve just sent an update to the patch to fix an issue. Please test and s= ee > if that solves the problem you are trying address with this patch. > > thanks, > -- Shuah