Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1513862iog; Thu, 16 Jun 2022 07:57:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u/PEV0FW1qj7hWnj8s1MElIyQCJVZ5O+qhq6eolygA7LYjmnjcCJq5qLa2V4jIHDY6JR0i X-Received: by 2002:a17:902:ecc1:b0:167:74c3:55b1 with SMTP id a1-20020a170902ecc100b0016774c355b1mr5042250plh.108.1655391437252; Thu, 16 Jun 2022 07:57:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655391437; cv=none; d=google.com; s=arc-20160816; b=mw+AE+W6asWiOx2OTclGNlD3Cia2v8OEmNB06n5DLB4IFPK1Ew3mNte6TXbpHPxGRM lYPiRj1hBvk28qNZ8QWEevuhSGHSCWyy0bXOD5bzSohTU8CdvWDPH+hQOirG+5nyu0F7 4aFFxObCpfT4KIBIZ+rmcJp2PTjo1osMeBwH4iG0bbuwGKcpetZOQt6E5QBy+blz/U+K LRibKkBV69M5SRrl9HOCmF1HqWGbH+vsdVF4fM15wDQEwO+A6cAjR+7FGaSwzQ9bWbT/ 9Pk/2hM5CM3Dt1bJqTDcOV9NgVeoj8a19FjpPGhVhV/RQYTVAp6b52nBQs5Jj4XcxmBb iskg== 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=i61TpzN79pFd8jTgYBxbOsIXd3ZePgcEGIUlQDrP1oA=; b=0wM1aiPo+OhlhxGjLp/dCofJjTw4prFZk5X1DyTiLSfEqGG2efDOckezHj6xce3UL5 F+FEz2aaMriIAIU5xVcCz7dFAnLY21by2HbcXDh9LYCk3v4fNAT38pT7yXaqReSli1IU f5eh8M9iw49HWMCST1kusLMmgnrI8cmOLWWD+iUy2NixcfkrvMqCyRdaYiOON56fx798 T7Scx1pBxizRVlqVq5QmdcKmMmthWPKxbttMa8vfQuCCk2x/qt7fa9GVsKsnplPcRzA9 1xsej/neG0XmFF520U3wOk4WguREHjfgosCbmmCWywL06fLtrShETs4ZcydqbSImKDJ3 E1OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="M/0k6QEA"; 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 s13-20020a63f04d000000b003fccd1c49easi2499935pgj.158.2022.06.16.07.57.04; Thu, 16 Jun 2022 07:57:17 -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=20210112 header.b="M/0k6QEA"; 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 S1377416AbiFPOzY (ORCPT + 99 others); Thu, 16 Jun 2022 10:55:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377403AbiFPOzW (ORCPT ); Thu, 16 Jun 2022 10:55:22 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3501E326C3 for ; Thu, 16 Jun 2022 07:55:21 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id o16so2216364wra.4 for ; Thu, 16 Jun 2022 07:55:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=i61TpzN79pFd8jTgYBxbOsIXd3ZePgcEGIUlQDrP1oA=; b=M/0k6QEAATbj8kUW5XwyTvB1JajbQWDuSL/nFsg2g4nuZM6ljYMq0q3I0sLs2205Dl 9Pewsmz/LnfdEd+7a2J0V9T4JScjQUlSwbRcl9v7EWkC2nsARiDxxKfrOGQvMTPLjVXF Bt6OjKJuvmG6yndpzucExvXSGXyHVv+ffey0bSoaGLk94nMaxPao93IKOcDj48zpuG/M 9cH6aBjoaQOkknW2oQlhQ3N7WbWeNVf7WPjwpGNE11abmuMGgRxBiXgony8A2AY9bTPA dRhUeY37FIi4i5E79o/M5TRMbzmHFmcBj9+M60rkByb2PgJT5hKqaHRN6enYys9bDtUn PFbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=i61TpzN79pFd8jTgYBxbOsIXd3ZePgcEGIUlQDrP1oA=; b=kNtXjoWhGUeO+EDOi2lirQ/OIVq0ZX+MfbVdBZEF0mv1l0M8u7VVbedtEo0LKXLk5o PJJKKrqL9ty0+qzdMy2mvMWSs7fXygpEDXHV/m9uG/5XeT2fHBIuyo+EW3AK/BAtR6uY xd8a9GuLLitA7HP+bcfjD5roroQy8pppeBu+lXCaPJcrNH/7x45oBbSX06wFNnPu0gaC v/jnh7Wub8dwNI4bmYugL0gsCG47Wh3BpgfU+oHvcY7QMIWTDPtomuJB2BvyaAFT0Jsb buIfghuAfnnTqZnsRpwnlO9Kq8kRcK9Zc/uqgyI8JP13E11FBREDTbxxk1A1Fnw41+s1 NaLA== X-Gm-Message-State: AJIora96pP3jCOPbHtTzALySd0e0VF59iuS3xPW7QIFwNbKfQSl8sUms ifVqS+q5+/bEmVU/c2mdUO702w6vTcPQqMLi8koiKg== X-Received: by 2002:a05:6000:1889:b0:218:4de1:25a3 with SMTP id a9-20020a056000188900b002184de125a3mr5084396wri.622.1655391319594; Thu, 16 Jun 2022 07:55:19 -0700 (PDT) MIME-Version: 1.0 References: <20220615135824.15522-1-maira.canal@usp.br> In-Reply-To: <20220615135824.15522-1-maira.canal@usp.br> From: David Gow Date: Thu, 16 Jun 2022 22:55:08 +0800 Message-ID: Subject: Re: [PATCH 00/10] drm: selftest: Convert to KUnit To: =?UTF-8?B?TWHDrXJhIENhbmFs?= Cc: Isabella Basso , magalilemes00@gmail.com, tales.aparecida@gmail.com, mwen@igalia.com, andrealmeid@riseup.net, Trevor Woerner , leandro.ribeiro@collabora.com, n@nfraprado.net, Daniel Vetter , Shuah Khan , David Airlie , Maxime Ripard , Thomas Zimmermann , michal.winiarski@intel.com, Javier Martinez Canillas , =?UTF-8?B?Sm9zw6kgRXhww7NzaXRv?= , Daniel Latypov , Brendan Higgins , dri-devel@lists.freedesktop.org, "open list:KERNEL SELFTEST FRAMEWORK" , Linux Kernel Mailing List , KUnit Development 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=ham 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 Wed, Jun 15, 2022 at 9:59 PM Ma=C3=ADra Canal wrote= : > > KUnit unifies the test structure and provides helper tools that simplify > the development of tests. The basic use case allows running tests as regu= lar > processes, which makes it easier to run unit tests on a development machi= ne > and to integrate the tests into a CI system. > > That said, the conversion of selftests for DRM to KUnit tests is benefici= al > as it unifies the testing API by using the KUnit API. > > KUnit is beneficial for developers as it eases the process to run unit te= sts. > It is possible to run the tests by using the kunit-tool on userspace with= the > following command: > > ./tools/testing/kunit/kunit.py run --kunitconfig=3Ddrivers/gpu/drm/tests = --arch=3Dx86_64 > > For CI system, it is possible to execute during the build. But, we also t= hink > about IGT: we are developing a patch to introduce KUnit to IGT. > > These patches were developed during a KUnit hackathon [0] last October. N= ow, > we believe that both the IGT side and the Kernel side are in good shape f= or > submission. > > If you are willing to check the output, here is the Pastebin with the out= put > and execution times [1]. > > [0] https://groups.google.com/g/kunit-dev/c/YqFR1q2uZvk/m/IbvItSfHBAAJ > [1] https://pastebin.com/FJjLPKsC > > - Arthur Grillo, Isabella Basso, and Ma=C3=ADra Canal Great to see these going upstream! I've tested them on my machine, both with x86_64 qemu and with UML using: ./tools/testing/kunit/kunit.py run --kunitconfig=3Ddrivers/gpu/drm/tests/.kunitconfig \ --kconfig_add CONFIG_UML_PCI_OVER_VIRTIO=3Dy \ --kconfig_add CONFIG_VIRTIO_UML=3Dy And all 114 tests pass, and everything looks good. My only minor notes (from a quick look at the results, rather than a detailed review of the code) are that the test names have a few small oddities: - The suites all end in _tests (or _test, in the case of drm_plane_helper_test). This is a bit redundant (and while there is only one drm_plane_helper_test, the inconsistency with the others is a bit awkward), so removing the suffix may be cleaner. (Or at least being optimistic, and making drm_plane_helper_test plural.) - The drm_cmdline_parser_tests suite's tests have some inconsistencies name-wise: they're the only ones to start with drm_, not igt_, and they have a few capital letters in some of the 'drm_cmdline_test_force_D_' tests. (It's also technically redundant to start all of the test names with drm_cmdline_test, given the suite name.) Of course, if you're trying to keep compatibility with existing tests or tooling, or there's some deeper reason they're named like this, it's definitely not a dealbreaker. Either way, this whole series is: Tested-by: David Gow Cheers, -- David