Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1014438ybt; Wed, 17 Jun 2020 21:01:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfRpU7Erw1OyxQ81Pf2mCPSSlwiSwKVrhBmB4xL9UghdnDjfoNFld2PgqMPVC0zfT5HpuA X-Received: by 2002:a17:906:9a02:: with SMTP id ai2mr2089340ejc.97.1592452892808; Wed, 17 Jun 2020 21:01:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592452892; cv=none; d=google.com; s=arc-20160816; b=DpMNe8Qurpg2T7JF9JYjUVlg0QOUOb4L77OPiSC0NrnKIv/C1sq1JWv2pvM+9Fyuc2 z9854BTYLMhirV/C3L3/1nAiSmSB28m6M/SbpVHW7IeX+uFhC29ho/oxwNngc+8/1/uE le5xRIcv5aokDieO3acRoqgiU6FuqqGeOCzaDqNTnsXcaaEeLr2+vbyjHJOd9WLflUwc WcGC/qeikFQ+9ay17dxYkwxKrsfieex+hg1zDLZDMsoRv12raOoyOgWknTApq4fERABq t9zrRNM0Bd5Yg4m/f2UJP9R6BoOR86GKfPlys/+E8DNtU6CCRMJ72KTwcKvcrKNNQycT /sZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Kxq9wRrE0VcoWqdZaicI3/uHvnI8AYX6HIWvnm/8zQU=; b=TjPEKBYWJTBT20z6ftQTLWjSCQtlQbAWlo9Jp30woD55aIa8KgqL/sadVFdGK1/kRQ HlIJLxvekVkBOXso7v7dC7wfT/6LJ3cr9NuciPbPx/H1w2BJojOajaIiB0y9fB+3Gmhl OUXot0wLDFVNaszALbQtpOjqha+tE8toYZ75OKf+uB7l5OKqiR+fkvDWNiuT/UpEO0uY SziJvlDKEVeWX9rRrHP7BXp+1pBZ43uTzedMnKq+KgvSZws5Kg8Muu/2ISft+2dKXnYw pKetfpMpkTPJ4tWRqnGOzpK2anOzZH03A34gSCrnvdIchQvx9thSqOg5GFjrhNil81g9 HJTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@massaru-org.20150623.gappssmtp.com header.s=20150623 header.b=Z0X0AmgF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n4si1144798ejz.569.2020.06.17.21.00.56; Wed, 17 Jun 2020 21:01:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@massaru-org.20150623.gappssmtp.com header.s=20150623 header.b=Z0X0AmgF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727062AbgFRD5n (ORCPT + 99 others); Wed, 17 Jun 2020 23:57:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726918AbgFRD5m (ORCPT ); Wed, 17 Jun 2020 23:57:42 -0400 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F59FC061755 for ; Wed, 17 Jun 2020 20:57:41 -0700 (PDT) Received: by mail-qk1-x742.google.com with SMTP id q2so4365915qkb.2 for ; Wed, 17 Jun 2020 20:57:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=massaru-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Kxq9wRrE0VcoWqdZaicI3/uHvnI8AYX6HIWvnm/8zQU=; b=Z0X0AmgFWFKBZX0ES2R4eb0Zccw1evdsbhMfTQR8REFSgqGBre9aVWppzpZHKBD1T2 p2vk59LxddnUhMiGRtjZSxJwll0NNPe283ZTTiZ1HjLE0v2EsPbiDHrGWEFSNfFDJ96t zG34duQCPI6NFTakIDfkNqOa2QNGLK0X8vQsPM8kuiDKllhrvTAg2SVTXN2KRnCL97op citaOJ/yBH3DLNHEX3GdXrivfTYhkDqky8KacUjgsFIcnYZpN9F/4tlrHDcx96M38x/4 nihDusTfHIueFxSn7yrqTqe0sg3gFV8YWOtHdjVpA+iA0v9xFWXdi6O2GXGkFW5gc1YR C0eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Kxq9wRrE0VcoWqdZaicI3/uHvnI8AYX6HIWvnm/8zQU=; b=JjVaqDBMlExqPyTOBvn064NDA2G3l2ISiERPStv1pYoR2h/1ZXfZii/pFZ4Smdvzvm 9y0284i1STB2k/asNHDjQQaXhhhNgEzgvNvBeaDYAJCArYF9BRWPL0TGKi2+y9MOPb9n JwQqEfK8lROlJBMz+/u5eaJfsMbx5GdOx2esEmQ6MXTgZFAWKq/LpE9JiRJhYnVeJJ+i VZmkYHISarsu5kjvEUnsO8e/pXwkhvnaDiFCZOm1D2QhSfY5vj4dl4PNpS3Ulam88bhk 65CYGYoRWWf/ypDIXhnjK7PLeYQNbxwlVGi2lAIUgN6+3+p/ldaJEt2LgtaJv+BADzAv /bbg== X-Gm-Message-State: AOAM531RWJn+ZJw8sGrLiZqAkR5QMr5S0nh59s97O5ihoUccVkd20tfG ZlsWfmT1x+S64GORWCMepX0zSw== X-Received: by 2002:a37:a386:: with SMTP id m128mr2023002qke.224.1592452660335; Wed, 17 Jun 2020 20:57:40 -0700 (PDT) Received: from bbking.lan ([2804:14c:4a5:36c::cd2]) by smtp.gmail.com with ESMTPSA id a1sm1846168qkn.87.2020.06.17.20.57.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 20:57:39 -0700 (PDT) From: Vitor Massaru Iha To: kunit-dev@googlegroups.com Cc: skhan@linuxfoundation.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, brendanhiggins@google.com, linux-kernel-mentees@lists.linuxfoundation.org Subject: [PATCH] kunit: fix KconfigParseError by ignoring CC_VERSION_TEXT Date: Thu, 18 Jun 2020 00:57:36 -0300 Message-Id: <20200618035736.245566-1-vitor@massaru.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 8b59cd81dc5 ("kbuild: ensure full rebuild when the compiler is updated") added the environment variable CC_VERSION_TEXT, parse_from_string() doesn't expect a string and this causes the failure below: [iha@bbking linux]$ tools/testing/kunit/kunit.py run --timeout=60 [00:20:12] Configuring KUnit Kernel ... Generating .config ... Traceback (most recent call last): File "tools/testing/kunit/kunit.py", line 347, in main(sys.argv[1:]) File "tools/testing/kunit/kunit.py", line 257, in main result = run_tests(linux, request) File "tools/testing/kunit/kunit.py", line 134, in run_tests config_result = config_tests(linux, config_request) File "tools/testing/kunit/kunit.py", line 64, in config_tests success = linux.build_reconfig(request.build_dir, request.make_options) File "/home/iha/lkmp/linux/tools/testing/kunit/kunit_kernel.py", line 161, in build_reconfig return self.build_config(build_dir, make_options) File "/home/iha/lkmp/linux/tools/testing/kunit/kunit_kernel.py", line 145, in build_config return self.validate_config(build_dir) File "/home/iha/lkmp/linux/tools/testing/kunit/kunit_kernel.py", line 124, in validate_config validated_kconfig.read_from_file(kconfig_path) File "/home/iha/lkmp/linux/tools/testing/kunit/kunit_config.py", line 89, in read_from_file self.parse_from_string(f.read()) File "/home/iha/lkmp/linux/tools/testing/kunit/kunit_config.py", line 85, in parse_from_string raise KconfigParseError('Failed to parse: ' + line) kunit_config.KconfigParseError: Failed to parse: CONFIG_CC_VERSION_TEXT="gcc (GCC) 10.1.1 20200507 (Red Hat 10.1.1-1)" Signed-off-by: Vitor Massaru Iha --- tools/testing/kunit/kunit_config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/kunit/kunit_config.py b/tools/testing/kunit/kunit_config.py index e75063d603b5..3033520597b6 100644 --- a/tools/testing/kunit/kunit_config.py +++ b/tools/testing/kunit/kunit_config.py @@ -9,6 +9,7 @@ import collections import re +CONFIG_IGNORE_CC_VERSION_TEXT = 'CONFIG_CC_VERSION_TEXT' CONFIG_IS_NOT_SET_PATTERN = r'^# CONFIG_(\w+) is not set$' CONFIG_PATTERN = r'^CONFIG_(\w+)=(\S+)$' @@ -79,7 +80,7 @@ class Kconfig(object): self.add_entry(entry) continue - if line[0] == '#': + if line[0] == '#' or CONFIG_IGNORE_CC_VERSION_TEXT in line: continue else: raise KconfigParseError('Failed to parse: ' + line) base-commit: 7bf200b3a4ac10b1b0376c70b8c66ed39eae7cdd -- 2.26.2