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=-12.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable 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 15B60C64E7B for ; Wed, 2 Dec 2020 22:59:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BF5EB221FD for ; Wed, 2 Dec 2020 22:59:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387841AbgLBW7Y (ORCPT ); Wed, 2 Dec 2020 17:59:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387762AbgLBW7X (ORCPT ); Wed, 2 Dec 2020 17:59:23 -0500 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7560BC0617A7 for ; Wed, 2 Dec 2020 14:58:43 -0800 (PST) Received: by mail-io1-xd42.google.com with SMTP id y5so79597iow.5 for ; Wed, 02 Dec 2020 14:58:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=5cB+/vzqNyGLlY6gjXLdgcPyiXRJ9zfEjY/dw9Idssc=; b=X8557/AaDSnc9UMi9+sP+NzMIycm4dY1OUc43TJwqCyubHtdOXlntePdg7MSqERib7 2MHzSJXG1VwTGZwJ7AAfpgYiHYKhdFqqbt54Q++1yolC8XAg97L4/l6bPtqFRKYwZHMc Aw1BX3BTAcOw807GmPNnGGsHLfghlU/C8d3+s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=5cB+/vzqNyGLlY6gjXLdgcPyiXRJ9zfEjY/dw9Idssc=; b=rRtV90kVSfeyCw017uQC14BA3BgDWP39499BbC0aqmacunvD6stuSAMzNj2gcz4qen 23U88ksSrHwf34fOGlCoAhYUInpqinr7bVymbJ05Eyz5Y9Bveqlg0cYTrc6IHto8nCE+ RvLfSpTmXUbSInSzQmeEzcPPNTcx45V/t6BCnqxA0WSJh82FEEXW9Unwblge7DzaXnrP 4Q+jPybpbmKg6bs72vjubFA9fvdrwOhaF4RzAodSRQvxJrOn65Rt6M7gH5SI3C+rJ36E KUeUD4kU30SEnHvWOLOoXMAAx99FvNa2dg/sa9ECgzSBK3Ton3yA9etocVwzAHi04vyD 17lw== X-Gm-Message-State: AOAM533YYlD51+554DTdQejYIEXKaa8p5u1l9DysiOOSpJ91XBjDIuwW SH3mj1DOg1VnkGAKjmgxPIg1+g== X-Google-Smtp-Source: ABdhPJzw3Rv1enCYSm9+2gzSPLTdHJBQW7KQ7rpvW60Gn0Ix2oysMP10GIdQH+AH3ho7nq+g1z7Y2Q== X-Received: by 2002:a6b:600a:: with SMTP id r10mr533063iog.143.1606949922814; Wed, 02 Dec 2020 14:58:42 -0800 (PST) Received: from [192.168.1.112] (c-24-9-64-241.hsd1.co.comcast.net. [24.9.64.241]) by smtp.gmail.com with ESMTPSA id a3sm118730ilp.5.2020.12.02.14.58.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Dec 2020 14:58:42 -0800 (PST) Subject: Re: [PATCH v9 1/2] kunit: Support for Parameterized Testing To: Marco Elver Cc: Brendan Higgins , David Gow , Arpitha Raghunandan <98.arpi@gmail.com>, Theodore Ts'o , Iurii Zaikin , Andreas Dilger , "Bird, Tim" , "open list:KERNEL SELFTEST FRAMEWORK" , KUnit Development , Linux Kernel Mailing List , linux-kernel-mentees@lists.linuxfoundation.org, linux-ext4@vger.kernel.org, Shuah Khan References: <20201116054035.211498-1-98.arpi@gmail.com> <505b8cd0-a61e-5ec3-7e0b-239d0ff55d56@linuxfoundation.org> From: Shuah Khan Message-ID: Date: Wed, 2 Dec 2020 15:58:41 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On 12/1/20 4:31 PM, Marco Elver wrote: > On Tue, 1 Dec 2020 at 23:28, Shuah Khan wrote: >> >> On 11/30/20 3:22 PM, Brendan Higgins wrote: >>> On Mon, Nov 23, 2020 at 11:25 PM David Gow wrote: >>>> >>>> On Mon, Nov 23, 2020 at 9:08 PM Marco Elver wrote: >>>>> >>>>> On Tue, 17 Nov 2020 at 08:21, David Gow wrote: >>>>>> On Mon, Nov 16, 2020 at 1:41 PM Arpitha Raghunandan <98.arpi@gmail.com> wrote: >>>>>>> >>>>>>> Implementation of support for parameterized testing in KUnit. This >>>>>>> approach requires the creation of a test case using the >>>>>>> KUNIT_CASE_PARAM() macro that accepts a generator function as input. >>>>>>> >>>>>>> This generator function should return the next parameter given the >>>>>>> previous parameter in parameterized tests. It also provides a macro to >>>>>>> generate common-case generators based on arrays. Generators may also >>>>>>> optionally provide a human-readable description of parameters, which is >>>>>>> displayed where available. >>>>>>> >>>>>>> Note, currently the result of each parameter run is displayed in >>>>>>> diagnostic lines, and only the overall test case output summarizes >>>>>>> TAP-compliant success or failure of all parameter runs. In future, when >>>>>>> supported by kunit-tool, these can be turned into subsubtest outputs. >>>>>>> >>>>>>> Signed-off-by: Arpitha Raghunandan <98.arpi@gmail.com> >>>>>>> Co-developed-by: Marco Elver >>>>>>> Signed-off-by: Marco Elver >>>>>>> --- >>>>>> [Resending this because my email client re-defaulted to HTML! Aarrgh!] >>>>>> >>>>>> This looks good to me! I tested it in UML and x86-64 w/ KASAN, and >>>>>> both worked fine. >>>>>> >>>>>> Reviewed-by: David Gow >>>>>> Tested-by: David Gow >>>>> >>>>> Thank you! >>>>> >>>>>> Thanks for sticking with this! >>>>> >>>>> Will these patches be landing in 5.11 or 5.12? >>>>> >>>> >>>> I can't think of any reason not to have these in 5.11. We haven't >>>> started staging things in the kselftest/kunit branch for 5.11 yet, >>>> though. >>>> >>>> Patch 2 will probably need to be acked by Ted for ext4 first. >>>> >>>> Brendan, Shuah: can you make sure this doesn't get lost in patchwork? >>> >>> Looks good to me. I would definitely like to pick this up. But yeah, >>> in order to pick up 2/2 we will need an ack from either Ted or Iurii. >>> >>> Ted seems to be busy right now, so I think I will just ask Shuah to go >>> ahead and pick this patch up by itself and we or Ted can pick up patch >>> 2/2 later. >>> >>> Cheers >>> >> >> I am seeing >> >> ERROR: need consistent spacing around '*' (ctx:WxV) >> #272: FILE: include/kunit/test.h:1786: >> + typeof((array)[0]) *__next = prev ? ((typeof(__next)) prev) + 1 : >> (array); \ >> ^ >> >> Can you look into this and send v10? > > This is a false positive. I pointed this out here before: > https://lkml.kernel.org/r/CANpmjNNhpe6TYt0KmBCCR-Wfz1Bxd8qnhiwegwnDQsxRAWmUMg@mail.gmail.com > > checkpatch.pl thinks this is a multiplication, but this is a pointer, > so the spacing here is correct. > Thank you for confirming. I will apply this. thanks, -- Shuah