Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp250490rwl; Thu, 30 Mar 2023 15:30:12 -0700 (PDT) X-Google-Smtp-Source: AKy350ZGJKlzrWoY+anJDb1z86Lg2izG0kEDUMmmmS5VryFL7Qhm/9YlWYlFw1nf3Oz12aD5g5Wu X-Received: by 2002:a17:903:1384:b0:19e:94ff:6780 with SMTP id jx4-20020a170903138400b0019e94ff6780mr3869873plb.6.1680215412488; Thu, 30 Mar 2023 15:30:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680215412; cv=none; d=google.com; s=arc-20160816; b=IbL717fWZL/pBvk3GGd/gOj3xYtEU8OPJpvdzFYP7eyQUAFZVyY0NVxKsMgvbJJSxJ G8diWX0T3enxSzMtWNeklKemQ60JLAJu9KvFJox2yPLQyKLUZWdqFEHTb0+tqHHo+fQC 4GhyW8XWxybkyd8HL5H0eggzJSqg7bImj/w3zrPyxe4+D0EaVXC5nMD1DS66mrfcxLZz +Hjepp6fc/EVkYNqWofb1HBXdLwhjwvfad0b0f8Abq28ZXHBsfpfY6SRFdRnsxGqArQu UqzhSCLGpLS9/BQ1+OSAoDtm0QLGcL3R7R8Cqs6PzFqMWhoc710vb9qu/6InXf+mc+5A 8dzg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ULC/HBV/7CZFRuQfLV54dZLIGK3tnK9UHOG46WhNr2I=; b=n0dCZQP+M80EdDxWvEGQ/8900KzNm+Z0VrH6IKezST47fmFIsVwu7mOfQfWs4WnVZR RylQQ+Qx5zmJHwvgVQs7LCpI+4PTtQIaQd+KFGD18+2srVhpegNQ1F+PsY/Wfgr5v9g1 PcZcExuxfDb0paXpMhHwuFtTzMJUf3DQgJaxaa643y/P4A6WZ5bk1fsPEK6xqy48sw+u 5aIDXPJDaXNsjWE3wpA+VxliW9UO1RQp5j67BciTjkb59uT0fmn2vld+ZTSqSj+doJZV LnnD22/VPn/CxTu/D0iqV6ftn6BpVv27owjCwRvTGQjxT/bIv8vyuUceUadQsgicwY1I bxgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KPvIU9sg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h23-20020a170902ac9700b001a1c551bcf9si597740plr.106.2023.03.30.15.30.01; Thu, 30 Mar 2023 15:30:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KPvIU9sg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230268AbjC3W3G (ORCPT + 99 others); Thu, 30 Mar 2023 18:29:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230039AbjC3W3F (ORCPT ); Thu, 30 Mar 2023 18:29:05 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04577C17E for ; Thu, 30 Mar 2023 15:28:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680215291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ULC/HBV/7CZFRuQfLV54dZLIGK3tnK9UHOG46WhNr2I=; b=KPvIU9sgqGahtvwgGlV3CNDN63OPOyQgw+p/LN5yZ98B7I5QcTihMmkYaR1iyzIuX9ibz0 TG7bAIysj8kuI3BWc16d7cj1Q9sjymczZ3zzZggEMMcb+UiHVvHxtYDZSgyXXwCoUwn+7r Xvwwh/EiZcCOzku9d5gHQTmjEbbFsjw= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-654-B5TSYhsnMWq-76UWUjDOkA-1; Thu, 30 Mar 2023 18:28:09 -0400 X-MC-Unique: B5TSYhsnMWq-76UWUjDOkA-1 Received: by mail-qv1-f72.google.com with SMTP id l18-20020ad44bd2000000b005a9cf5f609eso8960192qvw.15 for ; Thu, 30 Mar 2023 15:28:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680215289; x=1682807289; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ULC/HBV/7CZFRuQfLV54dZLIGK3tnK9UHOG46WhNr2I=; b=QakCgfu99JtdrJ4UOMbsnAd+lwV8DQif6wzZ6DP6NuvEzaXbhIffZya+vYeA7IJJ5y lnz/jkZWyLReoPjpT8KBFGnGXgNcvtHuI24oir/VqKx213Pxvf8XX7wDTCZKaSO90BDq W0PGn7asnUgTJtrMY2WRgDP1bIKrRP8yuwgRk6RVdfGFyQgrzasMdXahmqW0vvZMJiSm mrcpas6RLcS7qYqtrvRp3TQRds4M1eSTSJ2PFD6ny1HDzS7snZo6F86iczNlP5HgaSuS jPiX0Z3H6LuVICEb+HeERjOE3UYXWLa5HNgUjK26vRKIdZf1gdE2fUrHW2Yo2U0QPZj/ GkSQ== X-Gm-Message-State: AAQBX9dlcE0T/25WezjAS1vuHCag2d1AYyABAaye+AgCRSqgs1iwVw5t /iHQXh7Tpuu1UjT4EFBZgLDCYuz+xIf5gXypbK+CoqsxGFnak1o0CxJyXwsLN17Q5cCVKqAT9L8 cc1Sm9t2bbBBzKCDco7zQ2yfK X-Received: by 2002:ac8:7d56:0:b0:3e2:ccf9:bf96 with SMTP id h22-20020ac87d56000000b003e2ccf9bf96mr6542356qtb.1.1680215289387; Thu, 30 Mar 2023 15:28:09 -0700 (PDT) X-Received: by 2002:ac8:7d56:0:b0:3e2:ccf9:bf96 with SMTP id h22-20020ac87d56000000b003e2ccf9bf96mr6542339qtb.1.1680215289166; Thu, 30 Mar 2023 15:28:09 -0700 (PDT) Received: from x1n (bras-base-aurron9127w-grc-40-70-52-229-124.dsl.bell.ca. [70.52.229.124]) by smtp.gmail.com with ESMTPSA id q12-20020ac8450c000000b003dd8ad765dcsm169428qtn.76.2023.03.30.15.28.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Mar 2023 15:28:08 -0700 (PDT) Date: Thu, 30 Mar 2023 18:28:07 -0400 From: Peter Xu To: Axel Rasmussen Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, David Hildenbrand , Andrew Morton , Andrea Arcangeli , Mike Kravetz , Leonardo Bras Soares Passos , Mike Rapoport , Nadav Amit Subject: Re: [PATCH 03/29] selftests/mm: Dump a summary in run_vmtests.sh Message-ID: References: <20230330155707.3106228-1-peterx@redhat.com> <20230330160646.3106903-1-peterx@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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-kernel@vger.kernel.org On Thu, Mar 30, 2023 at 12:07:24PM -0700, Axel Rasmussen wrote: > On Thu, Mar 30, 2023 at 9:06 AM Peter Xu wrote: > > > > Dump a summary after running whatever test specified. Useful for human > > runners to identify any kind of failures (besides exit code). > > > > Signed-off-by: Peter Xu > > --- > > tools/testing/selftests/mm/run_vmtests.sh | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh > > index c0f93b668c0c..9cc33984aa9f 100644 > > --- a/tools/testing/selftests/mm/run_vmtests.sh > > +++ b/tools/testing/selftests/mm/run_vmtests.sh > > @@ -5,6 +5,9 @@ > > # Kselftest framework requirement - SKIP code is 4. > > ksft_skip=4 > > > > +count_pass=0 > > +count_fail=0 > > +count_skip=0 > > exitcode=0 > > > > usage() { > > @@ -149,11 +152,14 @@ run_test() { > > "$@" > > local ret=$? > > if [ $ret -eq 0 ]; then > > + count_pass=$(( $count_pass + 1 )) > > Actually, inside $(( )) there's no need to prefix variable names with > $ too. Running "shellcheck" over the script written this way will > generate a warning. > > Same applies below. Sure, I'll fix. > > > echo "[PASS]" > > elif [ $ret -eq $ksft_skip ]; then > > + count_skip=$(( $count_skip + 1 )) > > echo "[SKIP]" > > exitcode=$ksft_skip > > else > > + count_fail=$(( $count_fail + 1 )) > > echo "[FAIL]" > > exitcode=1 > > fi > > @@ -279,4 +285,6 @@ CATEGORY="soft_dirty" run_test ./soft-dirty > > # COW tests > > CATEGORY="cow" run_test ./cow > > > > +echo "SUMMARY: PASS=${count_pass} SKIP=${count_skip} FAIL=${count_fail}" > > + > > exit $exitcode > > -- > > 2.39.1 > > > > Besides the nitpick: > > Reviewed-by: Axel Rasmussen Thanks! -- Peter Xu