From patchwork Mon Nov 26 07:22:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 151969 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5304828ljp; Sun, 25 Nov 2018 23:24:47 -0800 (PST) X-Google-Smtp-Source: AFSGD/WQiCMTIuoCEWPeUKw2qjNywHjBcA9cL0upw5R72ePaW7/siRLbh7/A6RNhY4cfkPhYQypF X-Received: by 2002:a63:3204:: with SMTP id y4mr23558442pgy.41.1543217087698; Sun, 25 Nov 2018 23:24:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543217087; cv=none; d=google.com; s=arc-20160816; b=WMJ3jvCrXFU5jyS8d2uBZKFqlcvKTslgpIkWGg0mAe44p6Eofxo+d/kvM2/cbZeNaN R/nrFxMrMptHAOgfh6mY02XaE/RQA19xPiNC5gN+yJVcoEUq1TWdtgm4uS7EWZQTIjYq 2Lelll9koFBYzdQLGFnSJmrWVpRdATTYZg9TnuRbtV7vEbfk5pjV8TL1hxTXp5m0ZVA/ FpyOJSvjdWxrlgCfUNGAnPpcwRkMUmttynx8Wp2KSidHqXZa9iyK7NXZkujUoayi7wNw Q4dyQo2r8sg6hWxhaJ2z0SnPMKtU6+EMSbyA248F8XmrJmrOAwMQgu+Z8HswDvVD+yVq xOWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=W+odO2qR68+okWsE4v5K50oO9m1QxNzqqqNLgsQeyiI=; b=lvYTMrcIPC9Y37TRoJRM/SFuyLg2b9hLWzV3rizpSadm+XzU6t+fLfxJnaST3BJBQ8 JyLbz6W+d5i4HFWRthtRssEXdqiQvNVJNfkbZr4REnCZNJ3bVexrNWPRIqyNe5WOug0i OHsFDMgxT2VtzrAOXoEA3XP8twz9MS1zyjjUsaZtZWyvfIbmAb2zFP56PXPLOMtO8Joh 3HnEOa+gRIJKaPdO5eluRNobh4hUA0TrJjzTk1mC4EDwpZyZ9bU8wxNHb48HpT7MGAed zifqUZkSkvQQG7u7OfxE5HEfkmJNeEI96wQ8/VZsn30x0E1sAQwaKS4SbDSSeBknLf/r fzbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=DuMobcSO; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si36294998plk.296.2018.11.25.23.24.47; Sun, 25 Nov 2018 23:24:47 -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=@nifty.com header.s=dec2015msa header.b=DuMobcSO; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726336AbeKZSRz (ORCPT + 32 others); Mon, 26 Nov 2018 13:17:55 -0500 Received: from conuserg-12.nifty.com ([210.131.2.79]:38339 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726154AbeKZSRy (ORCPT ); Mon, 26 Nov 2018 13:17:54 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id wAQ7N1v3019779; Mon, 26 Nov 2018 16:23:02 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com wAQ7N1v3019779 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1543216982; bh=W+odO2qR68+okWsE4v5K50oO9m1QxNzqqqNLgsQeyiI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DuMobcSOAjGSh1967QLjUSgEuCLvU+E4i5tJa8W/dihXXqFvNfrJL0JTeGIkAEuvF VDZJSNmu/oGtKHnDsqPDKhOMrLF3TAoCj3qQwfxF7fgXvrUPVyUWSFBMfeffedLX2L Q3Y93gTOZA7D4JAABnL9BVPNanaF3Puc3AJG2SrILVhoTE24Jf4BUEysTI1qgb0Zmk tTo7H9dLpcae1DXDrKErW8QziMtqOLMkfiRFgscAe33kHX7Yujlwsq7JMVY4vKSy3a ty7RckFyiq7onYwo98L8hVCYehKcL2c2hJ41lUs0icPn3XpZBtKIXA3JDI2ca+Ol6W TmKF1M7EijRKA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Ulf Magnusson , Randy Dunlap , Taehee Yoo , Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] kconfig: tests: test reverse dependency with tristate if-conditional Date: Mon, 26 Nov 2018 16:22:49 +0900 Message-Id: <1543216969-2227-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543216969-2227-1-git-send-email-yamada.masahiro@socionext.com> References: <1543216969-2227-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a test-case for the fixed reverse dependency handling. Signed-off-by: Masahiro Yamada --- .../kconfig/tests/revdep_with_tristate_if/Kconfig | 21 +++++++++++++++++++++ .../tests/revdep_with_tristate_if/__init__.py | 14 ++++++++++++++ .../tests/revdep_with_tristate_if/expected_config | 9 +++++++++ 3 files changed, 44 insertions(+) create mode 100644 scripts/kconfig/tests/revdep_with_tristate_if/Kconfig create mode 100644 scripts/kconfig/tests/revdep_with_tristate_if/__init__.py create mode 100644 scripts/kconfig/tests/revdep_with_tristate_if/expected_config -- 2.7.4 diff --git a/scripts/kconfig/tests/revdep_with_tristate_if/Kconfig b/scripts/kconfig/tests/revdep_with_tristate_if/Kconfig new file mode 100644 index 0000000..2bd1141 --- /dev/null +++ b/scripts/kconfig/tests/revdep_with_tristate_if/Kconfig @@ -0,0 +1,21 @@ +# SPDX-License-Identifier: GPL-2.0 + +config MODULES + def_bool y + option modules + +config A + tristate + +config B + tristate "b" + default y + select A if C + imply D if C + +config C + tristate "c" + default m + +config D + tristate "d" diff --git a/scripts/kconfig/tests/revdep_with_tristate_if/__init__.py b/scripts/kconfig/tests/revdep_with_tristate_if/__init__.py new file mode 100644 index 0000000..ad95cec --- /dev/null +++ b/scripts/kconfig/tests/revdep_with_tristate_if/__init__.py @@ -0,0 +1,14 @@ +# SPDX-License-Identifier: GPL-2.0 +""" +select/imply property with tristate if-conditional + +The reverse dependencies (select/imply) are used to define a lower limit +of another symbol. The current value of the selector is set to the lower +limit of the selectee. This did not handled correctly in the past when the +property has a tristate if-conditional. +""" + + +def test(conf): + assert conf.alldefconfig() == 0 + assert conf.config_matches('expected_config') diff --git a/scripts/kconfig/tests/revdep_with_tristate_if/expected_config b/scripts/kconfig/tests/revdep_with_tristate_if/expected_config new file mode 100644 index 0000000..9826223 --- /dev/null +++ b/scripts/kconfig/tests/revdep_with_tristate_if/expected_config @@ -0,0 +1,9 @@ +# +# Automatically generated file; DO NOT EDIT. +# Main menu +# +CONFIG_MODULES=y +CONFIG_A=y +CONFIG_B=y +CONFIG_C=m +CONFIG_D=y