{"id":2232211,"url":"http://patchwork.ozlabs.org/api/patches/2232211/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/20260503204936.3151124-7-sjg@chromium.org/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260503204936.3151124-7-sjg@chromium.org>","list_archive_url":null,"date":"2026-05-03T20:49:24","name":"[6/6] aristainetos2: Quote rescue_reason in rescueboot test","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"736f6e482e4c0a69dc9acf9ba4a11fa49a9d3296","submitter":{"id":6170,"url":"http://patchwork.ozlabs.org/api/people/6170/?format=json","name":"Simon Glass","email":"sjg@chromium.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/20260503204936.3151124-7-sjg@chromium.org/mbox/","series":[{"id":502588,"url":"http://patchwork.ozlabs.org/api/series/502588/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=502588","date":"2026-05-03T20:49:18","name":"test: Quote variables in 'test -n' expressions across boards","version":1,"mbox":"http://patchwork.ozlabs.org/series/502588/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2232211/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2232211/checks/","tags":{},"related":[],"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 (1024-bit key;\n unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256\n header.s=google header.b=aGZnQ3xf;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)","phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=chromium.org","phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de","phobos.denx.de;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=chromium.org header.i=@chromium.org\n header.b=\"aGZnQ3xf\";\n\tdkim-atps=neutral","phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=chromium.org","phobos.denx.de;\n spf=pass smtp.mailfrom=sjg@chromium.org"],"Received":["from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g7xkn0T2Nz1yJ0\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 04 May 2026 06:50:57 +1000 (AEST)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id A166584662;\n\tSun,  3 May 2026 22:50:30 +0200 (CEST)","by phobos.denx.de (Postfix, from userid 109)\n id 9AB088464D; Sun,  3 May 2026 22:50:29 +0200 (CEST)","from mail-oo1-xc2c.google.com (mail-oo1-xc2c.google.com\n [IPv6:2607:f8b0:4864:20::c2c])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 7D29F84660\n for <u-boot@lists.denx.de>; Sun,  3 May 2026 22:50:27 +0200 (CEST)","by mail-oo1-xc2c.google.com with SMTP id\n 006d021491bc7-6948ff6b006so1745153eaf.2\n for <u-boot@lists.denx.de>; Sun, 03 May 2026 13:50:27 -0700 (PDT)","from chromium.org ([174.51.25.52]) by smtp.gmail.com with ESMTPSA id\n 006d021491bc7-696aacbb5bbsm1142940eaf.15.2026.05.03.13.50.23\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sun, 03 May 2026 13:50:24 -0700 (PDT)"],"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,DKIMWL_WL_HIGH,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,\n RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=chromium.org; s=google; t=1777841426; x=1778446226; darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=tJj2F6JGMvoSjYyhBNZSUOjZo+JCbk3ECrqciJaznA0=;\n b=aGZnQ3xf62EWWQ+nP/iLIz84jGvi1hpr2vmtbgEyw1enAFBOuolL9GntByiH7d2CdS\n INRfEwXYqa4W1yZzjhdqlizYgp1fbuZamdAppNHvCoN+KPtHD/9gmDYB9tQQJm8R8wo9\n XQWlMWpV2qlgeZdnLhZZXNIeKw8MwSy6w8KDg=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777841426; x=1778446226;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=tJj2F6JGMvoSjYyhBNZSUOjZo+JCbk3ECrqciJaznA0=;\n b=NgPav//gvGHb9neqFvuojDpV75K+ppg1Tmp40lRrkuMEqL4yO3cAbms1YWJ6l7Sx+5\n eUr5kQ4DoSqm3Q4s1m2dG6VAprXC26JhAPkR9YUWZvlzOufXDmUiw3Sr+0hDiX7NlLzu\n YHvWr49EiafeS0DrB/opGzFcSvnpeNnnZy1Q8kQgZo3dy7WN8fnKcJei12yMGypzonqE\n wL5HKZf/l/M8VDnbDIUt25XAbvT7v7WpwqJCf3VM0MVe0bhaarukbvQJef+g/0NjlEmr\n 5pfqnboQLzjHhM30PJTvzZTU/BWVoA45PmDTe5yUSfXSxCM9Ikly99vwPEl+qWgGW5xr\n AZbQ==","X-Gm-Message-State":"AOJu0YyB8teclYF7yaUXvHq+/nXFvhHq1z8hDEtSwExTmvPDFOiF8gw9\n RMIcKQXVvdBWCXXOvPd5gElOvhtwiyFUA1ePKBV8H3Lo3fxtESG7DF2G4WFPQGWzK/c8ntED/2a\n p3bx3Og==","X-Gm-Gg":"AeBDievF/kjX8SXodyjcI0yAdpFv5B37ixEEmdP7yU5BSX5M9V89Uww2Y+ZqUxPeOi9\n 2IGFNe9fa/2qTbjgqNTumbqAx6kG3KehqL62GbLeFHmhCf5+8q1WchJYEh88Ip3c2dqMHGivTXO\n 3pFxCdvV41yqyo2qHckOM/UVa0iRDSNksRfdKFVoSSYYmiGJrpsq8vTKHuoEyqruqaREFsrEyUb\n 8fb/Wf9zs/aeuGdJ/8cltBe8HaRZ7qceT0TxoruyMQMpkVq05ObDAHP2OtzrkBNjpphwZzW3BMy\n nYrgh0DCMAURk5hF1YpMwVm8/wAXVn7RedFWe79Tzgdh5tcK1NUAtAopoJ7bOnr/htveeR5R63b\n Exrc99ULhvH8a5Ru3EZ8n0pvZXlA9yCXEKJVYw4zpAXcxPgQAIpJQ/W7vQVVh5rrP0DmaSIeA90\n 1jLsTNAXZWOog6w8/WQcWQwtK6nkDSG9N5P6kcFlM=","X-Received":"by 2002:a05:6820:1887:b0:696:926d:ce3a with SMTP id\n 006d021491bc7-696979f4744mr3762977eaf.26.1777841425724;\n Sun, 03 May 2026 13:50:25 -0700 (PDT)","From":"Simon Glass <sjg@chromium.org>","To":"u-boot@lists.denx.de","Cc":"Simon Glass <sjg@chromium.org>, Heiko Schocher <hs@nabladev.com>,\n Rasmus Villemoes <ravi@prevas.dk>, Tom Rini <trini@konsulko.com>","Subject":"[PATCH 6/6] aristainetos2: Quote rescue_reason in rescueboot test","Date":"Sun,  3 May 2026 14:49:24 -0600","Message-ID":"<20260503204936.3151124-7-sjg@chromium.org>","X-Mailer":"git-send-email 2.43.0","In-Reply-To":"<20260503204936.3151124-1-sjg@chromium.org>","References":"<20260503204936.3151124-1-sjg@chromium.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","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"},"content":"The rescueboot script optionally runs a per-board rescue_reason hook\nwith:\n\n    if test -n ${rescue_reason}; then run rescue_reason; fi;\n\nThe default state is \"no rescue reason script\", i.e. rescue_reason\nunset.  The expression then expands to 'test -n' with no operand and\nrelies on a U-Boot 'test' quirk that treats a missing operand as\nfalse to skip the run.\n\nQuote the variable so an unset rescue_reason expands to 'test -n \"\"'\nand the emptiness check is explicit.\n\nFixes: 8b0619579b22 (\"cmd: test: fix handling of single-argument form of test\")\nSigned-off-by: Simon Glass <sjg@chromium.org>\n---\n\n include/configs/aristainetos2.h | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)","diff":"diff --git a/include/configs/aristainetos2.h b/include/configs/aristainetos2.h\nindex 8a66b1275df..2078ebc5282 100644\n--- a/include/configs/aristainetos2.h\n+++ b/include/configs/aristainetos2.h\n@@ -211,7 +211,7 @@\n \t\t\"${pubkey}\\0\" \\\n \t\"rescueboot=echo Booting rescue system ...; \" \\\n \t\t\"run addmtd addmisc;\" \\\n-\t\t\"if test -n ${rescue_reason}; then run rescue_reason;fi;\" \\\n+\t\t\"if test -n \\\"${rescue_reason}\\\"; then run rescue_reason;fi;\" \\\n \t\t\"run boot_board_type;\" \\\n \t\t\"if bootm ${fit_addr_r}; then ; \" \\\n \t\t\"else \" \\\n","prefixes":["6/6"]}