Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp983236pxb; Fri, 15 Apr 2022 17:22:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhUUQV9jeFu/AWaSVvQPhFx3dgNov5YvgRkYH3MZwEMZt59b8Vd6EYpId3UHVPstM6jwIi X-Received: by 2002:a17:902:ce87:b0:156:5c6e:b6e4 with SMTP id f7-20020a170902ce8700b001565c6eb6e4mr1419833plg.12.1650068565835; Fri, 15 Apr 2022 17:22:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650068565; cv=none; d=google.com; s=arc-20160816; b=I5zfHjOTTnhO61QK5ADW23yUbWNqwEUt6aHRsSg4uQiGEwKyNAVAaJu4tk/KUMAfXW wJmgEcT/77KPLdyk5MqB74xkFYa9CK5iV1IIwMYaIUj7/TlLA2s75J6vBsCy0UvYUNmk v7n+osPuQmOEsvRZiMjN/GpukMUJqi/HVc+K8pU+lKfyegWNGVNhCanMJdQttci8HJ4w zh3ay/+GmCdoNyzMmGxAgla9XzhxTFgQAEv3wQSDi7cLNcldK/9MPEIOcEht1AYGime9 19YurldH9nV3oe4MVlw/72xD55uopkzNBLpmRjfdB4KAfoj2UhGkCIRfeRprePVWscc+ f44w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=SBjy86iuVh8fFOP01G4Xo2Z7vyppTHMdZeNJghULRH8=; b=klaLh8H+r6KKpvNttJFH4nCUp08v8ILIZcQDNtjK1MKqTuqNYV4wa0QAP1A1RLQYW4 9ZL92/02FKACkqLqF5o8d4O42SX4SUf0jdoZmRlWciSGwsLL5dQcsOmzvqzdw7GKHosK gVAtgzbxt28unkj1BbEzP+silC5Fg45sm5gL5tNtvZPciCi+UvzhAGuVW6a2PJLTtyA9 kQb6p3wiXNG664q71yqZGLZMEh1V0RPcZheXncjnQAoEhOn6eSlFdWNnlbFfveA15jey G2oz7M8JDr1N5JBamSo5p6GJ9tbRHrykWqU7bYybRFvrZA3Ke5fiqxksd6OdFC1PGaZk qUQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=QQnoITYH; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id i5-20020a17090ad34500b001ca35559ee4si3037852pjx.21.2022.04.15.17.22.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 17:22:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=QQnoITYH; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8E660DB4BC; Fri, 15 Apr 2022 17:21:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353922AbiDOPMm (ORCPT + 99 others); Fri, 15 Apr 2022 11:12:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237460AbiDOPMm (ORCPT ); Fri, 15 Apr 2022 11:12:42 -0400 Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B13D85BF3; Fri, 15 Apr 2022 08:10:10 -0700 (PDT) Received: by mail-qt1-x82e.google.com with SMTP id r25so6100734qtp.8; Fri, 15 Apr 2022 08:10:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=SBjy86iuVh8fFOP01G4Xo2Z7vyppTHMdZeNJghULRH8=; b=QQnoITYHIwvLmdni4JXE8DQDurcuBVf+FKEU3k5/Dac1DZ3juYc4TLWJnY3ZgfstcN 5eQ0zoVW5zOx69uj4+wNhR/zenJ34WPDngvetanIIarIjNRk0t9b8PnwZuVjX6LYO/9S +z6EM4HGgzyjldg1ktqf+qstxfJdZXa8LBcZ2egSWtUe4LNI2eBdKvrav3qU8/6CsN/U hsiWcb/l1M7iLgNoOlTLr4ydUTz96b6WdtrzQc0uM3ZuUfhtCir+aVqSqxVTcM6aCn1Z dN6Y4uFgwHG3DQvQUIOG00MFfduyfe7dEFCHWg7v2Oywd9vyB2da4+3I+ZY4nitxAC/i m7Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=SBjy86iuVh8fFOP01G4Xo2Z7vyppTHMdZeNJghULRH8=; b=efeqIjuKxlc27f9lGHVyiZCcXGd0uu7t/gdSpzBzcrqyyFo2W2TpEuIAlA2SmCpYMP i8qPM2ip2tz47miFKxtpCXamtCi9y7p4n2LlzWdGcDXi8dDnwGAlUeC7uyAENLhk8jNe fZNXa4vJy/cbtSuGhq05JocNVFcrmaQKM6nkDg13iimO5KAW6urCz5l5LsKethtTGKOw 92H94HTIIqDBy9Ivu0zYEvQryl0VOcQJ0BrUhsH5sQJRAKpzVoLhEHvrcpBQ0mXIrOA6 UFSfmunZWOEfy6PWFJL6Qox3+X0VXh4T4jVGTX/EpReBfL9LMDJ51NL+BaaNKAG7TkKl WN6A== X-Gm-Message-State: AOAM5328bSsBIMXNf1Tl9UWBtzAwW9NvSHjifZLRdeqRmc986BLdtd4s QoSIUcoAUC9EIG4wGIiGEBg= X-Received: by 2002:a05:622a:64b:b0:2e1:cbc3:c9ff with SMTP id a11-20020a05622a064b00b002e1cbc3c9ffmr5667138qtb.226.1650035409586; Fri, 15 Apr 2022 08:10:09 -0700 (PDT) Received: from debian-BULLSEYE-live-builder-AMD64 (c-73-60-226-25.hsd1.nh.comcast.net. [73.60.226.25]) by smtp.gmail.com with ESMTPSA id b126-20020a37b284000000b0069a11927e57sm2491007qkf.101.2022.04.15.08.10.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 08:10:09 -0700 (PDT) Date: Fri, 15 Apr 2022 11:10:07 -0400 From: Eric Whitney To: "Darrick J. Wong" Cc: Eric Whitney , fstests@vger.kernel.org, linux-ext4@vger.kernel.org Subject: Re: [PATCH] common/filter: extend _filter_xfs_io to match -nan Message-ID: References: <20220414142258.761835-1-enwlinux@gmail.com> <20220414152949.GA17014@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220414152949.GA17014@magnolia> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org * Darrick J. Wong : > On Thu, Apr 14, 2022 at 10:22:58AM -0400, Eric Whitney wrote: > > When run on ext4 with sufficiently fast x86_64 hardware, generic/130 > > sometimes fails because xfs_io can report rate values as -nan: > > 0.000000 bytes, 0 ops; 0.0000 sec (-nan bytes/sec and -nan ops/sec) > > > > _filter_xfs_io matches the strings 'inf' or 'nan', but not '-nan'. In > > that case it fails to convert the actual output to a normalized form > > matching generic/130's golden output. Extend the regular expression > > used to match xfs_io's output to fix this. > > > > Signed-off-by: Eric Whitney > > --- > > common/filter | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/common/filter b/common/filter > > index 5fe86756..5b20e848 100644 > > --- a/common/filter > > +++ b/common/filter > > @@ -168,9 +168,9 @@ common_line_filter() > > > > _filter_xfs_io() > > { > > - # Apart from standard numeric values, we also filter out 'inf' and 'nan' > > - # which can result from division in some cases > > - sed -e "s/[0-9/.]* [GMKiBbytes]*, [0-9]* ops\; [0-9/:. sec]* ([infa0-9/.]* [EPGMKiBbytes]*\/sec and [infa0-9/.]* ops\/sec)/XXX Bytes, X ops\; XX:XX:XX.X (XXX YYY\/sec and XXX ops\/sec)/" > > + # Apart from standard numeric values, we also filter out 'inf', 'nan', and > > + # '-nan' which can result from division in some cases > > + sed -e "s/[0-9/.]* [GMKiBbytes]*, [0-9]* ops\; [0-9/:. sec]* ([infa0-9/.-]* [EPGMKiBbytes]*\/sec and [infa0-9/.-]* ops\/sec)/XXX Bytes, X ops\; XX:XX:XX.X (XXX YYY\/sec and XXX ops\/sec)/" > > /me squints at this regular expression and /thinks/ its ok. > > Took me a while to figure out "infa" tho. :P Hi Darrick: Yeah, me too. I initially thought that string would not match 'nan', but then discovered bracket expressions after having not used sed in a very long time. It's a sloppy match - it'll recognize fan0 as well as 'inf' or 'nan', etc. - and I guess the idea is that's good enough for filtering expected output from xfs_io while being concise. The sed documentation suggests that a '-' on the beginning or end of the bracket expression will be treated literally, and not as a metacharacter (part of a range), so we should be good there. > > Reviewed-by: Darrick J. Wong Thanks very much for your review! Eric > > --D > > > } > > > > # Also filter out the offset part of xfs_io output > > -- > > 2.30.2 > >