From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Vorel Subject: Re: [PATCH iproute2 1/1] testsuite: Fix colorize Date: Fri, 21 Dec 2018 14:04:03 +0100 Message-ID: <20181221130402.GA15447@dell5510> References: <20181218192904.18309-1-pvorel@suse.cz> <20181220201748.0f0bd619@xeon-e3> Reply-To: Petr Vorel Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org To: Stephen Hemminger Return-path: Received: from mx2.suse.de ([195.135.220.15]:41594 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730070AbeLUNEG (ORCPT ); Fri, 21 Dec 2018 08:04:06 -0500 Content-Disposition: inline In-Reply-To: <20181220201748.0f0bd619@xeon-e3> Sender: netdev-owner@vger.kernel.org List-ID: Hi Stephen, > On Tue, 18 Dec 2018 20:29:04 +0100 > Petr Vorel wrote: > > bash and dash require for escape sequence to use 'echo -e' or printf > > (but working on zsh). Choosing printf as it's implementation is IMHO > > more portable than echo implementations. > > dash also require to use \033[0; as escape sequence instead of \e[0; > > NOTE: \e[0; kept in lib/color.c as it's not problematic for C code > > (working when run ip on various shells). > > Fixes: 7e2f71b4 ("testsuite: colorize test result output") > > Signed-off-by: Petr Vorel > Sure applied. Not sure why people expect tests to work without > bash. Next they will want it to work with clang on BSD... Understand your frustration about useless fixes, but actually the reason for me to fail this patch was that it does not work on bash on Tumbleweed: Now testing on Debian and it's working. Not sure what causes that as echo "\e[0;32mPASS\e[0m" run in bash is broken on both (both distros have bash version 4.4.23(1)-release): $ echo "\e[0;32mPASS\e[0m" \e[0;32mPASS\e[0m Kind regards, Petr