[{"id":3685512,"web_url":"http://patchwork.ozlabs.org/comment/3685512/","msgid":"<20260504083428.14b3bc8d@wsk>","list_archive_url":null,"date":"2026-05-04T06:34:28","subject":"Re: [PATCH 5/6] mccmon6: Quote recovery_status in bootcmd test","submitter":{"id":91547,"url":"http://patchwork.ozlabs.org/api/people/91547/","name":"Łukasz Majewski","email":"lukma@nabladev.com"},"content":"On Sun,  3 May 2026 14:49:23 -0600\nSimon Glass <sjg@chromium.org> wrote:\n\n> The mccmon6 bootcmd starts with:\n> \n>     if test -n ${recovery_status}; then run boot_recovery; ...\n> \n> The default state is \"no recovery requested\", i.e. recovery_status\n> unset.  The expression then expands to 'test -n' with no operand and\n> relies on a U-Boot 'test' quirk that treats a missing operand as\n> false to skip recovery.\n> \n> Quote the variable so an unset recovery_status expands to 'test -n \"\"'\n> and the emptiness check is explicit.\n> \n> Fixes: 8b0619579b22 (\"cmd: test: fix handling of single-argument form\n> of test\") Signed-off-by: Simon Glass <sjg@chromium.org>\n> ---\n> \n>  include/configs/mccmon6.h | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/include/configs/mccmon6.h b/include/configs/mccmon6.h\n> index 9f401718bfb..0cf62d6bda8 100644\n> --- a/include/configs/mccmon6.h\n> +++ b/include/configs/mccmon6.h\n> @@ -88,7 +88,7 @@\n>  \t\t     \"bootm $loadaddr};reset;\" \\\n>  \t\t\"fi\\0\" \\\n>  \t\"bootcmd=\" \\\n> -\t\t\"if test -n ${recovery_status}; then \" \\\n> +\t\t\"if test -n \\\"${recovery_status}\\\"; then \" \\\n>  \t\t     \"run boot_recovery;\" \\\n>  \t\t\"else \" \\\n>  \t\t     \"if test ! -n ${boot_medium}; then \" \\\n\nReviewed-by: Łukasz Majewski <lukma@nabladev.com>","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=nabladev.com header.i=@nabladev.com header.a=rsa-sha256\n header.s=dkim header.b=NXf/wJDr;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)","phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=nabladev.com","phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de","phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=nabladev.com header.i=@nabladev.com\n header.b=\"NXf/wJDr\";\n\tdkim-atps=neutral","phobos.denx.de; dmarc=pass (p=reject dis=none)\n header.from=nabladev.com","phobos.denx.de;\n spf=pass smtp.mailfrom=lukma@nabladev.com"],"Received":["from phobos.denx.de (phobos.denx.de [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g8BhJ2YyCz1yJ9\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 04 May 2026 16:34:40 +1000 (AEST)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id F31F283FEC;\n\tMon,  4 May 2026 08:34:34 +0200 (CEST)","by phobos.denx.de (Postfix, from userid 109)\n id E94D484255; Mon,  4 May 2026 08:34:33 +0200 (CEST)","from mx.nabladev.com (mx.nabladev.com [178.251.229.89])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id EBF6683EF9\n for <u-boot@lists.denx.de>; Mon,  4 May 2026 08:34:31 +0200 (CEST)","from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon)\n with ESMTPSA id DC1061140E8; Mon,  4 May 2026 08:34:29 +0200 (CEST)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=nabladev.com;\n s=dkim; t=1777876471;\n h=from:subject:date:message-id:to:cc:mime-version:content-type:\n content-transfer-encoding:in-reply-to:references;\n bh=GVo57dwymXYjs/PcrghoYn8r13nz1bPvT56qGIJZ9Wo=;\n b=NXf/wJDrW66z8sVCbbn30HFedv0M0rXd87b/g5wjgxziBtvLql/Ya+TrqDCNt/v6eeu6+f\n NDxTQilf1yu+J0G4Oy6ao1YytcVqmJm/IfULxPPdP06NRM8jK4Rb8ShzIB5WBq/Cdz8v5k\n 1EVXrCfVBAJyYVKLzOMg1wA11xOCD6DHuSOIL0MwjVHrd12Df3vNyvo3uPfqVkd005UJp1\n sxQt9tm4/+eMYrWyP4HeOOXFmGb2x0Qlz8zgc87HUiFygglaQXLRNo3OrzMc/Qwv0TslEE\n AKAvsBS6DUWIVG5Evi0wKchEx1RLKKX51mqFeke+0NcZngmyqqh9o6RtzKZD8Q==","Date":"Mon, 4 May 2026 08:34:28 +0200","From":"=?utf-8?q?=C5=81ukasz?= Majewski <lukma@nabladev.com>","To":"Simon Glass <sjg@chromium.org>","Cc":"u-boot@lists.denx.de, Rasmus Villemoes <ravi@prevas.dk>,\n Tom Rini <trini@konsulko.com>,\n =?utf-8?q?=C5=81ukasz?= Majewski <lukma@nabladev.com>","Subject":"Re: [PATCH 5/6] mccmon6: Quote recovery_status in bootcmd test","Message-ID":"<20260504083428.14b3bc8d@wsk>","In-Reply-To":"<20260503204936.3151124-6-sjg@chromium.org>","References":"<20260503204936.3151124-1-sjg@chromium.org>\n <20260503204936.3151124-6-sjg@chromium.org>","Organization":"Nabla","X-Mailer":"Claws Mail 3.19.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu)","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"quoted-printable","X-Last-TLS-Session-Version":"TLSv1.3","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.39","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<https://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>","X-Virus-Scanned":"clamav-milter 0.103.8 at phobos.denx.de","X-Virus-Status":"Clean"}}]