Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1304784ybt; Thu, 18 Jun 2020 05:44:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxs0U6NkOBt32hAibRdzPidCl6FhNLPb8d2O+C9sNgh38Om0fLiiuedWiZVb81w9TMSWYj6 X-Received: by 2002:a50:fe0d:: with SMTP id f13mr3974876edt.204.1592484241593; Thu, 18 Jun 2020 05:44:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592484241; cv=none; d=google.com; s=arc-20160816; b=bjyiQh/y17/Hqg7DER7bs/U7f4Si2g1UvDVX4Gz9Bu2bbpgWDei/PSVQMHkqiG8kUl 3gIS7EBpPzFNoiOW3Ymks7WEvk981VGUvfI5bgjCS4smGXYPaqPypmTa9/wU4H2cF19T rFxosRxkvmrNav+dBt+flGMTucFvB6/Nn1V0++xgh/hQUJO5dmXNE467GjjXQQR+/pQG bpB5zIV3Y88kJcpae6RgFRlI6ypbCwftKHxJ1u/6N57OW32TBCk5RNSKKoi1jmr4686L NE/FvsoeeWQh1L2hU9r5sR6cbF+iFgbYYI/r1CyecZ+rOHHJGL8hvft0cgAD0//fJ/GF vXBg== 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=72mYtR8brLn0NtD1nMNXJ5LkwsKwBqKm9sI8cal1E90=; b=LeWdxp1VeuTE9g2uFu05nebks8oYzcyyE4XpLgiXCnWAesybSVFphHgeuQR2omp9D8 wQ33GILCUenPGyVAXyCE8S0Jti7nK4vJLGCF0y/XyP+zxD5ckJin43Blrje/DtD5b+Y8 Hy3BB2UfSnvfOHjhznoxT4eIINfqfFv6OZcU98H8BZM+AoeL19X9eHf65H2lpFOSu/zh fRx10exa8jIyA9lIRD+0qL+20iRVRfaVSgTEDIfypakTCw38VfgdfwPiZAQYKqDURLU0 /NRyVoSlpYMXpiwWzvY7dWC5rdikdETwtEwkhxTyRIsCcgSBb2ata/KTaNkoKFwfRE+m R9XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@massaru-org.20150623.gappssmtp.com header.s=20150623 header.b=K0ZOAG6G; 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 di14si1771408edb.559.2020.06.18.05.43.39; Thu, 18 Jun 2020 05:44:01 -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=K0ZOAG6G; 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 S1729721AbgFRMjX (ORCPT + 99 others); Thu, 18 Jun 2020 08:39:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728997AbgFRMjS (ORCPT ); Thu, 18 Jun 2020 08:39:18 -0400 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9392EC06174E for ; Thu, 18 Jun 2020 05:39:17 -0700 (PDT) Received: by mail-qk1-x741.google.com with SMTP id b4so5261013qkn.11 for ; Thu, 18 Jun 2020 05:39:17 -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=72mYtR8brLn0NtD1nMNXJ5LkwsKwBqKm9sI8cal1E90=; b=K0ZOAG6GPspKsFM7RuoT1Zxla/nSwmJil3wicypom/nE8jjCpK25dmHoz1r1NnXadc ww5oAw4uDtuC0r5OyCQKa7v6tue9ZyNUOKyFMkfrCDrEWcgvBPPmvopYsQYDI5AgV8Gv AtgDwfC2zGMOR1pOrxPMfHWMFT7z+VjmYyImE54pHzbcrk5YncmWcOFjkVSbGFPeE+wW J5QfJWa55NA5KWZb3jklwT0BXjvcVEfIHaG1N2RZgfLA0MGe6Faz6CVqNbqomhSnM10D 9iYNa53DJtVno8jZynfCQw0FxObMJ0l0mxqquCkzFHCssr3s2M+VbMkq/fVboKjCGbRO gHhA== 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=72mYtR8brLn0NtD1nMNXJ5LkwsKwBqKm9sI8cal1E90=; b=V1GYMYlb74PA2MKPVneluwNi4mp0oHvtfAeV/jpvrC3SG+MB6WsvyMCxUxpfLxcxDn lgZj2DWBAk3YjmSh/PghxK0FXZEVVN8t4klM2Xg6gCSIc2q6Aqj90WkyZxBWqhwZ9wgo mtCJ4EjsCtnZKaCjPht8x7pvAinZ2oTOcmbzYFWl+tTqQPwfCWeAFAwcqHjW946dVpDB R5Szc3OrfJlVFHk574O5OEEyqK7xQl5E3sSEfI/CWiZv/bW6qVvyVo1CrgHiAa+9+0+A DhqW2O7lB3m65uktFzmKNwdBKnPX+mDC1mM47juOffKJtoIeXYAiWLoutvwuoqVXwl/P wGQg== X-Gm-Message-State: AOAM5308oeur4sufPQU0sYUenXPyepWevCDKrgdh5fKYa5dMTo/qU51N izO6IzbT7iKm9Z4JSg7SkF0Wqw== X-Received: by 2002:a05:620a:1310:: with SMTP id o16mr3413267qkj.68.1592483956719; Thu, 18 Jun 2020 05:39:16 -0700 (PDT) Received: from bbking.lan ([2804:14c:4a5:36c::cd2]) by smtp.gmail.com with ESMTPSA id 124sm2870143qkm.115.2020.06.18.05.39.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2020 05:39:16 -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 v2] kunit: fix KconfigParseError handling CC_VERSION_TEXT Date: Thu, 18 Jun 2020 09:39:12 -0300 Message-Id: <20200618123912.64762-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 in value field 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 --- v2: - maintains CC_VERSION_TEXT in the .config file to ensure full rebuild when the compiler is updated. --- tools/testing/kunit/kunit_config.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/testing/kunit/kunit_config.py b/tools/testing/kunit/kunit_config.py index e75063d603b5..c407c7c6a2b0 100644 --- a/tools/testing/kunit/kunit_config.py +++ b/tools/testing/kunit/kunit_config.py @@ -81,6 +81,12 @@ class Kconfig(object): if line[0] == '#': continue + + if 'CONFIG_CC_VERSION_TEXT' in line: + name, value = line.split('=') + entry = KconfigEntry(name, value) + self.add_entry(entry) + continue else: raise KconfigParseError('Failed to parse: ' + line) base-commit: 7bf200b3a4ac10b1b0376c70b8c66ed39eae7cdd -- 2.26.2