Received: by 2002:a05:6512:404:0:0:0:0 with SMTP id u4csp504564lfk; Wed, 15 Jun 2022 07:29:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u5PR3L3fu+RTesjXrWETOHMNrJzADfgMT64nMUB7+OR1Y7xuQXHP+C/zkDvICCtT2Y3z9a X-Received: by 2002:a05:6402:1692:b0:42d:e291:67f3 with SMTP id a18-20020a056402169200b0042de29167f3mr4095edv.392.1655303397549; Wed, 15 Jun 2022 07:29:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655303397; cv=none; d=google.com; s=arc-20160816; b=J3ZedqCWuYw3TMm/FObmcMZiHZfTgjRWlJOtsv5ginLsLWFMvYvDha7m2bfqLsu97C 76XkRLwtQ0aRE3LQIxX+QY6i8MyE97zg8B+KJmCWJ0WG0DP1cJgLY9esiyEAnHFDNe4j eHx0RFQ7dQoA+NZYOI8m6IKRzjpYBLQ3rXI40iwze1kJxNQ1ogZ/EzcMvIPRbpSxWkOk bXxoZPlvjEkhaOkWyUX/2qcVy3vI/lGqZJuoh8F5HBQnSntMwoPrcTat+jdF3SBTZjSk 0P9GSZ8cIM0i/Tro8MKBEjCx7SbBKhusXgFnBDYEBYnTwlrTddzBH551YI25+39SJonP t4cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=HtsboVTHSE/bkA7u3/jbXe0vzCJv+VUAjBvhjsMRO98=; b=Qqmt/jeBbkPl4a5ZWySNfodxw8w7UD1lCbu77bJq4DgwMUNGZ8I4+wGELsZzphIcxs my8jS4Q2petS2JH4E9QAWQuhg5gl0VWMHRy5Na6hSXTucmENSSsxuBJZgFrf2ALcWZOx Hgxw/vnW/S0HJ8v8ddwLzqY0zEGvbFDEU2SBZ2sLIgigORz4u/z26c1iohiMoskWgT2V TZeWt8ywoq3GxrRGRtLBAyZ6OofgdCV5C8MNsQAVABzSEnHxFAna7YV4KXUjpohc22sT f6eP4RRnlSxYEPdh0Acj6q4Nw0lkQxIv1oSQSJ/n7WCL1u3zeBjmEp0hcPATqmw9OJvD VALQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@usp.br header.s=usp-google header.b=mpSXxXmF; 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=QUARANTINE sp=NONE dis=NONE) header.from=usp.br Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hb36-20020a170907162400b0071209f03c59si16768300ejc.630.2022.06.15.07.29.29; Wed, 15 Jun 2022 07:29:57 -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=@usp.br header.s=usp-google header.b=mpSXxXmF; 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=QUARANTINE sp=NONE dis=NONE) header.from=usp.br Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354423AbiFON7X (ORCPT + 99 others); Wed, 15 Jun 2022 09:59:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353786AbiFON7Q (ORCPT ); Wed, 15 Jun 2022 09:59:16 -0400 Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99BD320BD9 for ; Wed, 15 Jun 2022 06:59:09 -0700 (PDT) Received: by mail-ot1-x330.google.com with SMTP id 111-20020a9d0378000000b0060c2db66d44so8880131otv.6 for ; Wed, 15 Jun 2022 06:59:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=usp.br; s=usp-google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HtsboVTHSE/bkA7u3/jbXe0vzCJv+VUAjBvhjsMRO98=; b=mpSXxXmFCTMA/3nFJ4hzQIM91fTrCxP3+7WEvIzazeD7EJmSJT6aqC5BPE+KaWdGTy tqHeivqZD2o8hv9xrpyCqlKYQNbIZTE9fEt4EF6lKzd9GiR2c+wVtWwFanyrL9Vs61ut LlVrMrWDQ2IrERN6/GEnzd37ofFlEA27kIkJdHYcqTV94bKpEcv5aboRr7/MyVNzLRd1 ktqO0Pj3MDhnU6TZZhGNpLJzIerX/wtfHMZTNGeGpNODgyHpSuP+qg2k7PcATRBskFrX pcfHktKZ93+5UAF+cuAMRVPHdj8PZesv4zKl4KEPct14KAfiaYYmOiuFMrC//rARPEuv bZNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HtsboVTHSE/bkA7u3/jbXe0vzCJv+VUAjBvhjsMRO98=; b=6ObjwFstpd8iGPw+JYCLphZrMh++GbdxgbX5Hhl2cZzMXJn4tzvVAcfYi5AQ5Cdio+ AoWK9CDuCU9xtzv6fNCxlACaDP1rO7ezydZ0jUwU3Z1OLfxIXB42ZTrtjXlgHh2bX0EB i224rBno2DhISnwdUCkdW92q3aaCbZBWvB8IJXtNbI/JwN/IJVp0yAcJLKJ1ABdYUVqA Uq6+44TiMl6pPA5PGnq2cig1KEN2gHTSbYewefbNn9uNEq4BTxdWBGtRV+nFbmEnCvBq 6BONf2++gVijG1QR6vyVd40zEA/AlL/UbIN3gbxzoqPPL2Pv+2cFdT70Xqmb6SOF8/aa t+0Q== X-Gm-Message-State: AOAM533G0coH6fCbPTpBB8dxDzS3dWWabIa/80LC65Aoj/BOnEpbi2ra 4XtZECkQUtWM8LmpwVPguH4nBA== X-Received: by 2002:a05:6830:87:b0:60c:2c2c:adaa with SMTP id a7-20020a056830008700b0060c2c2cadaamr4254321oto.188.1655301548845; Wed, 15 Jun 2022 06:59:08 -0700 (PDT) Received: from fedora.. ([2804:14d:8084:84c6:fe26:c42d:aab9:fa8a]) by smtp.gmail.com with ESMTPSA id u7-20020a056830248700b0060bfebb96e5sm6056928ots.35.2022.06.15.06.59.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jun 2022 06:59:08 -0700 (PDT) From: =?UTF-8?q?Ma=C3=ADra=20Canal?= To: 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?q?Jos=C3=A9=20Exp=C3=B3sito?= , David Gow , Daniel Latypov , brendanhiggins@google.com Cc: dri-devel@lists.freedesktop.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com, =?UTF-8?q?Ma=C3=ADra=20Canal?= Subject: [PATCH 00/10] drm: selftest: Convert to KUnit Date: Wed, 15 Jun 2022 10:58:14 -0300 Message-Id: <20220615135824.15522-1-maira.canal@usp.br> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 KUnit unifies the test structure and provides helper tools that simplify the development of tests. The basic use case allows running tests as regular processes, which makes it easier to run unit tests on a development machine and to integrate the tests into a CI system. That said, the conversion of selftests for DRM to KUnit tests is beneficial as it unifies the testing API by using the KUnit API. KUnit is beneficial for developers as it eases the process to run unit tests. 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=drivers/gpu/drm/tests --arch=x86_64 For CI system, it is possible to execute during the build. But, we also think about IGT: we are developing a patch to introduce KUnit to IGT. These patches were developed during a KUnit hackathon [0] last October. Now, we believe that both the IGT side and the Kernel side are in good shape for submission. If you are willing to check the output, here is the Pastebin with the output 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íra Canal Arthur Grillo (2): drm: selftest: refactor drm_cmdline_parser drm: selftest: convert drm_mm selftest to KUnit Maíra Canal (8): drm: selftest: convert drm_damage_helper selftest to KUnit drm: selftest: convert drm_cmdline_parser selftest to KUnit drm: selftest: convert drm_rect selftest to KUnit drm: selftest: convert drm_format selftest to KUnit drm: selftest: convert drm_plane_helper selftest to KUnit drm: selftest: convert drm_dp_mst_helper selftest to KUnit drm: selftest: convert drm_framebuffer selftest to KUnit drm: selftest: convert drm_buddy selftest to KUnit drivers/gpu/drm/Kconfig | 20 +- drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/selftests/Makefile | 8 - .../gpu/drm/selftests/drm_buddy_selftests.h | 15 - .../gpu/drm/selftests/drm_cmdline_selftests.h | 68 - drivers/gpu/drm/selftests/drm_mm_selftests.h | 28 - .../gpu/drm/selftests/drm_modeset_selftests.h | 40 - drivers/gpu/drm/selftests/drm_selftest.c | 109 -- drivers/gpu/drm/selftests/drm_selftest.h | 41 - drivers/gpu/drm/selftests/test-drm_buddy.c | 994 -------------- .../drm/selftests/test-drm_cmdline_parser.c | 1141 ----------------- .../drm/selftests/test-drm_damage_helper.c | 667 ---------- drivers/gpu/drm/selftests/test-drm_format.c | 280 ---- .../drm/selftests/test-drm_modeset_common.c | 32 - .../drm/selftests/test-drm_modeset_common.h | 52 - drivers/gpu/drm/tests/.kunitconfig | 3 + drivers/gpu/drm/tests/Kconfig | 130 ++ drivers/gpu/drm/tests/Makefile | 10 + drivers/gpu/drm/tests/test-drm_buddy.c | 748 +++++++++++ .../gpu/drm/tests/test-drm_cmdline_parser.c | 799 ++++++++++++ .../gpu/drm/tests/test-drm_damage_helper.c | 633 +++++++++ .../test-drm_dp_mst_helper.c | 82 +- drivers/gpu/drm/tests/test-drm_format.c | 284 ++++ .../test-drm_framebuffer.c | 25 +- .../drm/{selftests => tests}/test-drm_mm.c | 1135 +++++++--------- .../test-drm_plane_helper.c | 101 +- .../drm/{selftests => tests}/test-drm_rect.c | 124 +- 27 files changed, 3240 insertions(+), 4331 deletions(-) delete mode 100644 drivers/gpu/drm/selftests/Makefile delete mode 100644 drivers/gpu/drm/selftests/drm_buddy_selftests.h delete mode 100644 drivers/gpu/drm/selftests/drm_cmdline_selftests.h delete mode 100644 drivers/gpu/drm/selftests/drm_mm_selftests.h delete mode 100644 drivers/gpu/drm/selftests/drm_modeset_selftests.h delete mode 100644 drivers/gpu/drm/selftests/drm_selftest.c delete mode 100644 drivers/gpu/drm/selftests/drm_selftest.h delete mode 100644 drivers/gpu/drm/selftests/test-drm_buddy.c delete mode 100644 drivers/gpu/drm/selftests/test-drm_cmdline_parser.c delete mode 100644 drivers/gpu/drm/selftests/test-drm_damage_helper.c delete mode 100644 drivers/gpu/drm/selftests/test-drm_format.c delete mode 100644 drivers/gpu/drm/selftests/test-drm_modeset_common.c delete mode 100644 drivers/gpu/drm/selftests/test-drm_modeset_common.h create mode 100644 drivers/gpu/drm/tests/.kunitconfig create mode 100644 drivers/gpu/drm/tests/Kconfig create mode 100644 drivers/gpu/drm/tests/Makefile create mode 100644 drivers/gpu/drm/tests/test-drm_buddy.c create mode 100644 drivers/gpu/drm/tests/test-drm_cmdline_parser.c create mode 100644 drivers/gpu/drm/tests/test-drm_damage_helper.c rename drivers/gpu/drm/{selftests => tests}/test-drm_dp_mst_helper.c (73%) create mode 100644 drivers/gpu/drm/tests/test-drm_format.c rename drivers/gpu/drm/{selftests => tests}/test-drm_framebuffer.c (96%) rename drivers/gpu/drm/{selftests => tests}/test-drm_mm.c (58%) rename drivers/gpu/drm/{selftests => tests}/test-drm_plane_helper.c (62%) rename drivers/gpu/drm/{selftests => tests}/test-drm_rect.c (53%) -- 2.36.1