Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1766179rwd; Tue, 13 Jun 2023 14:01:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ530UTJDYtozM+9aMPQvuVtHMCOqUD/KK8mMk6kAObJS/gtDWxJ2bJ2yInbvDXmnc3GfpKv X-Received: by 2002:a17:902:8d8a:b0:1b1:9d14:1537 with SMTP id v10-20020a1709028d8a00b001b19d141537mr9508952plo.55.1686690067123; Tue, 13 Jun 2023 14:01:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686690067; cv=none; d=google.com; s=arc-20160816; b=b3hXYsyxTHbnfmEQy21p2u4B0Cmbu7HDBqX0wRdhrZZP7k1ygIHIrYoSwrQkm4RF1z aiebMe13sg/r37FGErI35GLslJyVDU5o/X7Nu+EAuZU0glRDr3d/s7DN+cI+1PWDekoy +VygrgsYPF7cfBFXPRBEmucJXzCxrkXsPg9Cbe3Unme9qftZufDFa9Fe7a6mDNX4gL2d yZZdX5dzIb5V9g1cvtoojIKCget3kNcLHCm9e4NmSBjMxn/vvueZY6b3tOBmZgv15buY LgduZRthL8xbH3L+iiLVNpYzi4RZtZJx1f2wD2r39XtKV4ZaIZtuUFEwYDFVf9GN6oEQ 08DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=w3I43KAuJAocXaniTcVrq9SXL9Lvm/1crVtr2GDT8u8=; b=M8ivkZEuX1ZIBOnRPjajAgeYm2+bdvdaLbx3eLsknKQb21atLNDXc1Bqz1tCygMovh CGown5aRiYxezzoZ/2zU+0z2rXtMKNzRfLLEKqq4J/Hg4FvPfSvsRygKFcmLhJw5bAmY k+8bchDMLAHldNgYbRqp+bb9/dQQ71G0PiEB4qm2H9Vh9AkVy4HEyp/HrIonzhLfRBli Q/G7te4xusaORN4p/lJxFHLMGPMWoiKOfGf0C9xw5sXJd+X0h4RztahvsVPWhe3ho6FM s8xlpA4C55KGe6QoGhim+HvRkc1lnLeXPIKdMuRrw0+gYarB/aQx/T+o2iobRTVgsXkN lb+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=5Zm5sKRk; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d1-20020a170902b70100b001b06fa86af9si9199701pls.462.2023.06.13.14.00.53; Tue, 13 Jun 2023 14:01:07 -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=@google.com header.s=20221208 header.b=5Zm5sKRk; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240270AbjFMUpI (ORCPT + 99 others); Tue, 13 Jun 2023 16:45:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234166AbjFMUpC (ORCPT ); Tue, 13 Jun 2023 16:45:02 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE7B9E59 for ; Tue, 13 Jun 2023 13:45:00 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-514ad92d1e3so499a12.1 for ; Tue, 13 Jun 2023 13:45:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686689099; x=1689281099; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=w3I43KAuJAocXaniTcVrq9SXL9Lvm/1crVtr2GDT8u8=; b=5Zm5sKRkHMVDZPW2Y1FNVHlOcAFdOb/jk3DvGjuiLGPssaDk+mymtYebDfdKQu0tkX adUO3QTRnBddXET8vlONIyHU/MHqu+0/pRYg2sjjepoS9aOvmJiG9nt2iJnRU8u8frvG CmDWTEpHuADJ6v39wAZvIgTNDyLw7VUYqpfOwtFnnnCZnBuxTUoMv2KmfdQdRVFOHAZm ynorB8ZtdBPyca8D3c3g0O1x9IlUfar31fSFerUJ2kAhNNKMe/z2fQW8WIG/6tR8EyJH VTMJqXMDMVAdiIlEIp8L0SGS9bq9pkPPNl92Mh71c3lz6DNxIhH6wLOLRe2f0EbC2rKn 0fBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686689099; x=1689281099; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w3I43KAuJAocXaniTcVrq9SXL9Lvm/1crVtr2GDT8u8=; b=GuY7r+B6wgEBAc4dreLASksu+GFYdZoZt9mKHcw1ha+wTCMfZi96BFOt2ctOC1B3/6 kGBS4bwUnkiKDmfHaia77XW1FKmU9L7a7xz5MMVIshuUyg5ZbLAFaEWNIrdQmWb8wDcV mIzXcQXyDEs9YvXCZO6V8jejBnKrBJ4WNp7Udcq6AFyughxzb88LZXltpG+c+WgRlCeu xfHiRmiQecZb5OUPMNMPXPyTPzjAitulG+D7DQb2iZMJI/ERLkiJxsIuHkyD68b/MLBI SBEhOU8fPZK+qQ0kfrovGi/IGoIvw6rGDVA70SSKy4/pxLS8L5CHeiKmpUdkJ8FBZGQs OOAA== X-Gm-Message-State: AC+VfDz+ryacwEjucd3J35B4eo7ock6hzmeoNLOp6H97TyLa5FJDa4kG d2KmN2ooDT1siQmcUGm9VxtTmhc13gUhpJSjxSzUbQ== X-Received: by 2002:a50:d0d1:0:b0:518:7076:74bc with SMTP id g17-20020a50d0d1000000b00518707674bcmr22868edf.1.1686689099093; Tue, 13 Jun 2023 13:44:59 -0700 (PDT) MIME-Version: 1.0 References: <20230610005149.1145665-1-rmoar@google.com> <20230610005149.1145665-6-rmoar@google.com> In-Reply-To: From: Rae Moar Date: Tue, 13 Jun 2023 16:44:48 -0400 Message-ID: Subject: Re: [RFC v1 5/6] kunit: memcpy: Mark tests as slow using test attributes To: David Gow Cc: shuah@kernel.org, dlatypov@google.com, brendan.higgins@linux.dev, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, keescook@chromium.org, linux-hardening@vger.kernel.org, jstultz@google.com, tglx@linutronix.de, sboyd@kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 Sat, Jun 10, 2023 at 4:29=E2=80=AFAM David Gow wro= te: > > On Sat, 10 Jun 2023 at 08:52, Rae Moar wrote: > > > > Mark slow memcpy KUnit tests using test attributes. > > > > Tests marked as slow are as follows: memcpy_large_test, memmove_test, > > memmove_large_test, and memmove_overlap_test. > > > > These tests were the slowest of the memcpy tests and relatively slower = to > > most other KUnit tests. Most of these tests are already skipped when > > CONFIG_MEMCPY_SLOW_KUNIT_TEST is not enabled. > > I assume the plan will be to eventually remove the > CONFIG_MEMCPY_SLOW_KUNIT_TEST option and just rely on the "speed" > attribute to filter these out. That has the disadvantage that the > tests will still be built, but is probably the nicer long-term > solution. > > I suppose we could remove it in this patch, too, but I suspect it > makes more sense to have a deprecation period to make sure the > attributes are working well. That being said, maybe add a note to the > CONFIG_MEMCPY_SLOW_KUNIT_TEST help text to advertise this? > Yes that was the plan but I should definitely document that here and then I like the idea for adding the note with CONFIG_MEMCPY_SLOW_KUNIT_TEST. Thanks! -Rae > > > > > These tests can now be filtered on using the KUnit test attribute filte= ring > > feature. Example: --filter "speed>slow". This will run only the tests t= hat > > have speeds faster than slow. The slow attribute will also be outputted= in > > KTAP. > > > > Signed-off-by: Rae Moar > > --- > > lib/memcpy_kunit.c | 8 ++++---- > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > diff --git a/lib/memcpy_kunit.c b/lib/memcpy_kunit.c > > index 887926f04731..440aee705ccc 100644 > > --- a/lib/memcpy_kunit.c > > +++ b/lib/memcpy_kunit.c > > @@ -551,10 +551,10 @@ static void strtomem_test(struct kunit *test) > > static struct kunit_case memcpy_test_cases[] =3D { > > KUNIT_CASE(memset_test), > > KUNIT_CASE(memcpy_test), > > - KUNIT_CASE(memcpy_large_test), > > - KUNIT_CASE(memmove_test), > > - KUNIT_CASE(memmove_large_test), > > - KUNIT_CASE(memmove_overlap_test), > > + KUNIT_CASE_SLOW(memcpy_large_test), > > + KUNIT_CASE_SLOW(memmove_test), > > + KUNIT_CASE_SLOW(memmove_large_test), > > + KUNIT_CASE_SLOW(memmove_overlap_test), > > KUNIT_CASE(strtomem_test), > > {} > > }; > > -- > > 2.41.0.162.gfafddb0af9-goog > >