Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp94291pxv; Wed, 7 Jul 2021 21:20:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNHnxA1DJOcFDWZwIAEphjriQFmBXTgBTW1al4pxNGfK3RnxC/U47ScDn2MY9SUybcPy0H X-Received: by 2002:a17:906:b10e:: with SMTP id u14mr18807625ejy.522.1625718029577; Wed, 07 Jul 2021 21:20:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625718029; cv=none; d=google.com; s=arc-20160816; b=dL/6U6dhypckPss28bqcCyyqOOQhcDsWydOFZ4Ve1bGZ0eq42m7s4mPXR0D/X8e7GL cXMev55JP9UuI4zKaNuAWE/fqZlc9GMmA7cp4iCqy2dB5fHq36uLaAe3oh5CD5H+jPDS eITtDJ4s39sFZeaPu/F6w6jsTWKQ7Baf7ER5m0Dda11jcivW8fhbEtMZnNAFt31r2ayS 7r5Co40wyu3dHVoybWuikPEY7erQw7V6ux052p0kvs/bo+hlNRrub1VghiIAwaDu9qKw RpcfKcORw3TWDKdpSXpO3pk+Mz4Nm6CTN2YekUCv80EsLUeFyl/aJmzBscoFohUg+6SJ DoXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=4G9i8vQWT5nXUI2uXZLc2Au8KV/9r+vg878BWJ9X0yw=; b=Ps50OIUgl03lFyrMjJRuXLKjaMand5g1JH/oiHaoa7ecozfd/ydsimCYAebvmMWJMY SNk94Xdg5S4t14+PHIKOVMhv7X1YHFECr4x8222sCtoDoSc5b1hxZS/Au3VRviSJupvc CJCBrZLJsEn89d5euloDturacEyJ5Gp3/vI9iA13ykyJqj0maAoxIwUMNggDf5ZhE8tN t+K7CcW73WhZz6RW/CCc58AHASPWWa0HvjShWiszmMRjOxT/Hbjw2rkwau1nLxf6fi+2 y3bH3dz8geoba5WsOotPamTO5sMyBBOm6fNUu8ljIeWeF3ObgesunkI9xcV7lp1JtfOl Ugcg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bo20si1549532edb.17.2021.07.07.21.20.06; Wed, 07 Jul 2021 21:20:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229541AbhGHEVX (ORCPT + 99 others); Thu, 8 Jul 2021 00:21:23 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:56176 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229482AbhGHEVW (ORCPT ); Thu, 8 Jul 2021 00:21:22 -0400 Received: from mail-pj1-f72.google.com ([209.85.216.72]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1m1LUm-0004aK-1N for linux-kernel@vger.kernel.org; Thu, 08 Jul 2021 04:18:40 +0000 Received: by mail-pj1-f72.google.com with SMTP id u12-20020a17090abb0cb029016ee12ec9a1so1733376pjr.3 for ; Wed, 07 Jul 2021 21:18:39 -0700 (PDT) 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; bh=4G9i8vQWT5nXUI2uXZLc2Au8KV/9r+vg878BWJ9X0yw=; b=LlYIA/NEfn8vNoHNQAtb050CAM2zfkmdQW4j9sxONMu5PBDUwu15y0plsZr5QDNN0R rqAkK8iOYIYoHV4h3iDUCxMC2t1GK0jfHU897IJXwFg18NXeVXqMZ1T3WbGlS3P1gh3A IUIs/KZou2auwz/Ox7cuN+9EXcUr4q1ZKpUb6mb8GFmbhsjWW3KcueC3PyqRRZnUhRRo ndcbKnOUu2kzzIkiKFD09+S7LY2SMNBzoNzOLwdy7IcuUKfQAJ435z5zzVqfP9c9RRbu UriGKNcxobWnvi6i6MdQkvR0Id3Z+MXeVi5U9+IBL53uypJt8MZaEoppaHsCJ+C77W24 jgWw== X-Gm-Message-State: AOAM532YkybX2RPMGf6FhSf/7BX+JDPPjY8tjZJv4jxBvJcouc1r+rEv BZh96TwSYycF8p1srdzq/A3DZyPcphlwiJdcebrf3Gpe8s8ngJoOWnnFYS1N2zgGllLzvIopsVx 3yA4oP0q9Ye+dje5jwMjBGO8Di7Pb2NcpG7mR1RIGwMSW1+NkETPlUYg9 X-Received: by 2002:a65:6659:: with SMTP id z25mr29667136pgv.291.1625717918565; Wed, 07 Jul 2021 21:18:38 -0700 (PDT) X-Received: by 2002:a65:6659:: with SMTP id z25mr29667086pgv.291.1625717918266; Wed, 07 Jul 2021 21:18:38 -0700 (PDT) MIME-Version: 1.0 References: <20210525113316.25416-1-po-hsu.lin@canonical.com> <87y2c1swnz.fsf@nvidia.com> In-Reply-To: <87y2c1swnz.fsf@nvidia.com> From: Po-Hsu Lin Date: Thu, 8 Jul 2021 12:18:26 +0800 Message-ID: Subject: Re: [PATCHv2] selftests: Use kselftest skip code for skipped tests To: linux-kselftest@vger.kernel.org Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel , shuah , Shuah Khan , ast@kernel.org, Petr Machata , daniel@iogearbox.net, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, David Miller , Jakub Kicinski , hawk@kernel.org, nikolay@nvidia.com, gnault@redhat.com, vladimir.oltean@nxp.com, idosch@nvidia.com, baowen.zheng@corigine.com, danieller@nvidia.com, Willem de Bruijn Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 26, 2021 at 4:54 PM Petr Machata wrote: > > > Po-Hsu Lin writes: > > > There are several test cases still using exit 0 when they need to be > > skipped. Use kselftest framework skip code instead so it can help us > > to distinguish the proper return status. > > > > Criterion to filter out what should be fixed in selftests directory: > > grep -r "exit 0" -B1 | grep -i skip > > > > This change might cause some false-positives if people are running > > these test scripts directly and only checking their return codes, > > which will change from 0 to 4. However I think the impact should be > > small as most of our scripts here are already using this skip code. > > And there will be no such issue if running them with the kselftest > > framework. > > > > V2: router_mpath_nh.sh and outer_mpath_nh_res.sh sources lib.sh, > > there is no need to assign ksft_skip value in these two. > > > > Signed-off-by: Po-Hsu Lin > > I want to note that defining ksft_skip=4 in every test separately is the > current practice. I agree with Willem (in a parallel thread) that this > stuff should live in a library of its own, but there is none currently. > When there is, it looks like the conversion would be mechanical. > > Which is to say, IMHO this patch makes sense on its own as an > incremental improvement. > > Reviewed-by: Petr Machata Hello folks, any other comment on this patch? Or if I should break this down to smaller patches for different suites in kselftests? Thanks! PHLin