Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp58141pxu; Wed, 2 Dec 2020 15:00:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJz5u6zltJxqNLN5b5jAHFKgyoP3854EvSvQqHihVtbrlrRjD8zRla9wrCd5fHlITRZsavZE X-Received: by 2002:adf:e788:: with SMTP id n8mr405178wrm.84.1606950048231; Wed, 02 Dec 2020 15:00:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606950048; cv=none; d=google.com; s=arc-20160816; b=wxNE+JoIi2lVtlfDEqKHy2VU+K5d/kqHqomeMT0zofJNwalkgx3DpvP7avlKmxBJmC k+59H0vjyEeA78aAVXjHE4g3fr8oi3OSmdZWK57/B0fE6nbc9MDsoP1CtYZWDvbsJ2/p vb01FHcbo6GEIb/x1aSNpd++uDLKDPA1OO9DE27GKZ/SUd21RNmAJEJWiNtBMC/Dk+qV hhKXR6oQ0F+8z9l4AYfAWqTlF9wYykFRSdubLUblvv+ZXXVHWoLrtMfR2O3EG3yu7K2M tAC43h4vZFxTiqYU6OE5b4OWUsab44/SnNri6t6pYlcl1mPv8jJ1b7uaKd2u/2KAyRRg rfNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=5cB+/vzqNyGLlY6gjXLdgcPyiXRJ9zfEjY/dw9Idssc=; b=O5uwC5dWuvow0oylQSVapyHjDfI60kVfYuoKCrGcoWnIxoWjGL16w0guvTSW0tPPl4 /ottQgLWGj2rXePlSgS5D0yWvs4h0l0r25Vq4jznYWmd9pHVzadrpprx1/q1wse8Ppt5 DdJyevsc8rRuNM648IsvMf+QQpaTkWqB9HaJPdmySy6nTVaP2ePjB/pP7baeWw1w/Wnq J35IsorzcecCO0p398fDfJeFzRjUM5GBC4ihGIXqRLMeeArK+Pq/tXQrjOuD+2wXmhDJ k3CO/MXDde3mxSYsfQEhuPhFHj0eukLOsd4vJkt/Kvt8AGsJHjq/uxFj2e+NMWSZJdYL G5Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b="X8557/Aa"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n4si126724eda.607.2020.12.02.15.00.24; Wed, 02 Dec 2020 15:00:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b="X8557/Aa"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387842AbgLBW7Y (ORCPT + 99 others); Wed, 2 Dec 2020 17:59:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387787AbgLBW7X (ORCPT ); Wed, 2 Dec 2020 17:59:23 -0500 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72DECC0617A6 for ; Wed, 2 Dec 2020 14:58:43 -0800 (PST) Received: by mail-io1-xd44.google.com with SMTP id r9so67998ioo.7 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=GWr37ywUooDP5iqOPs8LvemYnSqUX5WVJuTUfhUCNAWqSSCDkJ9jNfmrfy3xwf7gBz Bam9qBF1qKww2zCyQjR/D4c7z0NQbkHFWG4x3I5pYp6DcNEWrTU1TekgzUplTVSXBj0n ULR2gMxCVSsmA00nG7/FC6s1sPgMReSZBh2iZa5G5CeIi0s776UHs734nwh7miFnox6g fMgQm7tF3pUQuUgx3UBcLX4rqQdntt8VVP9FaoIjpRFcZ/JgJ7aFWPWFqHrTSUMAISHE BlofhJ9MBjq9RskjDM4/2VVGcaq/yLgP0zU+35c3jLf1e0uUoG2uVlGCDIn6+xhe17+/ LpxQ== X-Gm-Message-State: AOAM531jManANHByYXFW2fTHtEK5JWrigbtEVOegHKZJkcEIFBl9XNCz KrmEJbmfoVxqdxiwZdNLRcs6IQ== 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-ext4@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