Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp446235ybl; Mon, 2 Dec 2019 13:11:50 -0800 (PST) X-Google-Smtp-Source: APXvYqxLDt8NUvk0TV8UTS6CjPTL3ITBtKWhUBeQ2EN8yLKgukvuKC+F/PUCbWW2PdELaA5CIzg7 X-Received: by 2002:a05:6808:618:: with SMTP id y24mr896672oih.86.1575321110061; Mon, 02 Dec 2019 13:11:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575321110; cv=none; d=google.com; s=arc-20160816; b=BhEyaYim+MY6PJnWq+7fN9z8WcNFCkXkUFH6EJ7ZVC9KZ7VkT+azwWHKN+TPvFM4hU Sh0Xmdzp429Si+d1Fyj+FtQtIwmAFVqrO582akMwkhOJAafYX/DswkSAK/7BzhBxR3Q3 iVeDe4vtKC5RYIPbit+BG7XNv8WgdFnCzERpyUWvV9gT6FZJ1lGS0jP/Ih+j2w5XkduT I90D4T5uq0Ge0fHLN52jziuobXk5FbZaNS5p+kTQ5y1mqxTzpcW2p47+P9zWekNTQVhf 6Daezm7Ijs/M9vAafhSMo3Nwh95V9Zou+q44tgmZ9WZMNKRErZFYSGOjamo4x3kbnrf6 tTSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=bI0vrIcnx4OyiLwsy+iUg8MBW9que6as4Vgej46HfQE=; b=Yt5ebltvfXFb0ezUXJq2pWaZeOllz1vrUQ1uRLD/5dqF1XlOpYiOwFNp/faPDxMypC rEJrSYUNiIb49QAKk/p0kj7j4+iPkTlu5Ros9OOru4vbkgryZyl1KXWCoFF7Pj3AcN5A HnOOYz6+4IHqazwpIidZE56W1CwuKvg7GyU1FXjQGkgsm1jA49qEkzL7KcGDVO+Oz+mj 113DsU1PcPKMp0CsHBBoJlCWLVowl3JcfQtJp0HJRK8mCoaigfa/90K0JwhrxVCfgdoa joV21H7oymhhYCspf4rWlpiKTjRzzW0Qkv2nX5YL27pQ2RsWN56Jxi3L1+ON5tLSsdoB zySA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Pwu4o8nZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s15si210934oij.64.2019.12.02.13.11.14; Mon, 02 Dec 2019 13:11:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Pwu4o8nZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726608AbfLBVKT (ORCPT + 99 others); Mon, 2 Dec 2019 16:10:19 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:42579 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725834AbfLBVKT (ORCPT ); Mon, 2 Dec 2019 16:10:19 -0500 Received: by mail-lj1-f196.google.com with SMTP id e28so1123606ljo.9; Mon, 02 Dec 2019 13:10:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bI0vrIcnx4OyiLwsy+iUg8MBW9que6as4Vgej46HfQE=; b=Pwu4o8nZY8nAcf27eWcYyvVgM7fHYu7v1RJJh+M6sl0RXXqubD4tPL0g2jEL8Zze8X rbryxAGu1R2fuQC4EgocyoSpuNQRCN4rI3XMOj4FBWpafOlbRjIZ9BG+VoKZOFgsZrbD L1dckW2Is1XYBluqMpZ3FPFJdCNHH0hy3QWAo1nlt4k6hPIQnfenYO6JbLA6IET7Yh3B doELxvTNHLAqLx+MiZVO8c8XTTRNaN106vAaI2iiISq84b83LMRhCCQougdGqsuuWPZD cT/eIkXw2e8MCHUSEJfQBLmzF29prSnvnQ3v2TqOM6ZGSJ/Qmf0z6GD9CEhsj3+NkyAQ bv3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bI0vrIcnx4OyiLwsy+iUg8MBW9que6as4Vgej46HfQE=; b=hGZ8SBZo8rgUXlkoGQVkqZQ4f2imuosAHiYcSymynrmsCDQzOalnMI2veZjDO2LpBC rA766St+8Mc7N0RUVoHr3snFj+SHsWnnrALuHro1Ucua989QFwa4M8LNDKPeP+K30WKF 4rcPwyrU3KlD2B9bRSGwnYVeZt35Aa1s8YSBgRYBOVvl3QiglAu8Hu2yYRFpFsin0Ove /udzhsymBZ/7w2Th3xA9xGBzZz24dIjQEoTpFV8fRypf855VJFml8315pxaoFgb6qxvk Kzp+gqDThlk72bMjitoooo8QVi7rZKoEMQKZowCOMxSD2s0VllI4n3XujyznMKNgZFiK Q8zg== X-Gm-Message-State: APjAAAUSy+7NuS8PaTBfebKlKStKKEfC8puuZoET438Jn9HAKZiBtFl9 UHbssPSR3TP4XfvYFEZwUZYErOeZ/qJJoCBdNxI= X-Received: by 2002:a2e:7816:: with SMTP id t22mr468856ljc.161.1575321015559; Mon, 02 Dec 2019 13:10:15 -0800 (PST) MIME-Version: 1.0 References: <1575242724-4937-1-git-send-email-sj38.park@gmail.com> <1575242724-4937-3-git-send-email-sj38.park@gmail.com> In-Reply-To: From: SeongJae Park Date: Mon, 2 Dec 2019 22:09:49 +0100 Message-ID: Subject: Re: [PATCH 2/6] docs/kunit/start: Skip wrapper run command To: David Gow Cc: Brendan Higgins , shuah , Jonathan Corbet , "open list:KERNEL SELFTEST FRAMEWORK" , KUnit Development , "open list:DOCUMENTATION" , Linux Kernel Mailing List , SeongJae Park Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 2, 2019 at 10:03 PM David Gow wrote: > > On Mon, Dec 2, 2019 at 9:25 AM Brendan Higgins > wrote: > > > > +David Gow - David has lots of good opinions on our documentation. > > > > On Sun, Dec 1, 2019 at 3:25 PM SeongJae Park wrote: > > > > > > From: SeongJae Park > > > > > > The kunit 'Getting Started' document first shows the wrapper running > > > command. However, a new user who simply following the command might > > > encounter a failure like below: > > > > > > $ ./tools/testing/kunit/kunit.py run > > > Traceback (most recent call last): > > > File "./tools/testing/kunit/kunit.py", line 140, in > > > main(sys.argv[1:]) > > > File "./tools/testing/kunit/kunit.py", line 126, in main > > > linux = kunit_kernel.LinuxSourceTree() > > > File "/home/sjpark/linux/tools/testing/kunit/kunit_kernel.py", line 85, in __init__ > > > self._kconfig.read_from_file(KUNITCONFIG_PATH) > > > File "/home/sjpark/linux/tools/testing/kunit/kunit_config.py", line 65, in read_from_file > > > with open(path, 'r') as f: > > > FileNotFoundError: [Errno 2] No such file or directory: 'kunitconfig' > > > > > > Though the reason of the failure ('kunitconfig') is explained in its > > > next section, it would be better to reduce any failure that user might > > > encounter. This commit removes the example command for the reason. > > > > Seems reasonable. > > > I definitely agree that having a non-working command here is doing > more harm than good. Whether we just get rid of it, or change it to > use the --defconfig option is a matter of taste. (Personally, I think > there's some value in having a one-line "run the tests" command at the > top of the Getting Started page, but it definitely needs to be one > that works.) > > So, overall, I think this is definitely an improvement, but that we do > need to choose whether to take this approach (deleting this command) > or the --defconfig approach as in: > https://lore.kernel.org/linux-kselftest/20191119003120.154041-1-brendanhiggins@google.com/ > > > > Signed-off-by: SeongJae Park > > > --- > > > Documentation/dev-tools/kunit/start.rst | 6 ------ > > > 1 file changed, 6 deletions(-) > > > > > > diff --git a/Documentation/dev-tools/kunit/start.rst b/Documentation/dev-tools/kunit/start.rst > > > index 78a0aed..e25978d 100644 > > > --- a/Documentation/dev-tools/kunit/start.rst > > > +++ b/Documentation/dev-tools/kunit/start.rst > > > @@ -15,12 +15,6 @@ Included with KUnit is a simple Python wrapper that helps format the output to > > > easily use and read KUnit output. It handles building and running the kernel, as > > > well as formatting the output. > > > > > > -The wrapper can be run with: > > > - > > > -.. code-block:: bash > > > - > > > - ./tools/testing/kunit/kunit.py run > > > - > > > Creating a kunitconfig > > > ====================== > > > > I think maybe we should demote this section so that this is a > > subsection under KUnit Wrapper. Might also want to add a tie-in > > explaining why we are talking about kunitconfig here? Right now this > > kind of reads as a non sequitur. > I generally think we want to keep the "Getting Started" guide focused > on the goal (running/writing tests), rather than too much detail on > the implementation (the wrapper itself). > How about renaming what's currently the "KUnit Wrapper" section to > "Running tests" or similar, and moving the kunitconfig part under > that? > > The "Creating a kunitconfig" part could equally be "configuring which > tests to run" or something, which may speak more to motivating > > As for some sort of tie-in, perhaps rewording the opening sentence to > say "The easiest way to run tests is to use the kunit_tool script", > and link to the page kunit_tool page in the patch below? > > > > Note: we have tried to address this potential issue for new users in > > this patch under review: > > > > https://patchwork.kernel.org/patch/11252953/ > > > > I don't feel strongly whether we do it your way or my way. What do > > other people think? > > As above, my slight preference is for adding the --defconfig option > over removing the section entirely. Agree, I would also prefer to do explain about '--defconfig' option. Thanks, SeongJae Park > > > > The Python script is a thin wrapper around Kbuild as such, it needs to be > > > -- > > > 2.7.4 > > > > On Mon, Dec 2, 2019 at 9:25 AM Brendan Higgins > wrote: > > > > +David Gow - David has lots of good opinions on our documentation. > > > > On Sun, Dec 1, 2019 at 3:25 PM SeongJae Park wrote: > > > > > > From: SeongJae Park > > > > > > The kunit 'Getting Started' document first shows the wrapper running > > > command. However, a new user who simply following the command might > > > encounter a failure like below: > > > > > > $ ./tools/testing/kunit/kunit.py run > > > Traceback (most recent call last): > > > File "./tools/testing/kunit/kunit.py", line 140, in > > > main(sys.argv[1:]) > > > File "./tools/testing/kunit/kunit.py", line 126, in main > > > linux = kunit_kernel.LinuxSourceTree() > > > File "/home/sjpark/linux/tools/testing/kunit/kunit_kernel.py", line 85, in __init__ > > > self._kconfig.read_from_file(KUNITCONFIG_PATH) > > > File "/home/sjpark/linux/tools/testing/kunit/kunit_config.py", line 65, in read_from_file > > > with open(path, 'r') as f: > > > FileNotFoundError: [Errno 2] No such file or directory: 'kunitconfig' > > > > > > Though the reason of the failure ('kunitconfig') is explained in its > > > next section, it would be better to reduce any failure that user might > > > encounter. This commit removes the example command for the reason. > > > > Seems reasonable. > > > > > Signed-off-by: SeongJae Park > > > --- > > > Documentation/dev-tools/kunit/start.rst | 6 ------ > > > 1 file changed, 6 deletions(-) > > > > > > diff --git a/Documentation/dev-tools/kunit/start.rst b/Documentation/dev-tools/kunit/start.rst > > > index 78a0aed..e25978d 100644 > > > --- a/Documentation/dev-tools/kunit/start.rst > > > +++ b/Documentation/dev-tools/kunit/start.rst > > > @@ -15,12 +15,6 @@ Included with KUnit is a simple Python wrapper that helps format the output to > > > easily use and read KUnit output. It handles building and running the kernel, as > > > well as formatting the output. > > > > > > -The wrapper can be run with: > > > - > > > -.. code-block:: bash > > > - > > > - ./tools/testing/kunit/kunit.py run > > > - > > > Creating a kunitconfig > > > ====================== > > > > I think maybe we should demote this section so that this is a > > subsection under KUnit Wrapper. Might also want to add a tie-in > > explaining why we are talking about kunitconfig here? Right now this > > kind of reads as a non sequitur. > > > > Note: we have tried to address this potential issue for new users in > > this patch under review: > > > > https://patchwork.kernel.org/patch/11252953/ > > > > I don't feel strongly whether we do it your way or my way. What do > > other people think? > > > > > The Python script is a thin wrapper around Kbuild as such, it needs to be > > > -- > > > 2.7.4 > > >