From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Brivio Subject: Re: [PATCH iproute2] testsuite: ss: Fix spacing in expected output for ssfilter.t Date: Sun, 11 Nov 2018 12:50:39 +0100 Message-ID: <20181111125039.639dd608@redhat.com> References: <20181110214844.GL6440@orbyte.nwl.cc> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Stephen Hemminger , "Yoann P." , netdev@vger.kernel.org To: Phil Sutter Return-path: Received: from mx1.redhat.com ([209.132.183.28]:36790 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727492AbeKKVjI (ORCPT ); Sun, 11 Nov 2018 16:39:08 -0500 In-Reply-To: <20181110214844.GL6440@orbyte.nwl.cc> Sender: netdev-owner@vger.kernel.org List-ID: Hi Phil, On Sat, 10 Nov 2018 22:48:44 +0100 Phil Sutter wrote: > On Sat, Nov 10, 2018 at 10:21:59AM +0100, Stefano Brivio wrote: > > > @@ -12,37 +12,37 @@ export TCPDIAG_FILE="$(dirname $0)/ss1.dump" > > ts_log "[Testing ssfilter]" > > > > ts_ss "$0" "Match dport = 22" -Htna dport = 22 > > -test_on "ESTAB 0 0 10.0.0.1:36266 10.0.0.1:22" > > +test_on "ESTAB 0 0 10.0.0.1:36266 10.0.0.1:22" > > How about using a regular expression ('test_on' calls grep with '-E')? > E.g. this instead of the above: > > | test_on "ESTAB *0 *0 *10.0.0.1:36266 *10.0.0.1:22" I also thought about something similar (perhaps uglier: piping the output through tr -s ' ' in ts_ss()). But then I thought we might like to use this test to also check that we don't accidentally modify spacing, so I'd rather leave it as it is, with this patch on top. -- Stefano