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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A61AEC433F5 for ; Thu, 16 Dec 2021 13:16:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237406AbhLPNQc (ORCPT ); Thu, 16 Dec 2021 08:16:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232107AbhLPNQb (ORCPT ); Thu, 16 Dec 2021 08:16:31 -0500 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 CB5F6C06173E for ; Thu, 16 Dec 2021 05:16:30 -0800 (PST) Received: by mail-wm1-x32f.google.com with SMTP id p36-20020a05600c1da400b003457428ec78so546913wms.3 for ; Thu, 16 Dec 2021 05:16:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=89cO30wmGkXDNc+LXsapdFI9ZHdvoiOb4Ut84k4l3oQ=; b=bLwK5hMN2fB2tKrvWDU823tRFJenKqjWILudBAgcNc4NUczgl13StsqoRRPvsu9A2Q 4uo/fCN+CEdFZgy6XUDkgRzl8S0/SfCr7gMe1ARc+WORfoiLH+s5hI+PrnB4x0BKmNiK 7nSNgYJlMa8oDD2YMMTA8Ebb53yRiGVU3rA9CZqBIuUXhL1MrCVXV6+7gLThIDhwNGl3 tTDI0TfLjnh/+/XdM1S7yxWlQqTCnURT6TJXBR+Orjsc80MNWftJO+B1Ar4WfYA6MKyz hifQUq4B+SZLhdnL9NlsE/LxulWxPGV6YDbTvdCpDCI5EVxuP3xj4fS/thP13X3OChB5 2MOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=89cO30wmGkXDNc+LXsapdFI9ZHdvoiOb4Ut84k4l3oQ=; b=Mx1T+ydIXAnTtrTS+Ivtsfl/dtzX5coM+Yt98Tn3dPFB/CUsXE4OsWgZMRNaEqVcUr JqyTypNcLzdoSsHY6ztnZOgLeuLOHx8CFshSnnM0uRy+nYzW/mjD2Nl8QGuWBFbtD2eE 1nw0+rS3ODP3hrxdLA+crSqzYKjmYuECLG8OOmeTGjfacFr8tlbzB3nEjJ2Z/EaO98Eh 02U05/kr9Uk0E3deKJqBMudcg9GuXbljYQxbn/LBP1dwsI4fYjNmrqMrCOXE0yCEVjM9 s7XddFqGsaz07zIbIIiF/OE6Qg5r7C54to/fTikrBc0CpaFW9DdqLp36W8lsDC5ql51w ElTA== X-Gm-Message-State: AOAM530OrDOWQxjfqeF0yiEmlLe68T0NnUH+Hkd7YfP6OWs0ZnFrjxVl CvNX1Rhkd+UX4+t/HK9M0pn6Cw== X-Google-Smtp-Source: ABdhPJxSHYFEttHi9PhJcCqTks4Zbke2eO5t1ZZOH2GDqSuB9aSBKwW9rGy31Oe5BXIP7Inff3pQZg== X-Received: by 2002:a05:600c:3ac3:: with SMTP id d3mr4903103wms.174.1639660589195; Thu, 16 Dec 2021 05:16:29 -0800 (PST) Received: from elver.google.com ([2a00:79e0:15:13:a9b1:c1cb:ba9c:fad4]) by smtp.gmail.com with ESMTPSA id 10sm5979821wrb.75.2021.12.16.05.16.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Dec 2021 05:16:27 -0800 (PST) Date: Thu, 16 Dec 2021 14:16:21 +0100 From: Marco Elver To: Harinder Singh Cc: davidgow@google.com, brendanhiggins@google.com, shuah@kernel.org, corbet@lwn.net, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Tim.Bird@sony.com Subject: Re: [PATCH v4 3/7] Documentation: KUnit: Added KUnit Architecture Message-ID: References: <20211216055958.634097-1-sharinder@google.com> <20211216055958.634097-4-sharinder@google.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="bM2xpafGa4jx1rX3" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.5 (2021-01-21) Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org --bM2xpafGa4jx1rX3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Dec 16, 2021 at 11:15AM +0100, Marco Elver wrote: > On Thu, 16 Dec 2021 at 07:00, Harinder Singh wrote: > > > > Describe the components of KUnit and how the kernel mode parts > > interact with kunit_tool. > > > > Signed-off-by: Harinder Singh > > --- > > .../dev-tools/kunit/architecture.rst | 204 ++++++++++++++++++ > > Documentation/dev-tools/kunit/index.rst | 2 + > > .../kunit/kunit_suitememorydiagram.png | Bin 0 -> 24174 bytes > > Documentation/dev-tools/kunit/start.rst | 1 + > > 4 files changed, 207 insertions(+) > > create mode 100644 Documentation/dev-tools/kunit/architecture.rst > > create mode 100644 Documentation/dev-tools/kunit/kunit_suitememorydiagram.png > > In response to the other email: Adding binary blobs just creates > problems, for comparing different versions, and general bloating the > whole repo, where better alternatives exist. > > I suppose an ASCII diagram is a bit primitive. :-) > > However, SVG files on the other hand are not binary blobs, they are > text-markup based (XML), and e.g. diffing them often provides useful > information about what changed. SVG also has the benefit of being > vector graphics, and not being limited to one resolution. > > Looking at the diagram you added, I think this can easily be turned > into vector graphics, and most likely will not use up 24KiB as a > result. I gave it a shot, see attached SVG file. I re-created the figure using Inkscape. The attached SVG file is an "Optimized SVG", where Inkscape stripped as much useless info as possible and it should be as portable as possible. Some care is required to make it render the same everywhere, which I did by turning some objects into pure paths (like the arrows and '{', '}'). The text is still text, and should look similar enough with most Monospace fonts. The advantage of it still being text is reduced size, and also being able to edit it with a plain text editor should only small details need updating (like variable naming). If shapes need editing, it can be done with the help of Inkscape itself. Also, kernel-doc has proper support for dealing with SVG: https://www.kernel.org/doc/html/latest/doc-guide/sphinx.html#image-output In case you want to use my SVG as-is, you need to add: Signed-off-by: Marco Elver Thanks, -- Marco --bM2xpafGa4jx1rX3 Content-Type: image/svg+xml Content-Disposition: attachment; filename="kunit_suitememorydiagram.svg" Content-Transfer-Encoding: quoted-printable =0A=0A =0A =0A =0A =0A =0A =0A =0A = =0A =0A kunit_suite=0A =0A =0A =0A kunit_suite=0A =0A <= g transform=3D"translate(0 -217.27)">=0A =0A= kunit_suite=0A =0A =0A =0A kuni= t_suite=0A =0A = =0A =0A kunit_suite=0A =0A =0A =0A kunit_suite=0A =0A =0A =0A _kunit_suites_start=0A =0A =0A =0A _kunit_suite= s_end=0A =0A =0A .init.d= ata=0A =0A =0A =0A =0A =0A =0A =0A =0A =0A =0A =0A =0A =0A = =0A =0A =0A =0A =0A =0A =0A = =0A =0A =0A =0A =0A =0A = =0A =0A =0A =0A =0A =0A =0A =0A = =0A struct kunit_suite { const char name[256]; int (*init)(struct kunit *); void (*exit)(= struct kunit *); struct kunit_case *test_cases; ...};=0A =0A=0A --bM2xpafGa4jx1rX3--