Received: by 10.223.176.5 with SMTP id f5csp1276609wra; Wed, 7 Feb 2018 16:17:51 -0800 (PST) X-Google-Smtp-Source: AH8x226HKlqll+ygFSk/YyfkGOZER2psynOHth23FGRgLDYBJpw+Nw+dhHjgc4h3HSUV3CSnyP52 X-Received: by 2002:a17:902:ab8d:: with SMTP id f13-v6mr7831198plr.215.1518049070948; Wed, 07 Feb 2018 16:17:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518049070; cv=none; d=google.com; s=arc-20160816; b=R/T3I80EbO0B3Py33YxZiQwBUNqUNcfeguqDT4aRipmZfk08BRJQRoR+E93V+cMc0c 26HCsjgKe2aeHbEGNlMDMPEjm+lfHmPTLfCm7f9KEv95/Uccc5PIfa0D8BzEdMb3TQ9g C2HbwYmvQ4YQFvbCZXWB3ogYJKOkM1gJOKHEpqstHrQv749TQUDN2WX3m6NHdexSAtBd xtlPYn/O2OP2xBrlKogffIU1HdFOpFQqWlRp0r01TvIPwPizSbSzeVSXvi2rvuKwqn6C gv78C0zgWcBiKbl+gVSfGon/d2Iavi4w9vyJqC/P+Xn10jzVlsHS13XYW9vWBDLGsqoG ftuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=h4P+DXkDzofwetB0X0Gfo6pmDtgOrYbS7m8kphFEzsQ=; b=s1C0CdqKx+DROuONfw1/sfyZeQE7sxq9psh9S/JehtvQem6wk4NP8fBKdlhWMw8n9P +71VjYNEGfJIZ9GnFJNnqBTM2JnMfotxDDslRo+1FdXDIv7Gc1XuVupTROnYjLVPUq+u ofavRWibgxom4kc45Ka5Mtsy9ZczqiifFmSsI1wG9BvAy+FqwzDQzyUMC8fZ/POJJIa7 3bzAz6tlBfsXsKAExEzeX0PoAi0ozFDob2q5pQ01XfeD5phtAfvz6siG5LqB9kuP8OFS ewkpJDvKaTC3aOsZTfvZAolTbyoJ3kcz+vWjVVqVUXqc8myvyeMFTJQwP8YvIk7PPaWa JtWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RhXBjZj7; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p6si1587397pgd.282.2018.02.07.16.17.37; Wed, 07 Feb 2018 16:17:50 -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=@gmail.com header.s=20161025 header.b=RhXBjZj7; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751835AbeBHAQw (ORCPT + 99 others); Wed, 7 Feb 2018 19:16:52 -0500 Received: from mail-ua0-f196.google.com ([209.85.217.196]:42952 "EHLO mail-ua0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750767AbeBHAQu (ORCPT ); Wed, 7 Feb 2018 19:16:50 -0500 Received: by mail-ua0-f196.google.com with SMTP id 47so1788440uau.9; Wed, 07 Feb 2018 16:16:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=h4P+DXkDzofwetB0X0Gfo6pmDtgOrYbS7m8kphFEzsQ=; b=RhXBjZj7UVk5k/6VIPofRVkeKYWD8QIMnVZVWxYMvKwJaUAaWFQ5JEkIXgfCLD+v1t TuPKHEhXgSyIUuujv9SJzZSIKN96thyEhuzrZNv0iMR+Gyl8IWlVXCW/4bppYMBIuAqo 0sd+l7xSIY2kSxPhaHd97TG9/pQGM3aJu7Fj9AwqD2L0iK4bdasHKYY4DJgtBf1yVdhg bFD4w25bnJoaDhbkZluy2FfLk8XVKmtjHk7sGMM6xJgLQYzbSnBbUw1TKX3W1MJpH5Lg En/+X8h0QM1jnL0WFnubPKzaRfBmKF2DZ4pyHb8E6wmjo3kdbOFvSES/HT83swnG5gVw nO4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=h4P+DXkDzofwetB0X0Gfo6pmDtgOrYbS7m8kphFEzsQ=; b=fh8NIh8q5tkB2umyznOnn5zPPHgtAcYgncO110iL94MvAJvaofD0eT9R0mBAQNuYw4 xc9ESbOhZdeKHxKfdjIjcl9aLBA++sdeTCpEzbJU9q0GJ2Cfus6q3TL6nn9uqtbbE4vA 6htvBsB6KTB2bZjEsY1pY0GStRd99mLo4CC+puBTsdWzkZuNiH+/YBXom/i4ZFOTeG66 ZLLjIdRRq//K4k9D+/cCNzrHTv5vVzDxmTRnSfQtEypKETSEp8+IKktjcOxO/K81EaIR 8568kaBn6l8aYLvkuB5qJ/MWITCfMNc1rFTnK0Wx0KklXPKJzClxv6XridyyB3EIHp1/ bWMw== X-Gm-Message-State: APf1xPApbb1qkyzzGqGRNns+mqTZ52scOGrzm9ShPCW19gt/26u8m1g4 qE0S8PVUuuUAVL4uk5vpz9trndUvemkBTxo+IQs= X-Received: by 10.159.36.247 with SMTP id 110mr6792187uar.77.1518049009628; Wed, 07 Feb 2018 16:16:49 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.70.21 with HTTP; Wed, 7 Feb 2018 16:16:49 -0800 (PST) In-Reply-To: <1517877294-4826-15-git-send-email-yamada.masahiro@socionext.com> References: <1517877294-4826-1-git-send-email-yamada.masahiro@socionext.com> <1517877294-4826-15-git-send-email-yamada.masahiro@socionext.com> From: Ulf Magnusson Date: Thu, 8 Feb 2018 01:16:49 +0100 Message-ID: Subject: Re: [PATCH 14/14] kconfig: test: check if recursive inclusion is detected To: Masahiro Yamada Cc: Linux Kbuild mailing list , Greg Kroah-Hartman , Andrew Morton , Nicolas Pitre , "Luis R . Rodriguez" , Randy Dunlap , Sam Ravnborg , Michal Marek , Linus Torvalds , Linux Kernel Mailing List 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 Tue, Feb 6, 2018 at 1:34 AM, Masahiro Yamada wrote: > If recursive inclusion is detected, it should fail with error messages. > Test this. > > Signed-off-by: Masahiro Yamada > --- > > scripts/kconfig/tests/err_recursive_inc/Kconfig | 1 + > scripts/kconfig/tests/err_recursive_inc/Kconfig.inc | 1 + > scripts/kconfig/tests/err_recursive_inc/__init__.py | 10 ++++++++++ > scripts/kconfig/tests/err_recursive_inc/expected_stderr | 4 ++++ > 4 files changed, 16 insertions(+) > create mode 100644 scripts/kconfig/tests/err_recursive_inc/Kconfig > create mode 100644 scripts/kconfig/tests/err_recursive_inc/Kconfig.inc > create mode 100644 scripts/kconfig/tests/err_recursive_inc/__init__.py > create mode 100644 scripts/kconfig/tests/err_recursive_inc/expected_stderr > > diff --git a/scripts/kconfig/tests/err_recursive_inc/Kconfig b/scripts/kconfig/tests/err_recursive_inc/Kconfig > new file mode 100644 > index 0000000..3ce7a3f > --- /dev/null > +++ b/scripts/kconfig/tests/err_recursive_inc/Kconfig > @@ -0,0 +1 @@ > +source "Kconfig.inc" > diff --git a/scripts/kconfig/tests/err_recursive_inc/Kconfig.inc b/scripts/kconfig/tests/err_recursive_inc/Kconfig.inc > new file mode 100644 > index 0000000..1fab1c1 > --- /dev/null > +++ b/scripts/kconfig/tests/err_recursive_inc/Kconfig.inc > @@ -0,0 +1 @@ > +source "Kconfig" > diff --git a/scripts/kconfig/tests/err_recursive_inc/__init__.py b/scripts/kconfig/tests/err_recursive_inc/__init__.py > new file mode 100644 > index 0000000..1dae64f > --- /dev/null > +++ b/scripts/kconfig/tests/err_recursive_inc/__init__.py > @@ -0,0 +1,10 @@ > +""" > +Detect recursive inclusion error > +================================ > + > +If recursive inclusion is detected, it should fail with error messages. > +""" > + > +def test(conf): > + assert conf.oldaskconfig() != 0 > + assert conf.stderr_contains('expected_stderr') > diff --git a/scripts/kconfig/tests/err_recursive_inc/expected_stderr b/scripts/kconfig/tests/err_recursive_inc/expected_stderr > new file mode 100644 > index 0000000..b256c91 > --- /dev/null > +++ b/scripts/kconfig/tests/err_recursive_inc/expected_stderr > @@ -0,0 +1,4 @@ > +Kconfig:1: recursive inclusion detected. Inclusion path: > + current file : 'Kconfig' > + included from: 'Kconfig.inc:1' > + included from: 'Kconfig:3' > -- > 2.7.4 > Reviewed-by: Ulf Magnusson