Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp699089rdb; Sun, 3 Sep 2023 06:45:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG1yda1GoCTN3K42sRsG7/Hf2pTaRU0wKqPdlxBiThfkoewRgPFLrnax9VJ+NXQFCLJnr2G X-Received: by 2002:a19:2d17:0:b0:500:9a45:636 with SMTP id k23-20020a192d17000000b005009a450636mr4305886lfj.13.1693748721058; Sun, 03 Sep 2023 06:45:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693748721; cv=none; d=google.com; s=arc-20160816; b=vZl228Sl+uZQpdW3q+tGEHWVo5bxXgR2XhLBWOr+IrzM4D5XuK3cql2y8IUTvAWUaC WclXZdWJqA0VjvDfhYnuB9GtO5qiOCxeAHuRd81pNFXDczXEXPxbqep9GX5Yznrbjjd8 LM3F166OG2vOctyoJuwgCeBCk11bFKbrBHzr9Yvx8nlma6FYaRN//60r3EVMgxsGy9lV ZHDNsOkxzuCykXD69m+tmCXoMstzFbiwcVbccakk9aQ8p6Y79FJd3jOVQIYVX+36R7gh mkptvrznFO5Y9HFL34rdy5IoXwbjylBPLr6GtghqLiphhOIhZRaWCo4jSBb0PWOo2baH rP1g== 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=2ft5rJDKMwmfJZMs7TYfAMzqGR0PTtanz/gkfkCqU00=; fh=ej079nFUNE+xs7EeILX606Bpz67j9WzXz/vfmQ4DMs0=; b=ar87204/TLRGwXDejgx4gVQitsiy91IPSTkKgkefexEjNd+8SArggY+5/jzlfxRVpZ CuDwjnsBnXOu2DwVuFpWWekMtrvFw0miCqO6+leLOa6Xs7OnmK8p7HBj7PDlw45DTvc/ fxkEbZPd+Tm9nk/1H8QZACgHO4UScQJXHBqMpvViGd05OSCA7LXGofIDNmxFMGhrmdok N2UuCaKv0Js3BbC3R9fN+bfaY96aJZUT/yWb0ChkOIhHKHE3EDslqzNaCjX4yzkGIFht vnTqThbaj7NiK28rIK2ag7WFmrTvAExHC8oQE3lAHCIScH6zaYJWuWo3ABb4vKDA4iMz M+ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dK1TCwB8; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u6-20020aa7d0c6000000b005231f38ea66si5060229edo.680.2023.09.03.06.44.52; Sun, 03 Sep 2023 06:45:21 -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=@kernel.org header.s=k20201202 header.b=dK1TCwB8; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348404AbjIAGv3 (ORCPT + 99 others); Fri, 1 Sep 2023 02:51:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232387AbjIAGv2 (ORCPT ); Fri, 1 Sep 2023 02:51:28 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5117E7E; Thu, 31 Aug 2023 23:51:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id CAD5ACE21FD; Fri, 1 Sep 2023 06:51:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 092B1C433C7; Fri, 1 Sep 2023 06:51:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1693551080; bh=js9V0rYp6XYv+sNWXNaad1vvLDDI3kITo4+FFHg6IZ4=; h=From:To:Cc:Subject:Date:From; b=dK1TCwB8xgpNHT5VTEfDLlrKFXdbNEUet+spzHTj5hdIITxB+KCTP19YZs+EsoDp1 76rqHKzo/rHYaqpoky6Bqc/bLMsUCRSoUmTBGp/khHwlSwv1jyVteVVAv1MXZF1Xbn ZITjw1kkDAtPWaOstpygCbmUGBzjFXPJ1xR+8oIUkMsIzo/4BsGUx5q235yn5Dw00X VgJeEhSVDr/RrFRgwlOSqHgxnDEcGvtOJoqEYm+YV1D76Gf1qWbIAM4Ha5N3pKpYDw gWvbHlEOY+u8kD6jGqgLvgp+exml8pYOjxZuUuZP7BekAEQGD8mthUuR4kEdZSYzGd ZcsUGNYU6f5+w== Received: from mchehab by mail.kernel.org with local (Exim 4.96) (envelope-from ) id 1qbxzw-0012V8-1t; Fri, 01 Sep 2023 08:51:16 +0200 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Jonathan Corbet , Daniel Vetter , David Airlie , dri-devel@lists.freedesktop.org Subject: [PATCH 0/2] Add support for inlined documentation for kunit and kselftests Date: Fri, 1 Sep 2023 08:51:04 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 This is a follow-up of the discussions taken here: https://lore.kernel.org/linux-doc/20230704132812.02ba97ba@maurocar-mobl2/T/#t I sent a previous version as RFC. This is basically what we had there, with some improvements at test_list.py. It adds a new extension that allows documenting tests using the same tool we're using for DRM unit tests at IGT GPU tools: https://gitlab.freedesktop.org/drm/igt-gpu-tools. While kernel-doc has provided documentation for in-lined functions/struct comments, it was not meant to document tests. Tests need to be grouped by the test functions. It should also be possible to produce other outputs from the documentation, to integrate it with test suites. For instance, Internally at Intel, we use the comments to generate DOT files hierarchically grouped per feature categories. This is meant to be an initial series to start documenting kunit. It comes with a documenation for a kunit suite from drm at drm_buddy_test.c. My plan is that, once we get this merged, start documenting other unit tests and work to add extra requirements at the tool needed by Linux Kernel. On this series, we have: - patch 1: adds test_list.py - which is identical to the file with the same name I developed for IGT tree; - patch 2: adds test documentation from a single DRM kunit file (drm_buddy_test.c). Mauro Carvalho Chehab (2): docs: add support for documenting kUnit and kSelftests drm: add documentation for drm_buddy_test kUnit test Documentation/conf.py | 2 +- Documentation/index.rst | 2 +- Documentation/sphinx/test_kdoc.py | 108 ++ Documentation/sphinx/test_list.py | 1314 ++++++++++++++++++++++++ Documentation/tests/index.rst | 6 + Documentation/tests/kunit.rst | 5 + drivers/gpu/drm/tests/drm_buddy_test.c | 12 + 7 files changed, 1447 insertions(+), 2 deletions(-) create mode 100755 Documentation/sphinx/test_kdoc.py create mode 100644 Documentation/sphinx/test_list.py create mode 100644 Documentation/tests/index.rst create mode 100644 Documentation/tests/kunit.rst -- 2.41.0