Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4840711pxv; Tue, 27 Jul 2021 18:39:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJnh6vxY9Pbhh0ntHwtmR0Z8yY/UeOZaMjUIsq1MOHRWW3Zzpgi/yi7vbptC0gg81ugZ4v X-Received: by 2002:a92:3302:: with SMTP id a2mr19002183ilf.62.1627436341463; Tue, 27 Jul 2021 18:39:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627436341; cv=none; d=google.com; s=arc-20160816; b=AQJaZNYEEAMOiBfYqeShOzAKWiNVJzaBnAkFjdHpGJKRjFTFknf0lijO21wvBSFWW4 t9YdEOnr4WjFUT5xMc2iNhjM6Ot/dPXI7RJbjd0Tri8+Fd7cPNykfhW8lISKFY+NKSDG bdwXcQUrsboN/0adRzwGtWHOTujybRPuBJxpIOWCiA2KFdfWZEnwzIE+xXzwILEoNRFJ W07f9l+tcreU4wk8Q37LP8ppuiSb1Y2T0zQWtTJs73z2O+P1INI7RP+mcTYYtv6Avh8p 2Bfsc6fkFLWENUX9PdpRFHgoH78lnhKsigKnjVgDD7x6I9ft5dRWgEGva2EVRMfH0EA8 QxDw== 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=dNawNorpn3/ehRW9KZSQYGcu+t9pcL5tKP9IjSkZ/ic=; b=YLsNQft2M4tq9Wc1sQVXpb9pQkgRUqQ5R+AXUoDJmNfnOtDMmyDRPLv5sVOwYvjI7u gK2J/egfxgcIKRvWrh5drLI9EcyqcCSQSoJ2xop6UjI3ZIv291mpaQEFmNy9YYN6VKFO CzA6jPXJ38C+r7uTX0LLe+M1qFv/UPJGCN2BNgHq5/vlG6VIAJHYNuPQ0RDqjRaOjzQ3 xF/f7kJHXGkYAM8H8Wve/LhF7KBJCKIJ0ICDBha6QCUnoy3nwPQ1RhBGUMxW4wCyUpjV fSHyZ8onjogCMC7lgV2W4/UO9E+uiRmiW+qUOw7TN4IDNCNEhMtI9crhbT5p5usN8JAl QmMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=cIFaLdm5; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y13si5450179ioq.14.2021.07.27.18.38.49; Tue, 27 Jul 2021 18:39:01 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=cIFaLdm5; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234691AbhG1Bhw (ORCPT + 99 others); Tue, 27 Jul 2021 21:37:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234193AbhG1Bhv (ORCPT ); Tue, 27 Jul 2021 21:37:51 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C109BC061764 for ; Tue, 27 Jul 2021 18:37:50 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id f14-20020a05600c154eb02902519e4abe10so3149141wmg.4 for ; Tue, 27 Jul 2021 18:37:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=dNawNorpn3/ehRW9KZSQYGcu+t9pcL5tKP9IjSkZ/ic=; b=cIFaLdm5pLV2s8UfdlKSzTILToy3SXyMJYCr43IQZLoLGD6voXarNaaAobYCR0NSto 6UVYPaoKMp0/tVjgzo7d1I552/CEwGhM1jaOcC7tZZS8fZa1q8RalmdMk7ksBt7mE3hZ 8xv7yF3sgQjarEmBeuyXeMMHN/8DcYIWknYI8xH6ATt/lS9UIVgwjAxvgn7MsVhogBQs Kq8RgoQmmjDa3Cg+eAgtzOTvRpLRxLco+HtiorB5OeVpry1fVLDeWeokbXNB5yFZe4ga /kyGLrCMEuvbKrla/IbGr3VsF19dcsSaojASfm53Y5bUSQYPT9eVZYjhEsJrSODZRsSS NWbg== 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:content-transfer-encoding; bh=dNawNorpn3/ehRW9KZSQYGcu+t9pcL5tKP9IjSkZ/ic=; b=iddeE6+9f+XFsyo24EuAvKc1IzWWqyNya1uDEAKZvraWnCmkn2IHlxYErrd+IkwM+L NAE6MNClI6pznKFGX5OQ7NExfmfy/fFW/ajyNrBGZSgH7sb/eQhApNJz4v7Kc7LI9aL3 dNsz0Lf8iHMX1GoHQhiUpbMyZUMiZZPoisuraAaVAkNa6ViVyHOXPcyKEF7C5W+VunEW jQ073N/131taOV+obJm+XK49jMVkTPzmTwDKJit8OG05Ez6xicsjxDM8h5e94upecivR KetSIcehpNl1tWcAdxC8nt5RLGnFMvUb6PFjUVUFHFwx1luSAso5EEj+o2aMpX6RAc02 bZiw== X-Gm-Message-State: AOAM530rV8h9b2xS4Ifor0qzxgssSsJSMcCNTDsJUJuhuD0VXkaT20x5 NiGoYNioSDA1OLAW+PF9kFUNyWYivdmDhrFpCn6EAw== X-Received: by 2002:a1c:1dcf:: with SMTP id d198mr6723188wmd.103.1627436269179; Tue, 27 Jul 2021 18:37:49 -0700 (PDT) MIME-Version: 1.0 References: <20210727225847.22185-1-jjoseaquiless@gmail.com> In-Reply-To: <20210727225847.22185-1-jjoseaquiless@gmail.com> From: David Gow Date: Wed, 28 Jul 2021 09:37:38 +0800 Message-ID: Subject: Re: [PATCH] lib: use of kunit in test_parman.c To: =?UTF-8?Q?Jos=C3=A9_Aquiles_Guedes_de_Rezende?= Cc: Jiri Pirko , Networking , Linux Kernel Mailing List , Brendan Higgins , Daniel Latypov , "open list:KERNEL SELFTEST FRAMEWORK" , ~lkcamp/patches@lists.sr.ht, Matheus Henrique de Souza Silva Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 28, 2021 at 7:04 AM Jos=C3=A9 Aquiles Guedes de Rezende wrote: > > Convert the parman test module to use the KUnit test framework. > This makes thetest clearer by leveraging KUnit's assertion macros > and test case definitions,as well as helps standardize on a testing frame= work. > > Co-developed-by: Matheus Henrique de Souza Silva > Signed-off-by: Matheus Henrique de Souza Silva > Signed-off-by: Jos=C3=A9 Aquiles Guedes de Rezende > --- Thanks for porting this! A few more notes from the KUnit side. > lib/test_parman.c | 145 +++++++++++++++++++--------------------------- > 1 file changed, 60 insertions(+), 85 deletions(-) This seems to be missing changes to lib/Kconfig.debug: you'll want to modify the TEST_PARMAN config item to - depend on KUNIT - only appear if !KUNIT_ALL_TESTS - default KUNIT_ALL_TESTS It might also be nice to: - select PARMAN (it's otherwise extremely unlikely a config will actually pick up the test) - maybe rename TEST_PARMAN to PARMAN_KUNIT_TEST (this is optional, since this is a port of an existing test, but does make it clearer, so it really depends on what existing usage looks like) > > diff --git a/lib/test_parman.c b/lib/test_parman.c > index 35e32243693c..bd5010f0a412 100644 > --- a/lib/test_parman.c > +++ b/lib/test_parman.c The rest of this looks okay to me, but you should check out Daniel's comments in his email, too. Cheers, -- David