Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1465930ybl; Thu, 5 Dec 2019 01:45:54 -0800 (PST) X-Google-Smtp-Source: APXvYqwHTuu913gT1xPimEBLsPz/OL641P3GCWPZOCdjUrEmVecz5Y9MTTwSItDU6oH2nADxD6/T X-Received: by 2002:a9d:6084:: with SMTP id m4mr6198878otj.4.1575539154502; Thu, 05 Dec 2019 01:45:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575539154; cv=none; d=google.com; s=arc-20160816; b=xOlQwMsyypS671rxaMTSRzoHnZyg+u97nV6wDvesIFLRVfESOoRvHe21izCUybP1RH D14VVE2TF/PlEVPGZoc8SM1qi1KjOJ1rn7t2ZHHTz1NK8sa5ww9suGpLv0GFuxtRVe5Z KzKS7TZKGM63+APPV1GUWZmnkT9lYhcT2ifEdwpVatwOpJPLWD/Pgb4weOATJ1uWVP/W 06zp7ZcAYg/NmS4T9jwFXceVkMQMWjhaSwKH4Sn0FiaX9YKwFcpFSFo6ZGkDcNScSESh KFi4WkrlalnGtxa8v9oM5r5JSKcKg71+1EvJGGyeucBOoTONIZFF0AAMTVDTgX7kTaju EWWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:ironport-sdr :dkim-signature; bh=XA3oZWOd5asy5rioRAKyGk2s02rOKwV9Udl1+L/1v4E=; b=i5AXnVqV+hG5O0EuaSpGXNVbko4WXjhZGoqNSeHDs4WUEl98SPAdoJ3yF788TEgwLe Fk+Y3sJc8bGOWIzK981fRvMhHzNFDGCadQjXNmjDZyhWb2OaoWdWISlNOmitQKzrT0dq dkyav/e5lYouZEi9BUPswV2uoOPYGRZcnjOwqW8kov/Y0YLauO8vpQ7dz+VoH792hoI4 W0oYJF87I/guRdyqwODxmbDlj/Yv+xlDUv2nk4r9MySD4Ah+dqowsLxKyyvLcUIhvAL6 VRD2SJt7SC8heseC4tD2sNVWBUkxaVoXjBcR4KrmpgUnZ5AlxKfg16dviWwYAGyBSonD 5GzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=GWaaIsrg; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n84si421272oib.157.2019.12.05.01.45.42; Thu, 05 Dec 2019 01:45:54 -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=@amazon.com header.s=amazon201209 header.b=GWaaIsrg; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729260AbfLEJom (ORCPT + 99 others); Thu, 5 Dec 2019 04:44:42 -0500 Received: from smtp-fw-2101.amazon.com ([72.21.196.25]:39985 "EHLO smtp-fw-2101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728629AbfLEJol (ORCPT ); Thu, 5 Dec 2019 04:44:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1575539080; x=1607075080; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=XA3oZWOd5asy5rioRAKyGk2s02rOKwV9Udl1+L/1v4E=; b=GWaaIsrga2Wf7razKIk59blu9cEsQGKQNnXACz7FAGJBOwqKzXknve+N /rz2OBVx2bnMomjpn3m+/l4QSGtpbSPjrbwUnHqyM80rW+z8AMzsLozJ7 SuLVducC5dB/cuMAKV105qlfruw8lPSm8xO0KBCCP7pqTIUysQtL5EDdb s=; IronPort-SDR: oN9E6e02wCm8LbHFJfX4TowVWG/UGsHK2KJGpM9LCOW/lsg4WGpaDkCS0sw0RtFBGy5/0lIxHY axKXhaQXUPTw== X-IronPort-AV: E=Sophos;i="5.69,280,1571702400"; d="scan'208";a="7245714" Received: from iad6-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-2a-c5104f52.us-west-2.amazon.com) ([10.124.125.2]) by smtp-border-fw-out-2101.iad2.amazon.com with ESMTP; 05 Dec 2019 09:44:38 +0000 Received: from EX13MTAUEA001.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan3.pdx.amazon.com [10.170.41.166]) by email-inbound-relay-2a-c5104f52.us-west-2.amazon.com (Postfix) with ESMTPS id 9CB0CA1F5E; Thu, 5 Dec 2019 09:44:37 +0000 (UTC) Received: from EX13D22UEA003.ant.amazon.com (10.43.61.147) by EX13MTAUEA001.ant.amazon.com (10.43.61.243) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 5 Dec 2019 09:44:37 +0000 Received: from EX13MTAUEA001.ant.amazon.com (10.43.61.82) by EX13D22UEA003.ant.amazon.com (10.43.61.147) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 5 Dec 2019 09:44:37 +0000 Received: from u886c93fd17d25d.ant.amazon.com (10.28.85.76) by mail-relay.amazon.com (10.43.61.243) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 5 Dec 2019 09:44:35 +0000 Subject: Re: [PATCH v3 0/5] Fix nits in the kunit To: SeongJae Park , Brendan Higgins CC: Jonathan Corbet , KUnit Development , "open list:DOCUMENTATION" , Linux Kernel Mailing List , "open list:KERNEL SELFTEST FRAMEWORK" , shuah , SeongJae Park References: <1575396508-21480-1-git-send-email-sj38.park@gmail.com> <20191204192141.GA247851@google.com> From: Message-ID: <68b23584-c82f-68b7-f428-5b6a0738e072@amazon.com> Date: Thu, 5 Dec 2019 10:44:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04.12.19 21:28, SeongJae Park wrote: > 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. I just sent 5th version which includes this change and a fix: https://lore.kernel.org/linux-kselftest/20191205093440.21824-1-sjpark@amazon.com Thanks, SeongJae Park >> >> >> Thanks, >> SeongJae Park