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 X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F423C3F68F for ; Wed, 4 Dec 2019 20:28:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D5C982077B for ; Wed, 4 Dec 2019 20:28:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TpHatxGp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728289AbfLDU2q (ORCPT ); Wed, 4 Dec 2019 15:28:46 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:39347 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727889AbfLDU2p (ORCPT ); Wed, 4 Dec 2019 15:28:45 -0500 Received: by mail-lj1-f195.google.com with SMTP id e10so802466ljj.6; Wed, 04 Dec 2019 12:28:44 -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=yKIotMcbTtZ0YF0R1baNTaDHjXcczPzr4JNxaUZOqXI=; b=TpHatxGpHFgxmntTYTnhcSlRQr/SlNyCLneNOiOnh2ZNZ/144zFRAOLwoNXL5Kb0hS Ayb5xw7IWf1QfodVr/5Pz/3D/FFcEhqYITBKOTWN6kfzbTTWw9rIkVNJ+tfuKWLf8+fo 0CEVjcfbVaVhymc6g+cSG45QSsI2aIgL8Dn9b8xWkvlDZBZVcmS7Cnf5rwaK/pSFmK6K /Rjm/OAWENGDPDgdSWlGPPUDLo+XB+OV50RnpX2P9bhraxznSuM7pXgq2hLf3sF3U4JC hleJERGfWf737ApQDKYJa9PVnFXUF4FcmOee95qF9n08JW3KGXRnKpCCdDYwGQalfsnj oFHA== 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=yKIotMcbTtZ0YF0R1baNTaDHjXcczPzr4JNxaUZOqXI=; b=hYqjEtdoQC+i6/0QEcpma17BpbHWkSpxktKnaUS1ok3eGoChCC3UedWHF4kA78io5N A0W/Kcn8r2tQZeRfIveXM5iO2Zmy7Z8GI8VPiBx54GP/CAls8xLuM53C4XbFi5Cfxgo4 fzGp/Wx99gZ+Gg302F85Bxj+4dNFWlOTSUqxpIJh9rHNEfWFPdGkH5oy8JVHel+z+SHs +SocJKHs+PcFlYVSpED8OLfg4cjel6RZBCYx1bzK9pA4sAMoH5ffks+/lC/QgaeVskIp KMFq/O4o7BNsNmwzh2mJFhwbvkQdXR6UvK1goRAdPkKbABqP24SkoePy5jX4tAXLdqes 2Ivg== X-Gm-Message-State: APjAAAV5GyOs0gWzpen4DWWC5GRBFUPZzXwFNX8muny3FdyJAdmFOg1h rGM4r3Z47cE9HveYswltlr5Ok0/WU0tXcMoyOjjhiA== X-Google-Smtp-Source: APXvYqxSWkjq3rUQ3sYOM4hYRA4knRhOqK9uDJNATMmSoHjHWA6C00W2uDpGurmHugXH/RDtUrdcNs88tSyM9oQiL40= X-Received: by 2002:a2e:580c:: with SMTP id m12mr3187002ljb.150.1575491323333; Wed, 04 Dec 2019 12:28:43 -0800 (PST) MIME-Version: 1.0 References: <1575396508-21480-1-git-send-email-sj38.park@gmail.com> <20191204192141.GA247851@google.com> In-Reply-To: From: SeongJae Park Date: Wed, 4 Dec 2019 21:28:16 +0100 Message-ID: Subject: Re: [PATCH v3 0/5] Fix nits in the kunit To: Brendan Higgins Cc: Jonathan Corbet , KUnit Development , "open list:DOCUMENTATION" , Linux Kernel Mailing List , "open list:KERNEL SELFTEST FRAMEWORK" , shuah , 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 Wed, Dec 4, 2019 at 9:25 PM SeongJae Park wrote: > > On Wed, Dec 4, 2019 at 8:21 PM Brendan Higgins > wrote: > > > > On Tue, Dec 03, 2019 at 02:41:26PM -0800, Brendan Higgins wrote: > > > On Tue, Dec 3, 2019 at 10:08 AM SeongJae Park wrote: > > > > > > > > This patchset contains trivial fixes for the kunit documentations and the > > > > wrapper python scripts. > > > > > > > > Changes from v2 (https://lore.kernel.org/linux-kselftest/1575361141-6806-1-git-send-email-sj38.park@gmail.com/T/#t): > > > > - Make 'build_dir' if not exists (missed from v3 by mistake) > > > > > > > > SeongJae Park (5): > > > > docs/kunit/start: Use in-tree 'kunit_defconfig' > > > > kunit: Remove duplicated defconfig creation > > > > kunit: Create default config in '--build_dir' > > > > kunit: Place 'test.log' under the 'build_dir' > > > > kunit: Rename 'kunitconfig' to '.kunitconfig' > > > > > > > > Documentation/dev-tools/kunit/start.rst | 13 +++++-------- > > > > tools/testing/kunit/kunit.py | 16 ++++++++++------ > > > > tools/testing/kunit/kunit_kernel.py | 8 ++++---- > > > > 3 files changed, 19 insertions(+), 18 deletions(-) > > > > > > Tested-by: Brendan Higgins > > > > I just realized that I forgot to test for something... > > > > The following command fails: > > > > ./tools/testing/kunit/kunit.py run --timeout=60 --jobs=12 --defconfig > > > > [11:17:13] Building KUnit Kernel ... > > [11:17:16] Starting KUnit Kernel ... > > Traceback (most recent call last): > > File "tools/testing/kunit/kunit.py", line 142, in > > main(sys.argv[1:]) > > File "tools/testing/kunit/kunit.py", line 135, in main > > result = run_tests(linux, request) > > File "tools/testing/kunit/kunit.py", line 67, in run_tests > > test_result = kunit_parser.parse_run_tests(kunit_output) > > File "/usr/local/google/home/brendanhiggins/gbmc-linux/tools/testing/kunit/kunit_parser.py", line 283, in parse_run_tests > > test_result = parse_test_result(list(isolate_kunit_output(kernel_output))) > > File "/usr/local/google/home/brendanhiggins/gbmc-linux/tools/testing/kunit/kunit_parser.py", line 54, in isolate_kunit_output > > for line in kernel_output: > > File "/usr/local/google/home/brendanhiggins/gbmc-linux/tools/testing/kunit/kunit_kernel.py", line 146, in run_kernel > > with open(os.path.join(build_dir, 'test.log'), 'w') as f: > > File "/usr/lib/python3.7/posixpath.py", line 80, in join > > a = os.fspath(a) > > TypeError: expected str, bytes or os.PathLike object, not NoneType > > > > It seems as though you assume that build_dir is always populated by the flag. > > Sorry for not checking the case. The 4th patch, "kunit: Place 'test.log' under > the 'build_dir'" made the bug. I fixed the 4th patch and tested with below > commands: > > ./tools/testing/kunit/kunit.py run --timeout=60 --jobs=12 > --defconfig --build_dir .kunit > ./tools/testing/kunit/kunit.py run --timeout=60 --jobs=12 --defconfig > > Just sent the 4th version patchset including the fix: > http://lkml.kernel.org/r/1575490683-13015-1-git-send-email-sj38.park@gmail.com Also, removed the 'Reviewed-by' from the 4th patch and didn't add 'Tested-by' to the patchset. Thanks, SeongJae Park > > I will consider adding some tests that can check such cases in the > 'kunit_tools_test.py' later. > > > Thanks, > SeongJae Park