From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11582C433EF for ; Thu, 23 Sep 2021 18:11:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9C8696105A for ; Thu, 23 Sep 2021 18:11:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9C8696105A Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 07FB194000A; Thu, 23 Sep 2021 14:11:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 02F03940007; Thu, 23 Sep 2021 14:11:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E390494000A; Thu, 23 Sep 2021 14:11:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0063.hostedemail.com [216.40.44.63]) by kanga.kvack.org (Postfix) with ESMTP id D1500940007 for ; Thu, 23 Sep 2021 14:11:01 -0400 (EDT) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 913002DD7D for ; Thu, 23 Sep 2021 18:11:01 +0000 (UTC) X-FDA: 78619629522.31.4483575 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by imf24.hostedemail.com (Postfix) with ESMTP id 15974B00009E for ; Thu, 23 Sep 2021 18:11:00 +0000 (UTC) Received: by mail-wr1-f52.google.com with SMTP id i23so19779697wrb.2 for ; Thu, 23 Sep 2021 11:11:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=21ubOOR9VOR5U3seg3iEPN0lJ/0NLAApRhv0qLePyFk=; b=cr7nWdSieeJfYsF4LUWdQMsen2M61vGKUOYI6vdIkChAYDsAcQi65Cl+eJNgHpqQ5y WfkYaKv/uTqcmqxPhDc6cojZh1Xbut7LXToy5kCg1DS6N111yhYZr0e6ueVVdMMpIAdF XCgDb+la+6ABTxZ6WCsfNHeywIVMZ8A6GNY2NKHZNFCkkEAHeefc8JMIjQiEutcKg07Y K0NNYDQsekid89Zh2ED98au/lI32O/MWMIjvCeANleQO/hgJ7LJvaH6kxZmadW3rD3/D s6tsRCfsoNjl2WNzR1HwCWtu7sH+G2iXG452IlXW61HVi/V2hrEv6qkApfylUqdS5uAk gsUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=21ubOOR9VOR5U3seg3iEPN0lJ/0NLAApRhv0qLePyFk=; b=mojTIYLzRGchV9KlfNmaotwFuiiiK0cxOJXj0AFN78n88tXbiQrCGT+L6p7LBV3FHH 9Ap4S8uqqbwEvCXspivP9u0Xs0kWCAaZ9KUakqrZgJ3YadM8GSaQRvEG3TfYudciQzzE 732UGR6DvIOjQ5Wa16t6Pt63nm0jUoqD3jLZuq8qMSj9l9d/Cho++ERrHwWLDWRaL63k rBnrf9MZzEPTb7L5vfFBkfH6j+WFLSOXqQG7yZ0/ka9eLIIVhx1TjhABU3G4mHJ+9djc MwL8aXn7ONWbFG6+bCVOH7RN4f52LWqlh4yWlvu21BazrWn0XvdnCsHlQ+ajrrJKFFUB H9Qg== X-Gm-Message-State: AOAM531scJWNy9Ri4R0MVtQcflmlsG4HVhSb8oHFa56/nb4bH0kcckFx ZcPqzLoY7GQB/+/7uixAFR4/DXbsXVvf2Yo0Pmw9ig== X-Google-Smtp-Source: ABdhPJxZEeBSnS2nuImQOU1Vq6424Djbg1OgtuNoQLiEHpx7fARKVFz9qnFt2jhQdAdJtrus3Xq9XpBWBTLT7kETjT4= X-Received: by 2002:a1c:7713:: with SMTP id t19mr6090094wmi.162.1632420659610; Thu, 23 Sep 2021 11:10:59 -0700 (PDT) MIME-Version: 1.0 References: <20210922182541.1372400-1-elver@google.com> In-Reply-To: From: David Gow Date: Fri, 24 Sep 2021 02:10:48 +0800 Message-ID: Subject: Re: [PATCH] kfence: test: use kunit_skip() to skip tests To: Marco Elver Cc: Andrew Morton , Alexander Potapenko , Dmitry Vyukov , Aleksandr Nogikh , Taras Madan , Linux Kernel Mailing List , Linux Memory Management List , kasan-dev Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 15974B00009E X-Stat-Signature: fptophjsh94rgta4cysec5o99pt836bx Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=cr7nWdSi; spf=pass (imf24.hostedemail.com: domain of davidgow@google.com designates 209.85.221.52 as permitted sender) smtp.mailfrom=davidgow@google.com; dmarc=pass (policy=reject) header.from=google.com X-HE-Tag: 1632420660-216129 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Sep 24, 2021 at 1:58 AM Marco Elver wrote: > > On Thu, 23 Sept 2021 at 19:39, David Gow wrote: > > On Thu, Sep 23, 2021 at 2:26 AM Marco Elver wrote: > > > > > > Use the new kunit_skip() to skip tests if requirements were not met. It > > > makes it easier to see in KUnit's summary if there were skipped tests. > > > > > > Signed-off-by: Marco Elver > > > --- > > > > Thanks: I'm glad these features are proving useful. I've tested these > > under qemu, and it works pretty well. > > > > Certainly from the KUnit point of view, this is: > > Reviewed-by: David Gow > > Thanks! > > > (A couple of unrelated complaints about the kfence tests are that > > TRACEPOINTS isn't selected by default, and that the manual > > registering/unregistering of the tracepoints does break some of the > > kunit tooling when several tests are built-in. That's something that > > exists independently of this patch, though, and possibly requires some > > KUnit changes to be fixed cleanly (kfence isn't the only thing to do > > this). So not something to hold up this patch.) > > I think there was a reason we wanted it to "depends on TRACEPOINTS". > If it were to select it, then if you do a CONFIG_KUNIT_ALL_TESTS=y, > and also have KFENCE on, you'll always select tracepoints. In certain > situations this may not be wanted. If we didn't have > CONFIG_KUNIT_ALL_TESTS, then certainly, auto-selecting TRACEPOINTS > would be ok. > > If you can live with that, we can of course switch it to do "select > TRACEPOINTS". That's probably more convenient for me, but I confess that my use case is almost always wanting to run the KUnit tests, so I'm not unbiased. :-) > > On a whole I err on the side of fewer auto-selected Kconfig options. Yeah, it's perfectly sensible to do it either way. Maybe the right option is to have a .kunitconfig file which has TRACEPOINTS enabled. It's probably not worth doing if there's still issues with kunit_tool parsing the results when the test is built-in, so this should probably wait until KUnit has a way of running code on init/exit of suites as well as individual tests within those suites. KFENCE is not the only test suite which needs something like that (nor the only one which does some module_init or late_initcall stuff which causes some formatting issues with builtin tests). Cheers, -- David