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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_1 autolearn=no 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 A41CBC48BE0 for ; Fri, 11 Jun 2021 10:48:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 869E0613F4 for ; Fri, 11 Jun 2021 10:48:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230230AbhFKKud (ORCPT ); Fri, 11 Jun 2021 06:50:33 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:40004 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229633AbhFKKud (ORCPT ); Fri, 11 Jun 2021 06:50:33 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: tonyk) with ESMTPSA id 9E4151F44523 Subject: Re: [PATCH v3 0/1] lib: Convert UUID runtime test to KUnit To: Andy Shevchenko Cc: Christoph Hellwig , linux-kernel@vger.kernel.org, Brendan Higgins , linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, Shuah Khan , ~lkcamp/patches@lists.sr.ht, nfraprado@collabora.com, leandro.ribeiro@collabora.com, Vitor Massaru Iha , lucmaga@gmail.com, David Gow , Daniel Latypov , tales.aparecida@gmail.com References: <20210610163959.71634-1-andrealmeid@collabora.com> From: =?UTF-8?Q?Andr=c3=a9_Almeida?= Message-ID: <7ad34395-2b62-58fb-8a63-7b4899460290@collabora.com> Date: Fri, 11 Jun 2021 07:48:26 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Hi Andy, Às 06:55 de 11/06/21, Andy Shevchenko escreveu: > On Thu, Jun 10, 2021 at 01:39:58PM -0300, André Almeida wrote: >> Hi, >> >> This patch converts existing UUID runtime test to use KUnit framework. >> >> Below, there's a comparison between the old output format and the new >> one. Keep in mind that even if KUnit seems very verbose, this is the >> corner case where _every_ test has failed. > > Btw, do we have test coverage statistics? > > I mean since we reduced 18 test cases to 12, do we still have the same / better > test coverage? > I don't think we have automated statistics, but I can assure you that the coverage it's exactly the same. We are testing two correlated functions with the same input, in a single test case, instead of having a single case for each one, so that's why the number of cases is reduced. For example, instead of: total_tests++; if (guid_parse(data->uuid, &le)) total_tests++; if (!guid_equal(&data->le, &le)) We now have: KUNIT_ASSERT_EQ(guid_parse(data->guid, &le), 0) KUNIT_EXPECT_TRUE(guid_equal(&data->le, &le)) That will count as a single test.