From patchwork Wed May 20 22:01:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olof Johansson X-Patchwork-Id: 6450421 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3240A9F1C1 for ; Wed, 20 May 2015 22:03:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3B142203ED for ; Wed, 20 May 2015 22:03:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E20F203B0 for ; Wed, 20 May 2015 22:03:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754177AbbETWCv (ORCPT ); Wed, 20 May 2015 18:02:51 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:33620 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753923AbbETWCq (ORCPT ); Wed, 20 May 2015 18:02:46 -0400 Received: by padbw4 with SMTP id bw4so81632570pad.0 for ; Wed, 20 May 2015 15:02:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kD50Rda6fPFazUZo/vCsIS6MdpSa30FtWE/bQ1NDCaI=; b=QlKkxbfW/tZrql4aO7S+/tpcqzfbiIyS5uo8icEiGXaW1JT4b7uW+Y8n2jOQngTHWe Lo4ZhISxFG6GaV40FScmC9QKvxy09ea9DDwjzU2UjfwN+CrM9OpuKE+uKqIxLIU54rob FUqhqucEhOPlRT7ek9Un8RatI+wnazkljfmsSnl4eKu/Q/xU1CkW5B81C8x4wRKAYlxU PA/xKUKDFM7lCOrawduiQgA1sJfyQRe23mGgmF5PFZi7462Z+rUoExySoyv1VQDNGshZ uQMBzWsL5SP9gZoFEMa6wxgl8vnEkMT0WObFAnvFszsAxK2v5VjFn+XSbeu7U5DKPMp3 gbSg== X-Gm-Message-State: ALoCoQlKmilZr8rKf/EdPXXBFjqOC3VZH0vJjJT/kYNcsRIU9RbWl6TIVMoSmiRBRKbGqhl9aq8D X-Received: by 10.70.87.195 with SMTP id ba3mr63649713pdb.154.1432159365955; Wed, 20 May 2015 15:02:45 -0700 (PDT) Received: from brutus.lixom.net (173-13-129-225-sfba.hfc.comcastbusiness.net. [173.13.129.225]) by mx.google.com with ESMTPSA id ux6sm17193507pab.24.2015.05.20.15.02.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 May 2015 15:02:45 -0700 (PDT) From: Olof Johansson To: yann.morin.1998@free.fr Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, dvhart@linux.intel.com, john.stultz@linaro.org, jwboyer@redhat.com, Olof Johansson Subject: [PATCH 10/10] merge_config.sh: add tests for cmdline configs Date: Wed, 20 May 2015 15:01:00 -0700 Message-Id: <1432159260-39390-11-git-send-email-olof@lixom.net> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1432159260-39390-1-git-send-email-olof@lixom.net> References: <1432159260-39390-1-git-send-email-olof@lixom.net> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Again, these tests could be more complicated but at least it gets the very basics covered. Signed-off-by: Olof Johansson --- .../merge_config_test/12-cmdline-success.sh | 13 +++++++++ .../merge_config_test/13-cmdline-failure.sh | 13 +++++++++ .../merge_config_test/14-cmdline-reduntant.sh | 13 +++++++++ .../merge_config_test/15-cmdline-complex.sh | 30 ++++++++++++++++++++ 4 files changed, 69 insertions(+) create mode 100755 scripts/kconfig/merge_config_test/12-cmdline-success.sh create mode 100755 scripts/kconfig/merge_config_test/13-cmdline-failure.sh create mode 100755 scripts/kconfig/merge_config_test/14-cmdline-reduntant.sh create mode 100755 scripts/kconfig/merge_config_test/15-cmdline-complex.sh diff --git a/scripts/kconfig/merge_config_test/12-cmdline-success.sh b/scripts/kconfig/merge_config_test/12-cmdline-success.sh new file mode 100755 index 0000000..f8f2bf1 --- /dev/null +++ b/scripts/kconfig/merge_config_test/12-cmdline-success.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +. "$(dirname $0)/common.sh" + +# Turn off an option + +merge CONFIG_64BIT=n +M=$? + +check CONFIG_64BIT=y +G=$? + +[ $M -eq 0 -a $G -ne 0 ] diff --git a/scripts/kconfig/merge_config_test/13-cmdline-failure.sh b/scripts/kconfig/merge_config_test/13-cmdline-failure.sh new file mode 100755 index 0000000..6504786 --- /dev/null +++ b/scripts/kconfig/merge_config_test/13-cmdline-failure.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +. "$(dirname $0)/common.sh" + +# Try to turn off an option that won't turn off. + +merge CONFIG_MMU=n +M=$? + +check CONFIG_MMU=y +G=$? + +[ $M -ne 0 -a $G -eq 0 ] diff --git a/scripts/kconfig/merge_config_test/14-cmdline-reduntant.sh b/scripts/kconfig/merge_config_test/14-cmdline-reduntant.sh new file mode 100755 index 0000000..c9c3fab --- /dev/null +++ b/scripts/kconfig/merge_config_test/14-cmdline-reduntant.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +. "$(dirname $0)/common.sh" + +# Make sure redundant options are warned about + +merge_r CONFIG_64BIT=n CONFIG_64BIT=n +M=$? + +check CONFIG_64BIT=y +G=$? + +[ $M -ne 0 -a $G -ne 0 ] diff --git a/scripts/kconfig/merge_config_test/15-cmdline-complex.sh b/scripts/kconfig/merge_config_test/15-cmdline-complex.sh new file mode 100755 index 0000000..b754610 --- /dev/null +++ b/scripts/kconfig/merge_config_test/15-cmdline-complex.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +. "$(dirname $0)/common.sh" + +# Make sure redundant options are warned about + +FRAG1=$(writefrag) << EOF +CONFIG_EMBEDDED=y +EOF + +FRAG2=$(writefrag) << EOF +CONFIG_MMU=n +EOF + +merge_r ${FRAG1} CONFIG_64BIT=n ${FRAG2} +M=$? + +check CONFIG_64BIT=y +G1=$? + +check CONFIG_EMBEDDED=y +G2=$? + +check CONFIG_MMU=y +G3=$? + +[ $G1 -ne 0 -a $G2 -eq 0 -a $G3 -eq 0 ] +G=$? + +[ $M -ne 0 -a $G -eq 0 ]