From patchwork Wed Aug 28 20:19:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume Tucker X-Patchwork-Id: 172482 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1249103ily; Wed, 28 Aug 2019 13:20:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJB8kI8jXACZssu6NkstQO89Zw+yPOUWmmzHJIWLtTuOXVck+q1JxAe4529TVMkPmPm+z7 X-Received: by 2002:a17:90a:3646:: with SMTP id s64mr6147582pjb.44.1567023601103; Wed, 28 Aug 2019 13:20:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567023601; cv=none; d=google.com; s=arc-20160816; b=yrbbAyo5mUR8bZF1N/YCJMBvS1z+mzvb4vKy29Coz15uDxiJ/xyijbDDcrkt7LWs8K HiINpt6yMslTlHQGQfGMLcAETkoHyxhw3vC0AUGODhC+LGuSTNfsJLAjiJFmdnQuVbLS nuFzvKNqL0eANv1KS2k4aXa2xx6FQiIFR6cpdZ28yob/fpZ4h9L2Vqg/agmL+Nho4njL ZThwqHTV8N8TGwz6t5DDCiruzzhO7/MrkcPkTrr76dREdfl+jw3oi5ZaHcZqSXrnIVAi x2xqh/7tYDZYunbR+3JQzslqYwJzABM0YQFsgAf/m+IqDt64XqQLkHyUmXOTpsWWJC4l 2KZg== 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; bh=GLq9tZsM1EWcIE1DFgZiClbzOWjny9gssgZy0rOe334=; b=P5U/71lapv3KGumfF7fYGKWeHgvPJJ+QQm9pzSzZwdgq5J/jwiplffZyv2ZjcNxzYf 59OGzVW9ZAy02kQ+4a+jB0T30TRvG4Gh6aoj9RAiaga4noTRcKHZ8HAijnzRDtiq1C6d VJ5Ue2zFVyep2PrYMVxRv/4zHw9NI8XWK9S32z7Vt5DTg7kS5D+F1wvFtcw3Qev0Ut0C Wiy3lhC1nDoiBmYR//ZEckJxWG3elq+C7JuCjc+NsAyGkkA4AaLPBmQeiGfCpiqvMWD5 netfL20LFTisri8N+MRmhVzYp0FEBhxbrvnwncRvE46Ibbnvm90WdwZHvKKE188ngOEp xywg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p186si90031pgp.373.2019.08.28.13.20.00; Wed, 28 Aug 2019 13:20:01 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726830AbfH1UT6 (ORCPT + 28 others); Wed, 28 Aug 2019 16:19:58 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:53132 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726400AbfH1UT6 (ORCPT ); Wed, 28 Aug 2019 16:19:58 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: gtucker) with ESMTPSA id 5F8BF289CD5 From: Guillaume Tucker To: Masahiro Yamada , Mark Brown Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Guillaume Tucker Subject: [PATCH 1/1] merge_config.sh: ignore unwanted grep errors Date: Wed, 28 Aug 2019 21:19:18 +0100 Message-Id: <4f92e9b3a88e60c8b5962504d77bc596442b0a40.1567023309.git.guillaume.tucker@collabora.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The merge_config.sh script verifies that all the config options have their expected value in the resulting file and prints any issues as warnings. These checks aren't intended to be treated as errors given the current implementation. However, since "set -e" was added, if the grep command to look for a config option does not find it the script will then abort prematurely. Handle the case where the grep exit status is non-zero by setting ACTUAL_VAL to an empty string to restore previous functionality. Fixes: cdfca821571d ("merge_config.sh: Check error codes from make") Signed-off-by: Guillaume Tucker --- scripts/kconfig/merge_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh index d924c51d28b7..d673268d414b 100755 --- a/scripts/kconfig/merge_config.sh +++ b/scripts/kconfig/merge_config.sh @@ -177,7 +177,7 @@ make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET for CFG in $(sed -n -e "$SED_CONFIG_EXP1" -e "$SED_CONFIG_EXP2" $TMP_FILE); do REQUESTED_VAL=$(grep -w -e "$CFG" $TMP_FILE) - ACTUAL_VAL=$(grep -w -e "$CFG" "$KCONFIG_CONFIG") + ACTUAL_VAL=$(grep -w -e "$CFG" "$KCONFIG_CONFIG" || echo) if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then echo "Value requested for $CFG not in final .config" echo "Requested value: $REQUESTED_VAL"