From patchwork Wed Oct 28 00:42:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olof Johansson X-Patchwork-Id: 7505761 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 62970BEEA4 for ; Wed, 28 Oct 2015 00:44:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 79AA8208D0 for ; Wed, 28 Oct 2015 00:44:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7A65720898 for ; Wed, 28 Oct 2015 00:44:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755046AbbJ1AnE (ORCPT ); Tue, 27 Oct 2015 20:43:04 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:36370 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755041AbbJ1AnA (ORCPT ); Tue, 27 Oct 2015 20:43:00 -0400 Received: by pacfv9 with SMTP id fv9so248532661pac.3 for ; Tue, 27 Oct 2015 17:43:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lixom_net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=z+bP7gnk1Ouel0JptAg2qSXpugmDCa2u/EnRwuHmOXI=; b=h+2SvTWKYa5Qi3djUOkoiw3FMkJbNPmY1iguTh4PtzS5JsXRUqQDgmPhaQD4zW6h1y Jg371JQFWlCOzlbXwkcvE+E6SOyS+H1gZRe4myGrJk8X8Gs7qLyGcy4nJwoeutgFXZbK pgbnBBf9UDM0itf0+avlbsKM/zEbr2JAYeOTrYxb5qXaG1/IxpiMRxTRZDXvRJbrKYXN sOceuxxVNytHucXdIwEAtFL6EJ3iqmWrFxcLa+Z9pdM1DcKy5G1ZjoTZ4Sc0WPdZnO1E vuGqWo7NjnX0xvJgQGc+fYhumiNf1OF/ISmDlXdiGo+cw5vzrTxwZTSJ4SPHjevn8gom YpLQ== 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=z+bP7gnk1Ouel0JptAg2qSXpugmDCa2u/EnRwuHmOXI=; b=aWKknsoXJf2ef6eQntb93pps8QLAanpnuVBDVWKSaQJZLE543FxdAjyIuuTrLKGdqt /xeG7T0q4lu+gxsAK7xHGLO2rOLgoTbFY43EehFZrluN871zZKAoLhuXf9fx/JEVF6DJ 9AoeAQhCnb9kXlrwtiSNROIjtSGhp3YnCN7uQYpORz8XGqAUpSZeo8bR+1MqYNCidAKU B2VvVG4VzDP7Gnw/KUsfzIg2Bdg2cm6SeXCxmoirp7SdO5XWgGbn3CdzDWyfsfH4/6Bg deltPBl+B6XbXEupfFDCjuD8XqpXRSjsBKVPOQp8Y1DA1VayuTRnVBYzONfHNMsdEhDa 7sAA== X-Gm-Message-State: ALoCoQn1kZ+RXKE6fpvtrw/YjWHJTW/XcDZiT22TTC6rClQKxg2wmgjWG+DH5kfYv4Wwp7q4VzH1 X-Received: by 10.68.57.176 with SMTP id j16mr31694609pbq.166.1445992980192; Tue, 27 Oct 2015 17:43:00 -0700 (PDT) Received: from localhost.localdomain ([58.123.138.250]) by smtp.gmail.com with ESMTPSA id t9sm41801385pbs.17.2015.10.27.17.42.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Oct 2015 17:42:59 -0700 (PDT) From: Olof Johansson To: Michal Marek Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, dvhart@linux.intel.com, Olof Johansson Subject: [PATCH 10/10] merge_config.sh: add tests for cmdline configs Date: Wed, 28 Oct 2015 09:42:11 +0900 Message-Id: <1445992931-28107-11-git-send-email-olof@lixom.net> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1445992931-28107-1-git-send-email-olof@lixom.net> References: <1445992931-28107-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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Signed-off-by: Darren Hart --- .../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 ]