From patchwork Fri Nov 1 13:02:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Goodbody X-Patchwork-Id: 840099 Delivered-To: patch@linaro.org Received: by 2002:adf:a38c:0:b0:37d:45d0:187 with SMTP id l12csp816761wrb; Fri, 1 Nov 2024 06:03:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVMbzGheEDOJwhWb+mzJW1RPKWDUwbBq74zpVlvUAtWvzPiQzjkBq04RukHJbTdxIH7lUH/9g==@linaro.org X-Google-Smtp-Source: AGHT+IHNPAht30V6MQEguQrvH6A4s4B4EMSvMzjVFFVC3yywNi/Fp5RSc+b6gm7Vvlzp7gKLNHFl X-Received: by 2002:a05:6000:71e:b0:37d:50e3:e7 with SMTP id ffacd0b85a97d-381c7ae087fmr3446310f8f.52.1730466211557; Fri, 01 Nov 2024 06:03:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730466211; cv=none; d=google.com; s=arc-20240605; b=XNYlB0p7nKV2zhf8FtMcZj5ZrM2rvdO2W7S5v8BRGoQVr6OWscoU0C7C617bNqTnvk LP7aA1PyV8+Twn5j9Jo34fDjd7VTDyp0pZlWlr5MufCtv4Z8IXiVjgQsmoA7T/MG2tW0 6s/STCnhE8hqkrZfPGxl2Bo1o5PbaGmRzaFQ48xChubnjJdWpcYnPfV74N3PxKnRXFnB e3aO2KAon/5h/nsRE0j2gsN/ETO2qntB4h1hv3lLGjYSomAntLDhevByWyHgpSb44RQH sAjI/3IJcd/dSjNKnw+1myJTAWKy6WW8Y1ng0mVciofIgzH0My/67Dq3CC9jZxpMo+m0 8bYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+3icd2yFLZWb6+pGkFbHqJAz4eaoyUuqQNyBd11eupY=; fh=mvv6mVRmKOPcEmZLoMLLhpun845FJri2xT3sxnR+3xI=; b=lilvm3ZAu9e7Uas7Nu9W/5ofbR7aQKlPj+3OlqnVranqa6yVzVNo9FQNlp+3oh/oed H7UQuGOcyyy4Hfn1shaEJWaeB1/+mk7I/fpSpppGh6y7ZGYOtgMiNVWMV3NBeAroISCB VaFN7fODf4PqfgSJxcDlVrNM5ROdcGrgp531I0jflJqsbc4/o9xALWy33T+DSi6gO6Ws mxSR3LTzie+eLtD+ivwyssbhL3kVFp08ufS6N1N+zAll5KGHern7GgB8ygvpB1y10lZx Lk+EJ3IWS/5gYCXoySMqVc0xWFDiEsEEBREBhruPE18tb5OHNpYCCGXxhQGomlQ/Txl9 H/ZQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kg+qdJ2t; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id ffacd0b85a97d-381c10e044dsi2534919f8f.221.2024.11.01.06.03.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Nov 2024 06:03:31 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kg+qdJ2t; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C3F3C892C6; Fri, 1 Nov 2024 14:03:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="kg+qdJ2t"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 59676892C6; Fri, 1 Nov 2024 14:03:29 +0100 (CET) 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, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 56546892EA for ; Fri, 1 Nov 2024 14:03:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=andrew.goodbody@linaro.org Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2fb51e00c05so31114771fa.0 for ; Fri, 01 Nov 2024 06:03:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730466207; x=1731071007; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+3icd2yFLZWb6+pGkFbHqJAz4eaoyUuqQNyBd11eupY=; b=kg+qdJ2tQAUzv63aA+tqbmJjhRcHl5jorhR4GutsjtWY7tO879CzxROCAsiSQh5H65 55peAuKIUjq8OfeMLWO/18JtKh5ED1Dh2rVuJ37hYn7EDCYgA8fJjiUYsYz8NtqKOhDo PujYNsM5YTi5GxFY4oLCHv/WGuuPoyDCf7TwIV/cy2UsN4ogXHF5PI8rIgLMNZRo6t/u cNHYct8LNNGWvwt7xT+WV9xbp1o7WUIz9mvGOcPII+/UR/WCrABgLN3lesAKKggf/h/C V+FYFObH8tqc9307Mj1gDvqxZHjCiNkNRMxjxsARoLIFM3xCicCiCUi5YOdL7a+v988p jtyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730466207; x=1731071007; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+3icd2yFLZWb6+pGkFbHqJAz4eaoyUuqQNyBd11eupY=; b=uGoSypRiNXUB1Riw92wbKdq+avuopI34kUHgCvjYAGefdtB1GPLVBT8wt8A406+bUj IdOi8FclwZi3ALbRSHmo7EzBKjfQiotoLBc9GlcNxsUHTH3iy+SAOdzrM2hTvnvoQiBa lt8gMt2s1cfs0r+2WukHBk3UABOkMVEztzx/V3vUDrscX7X/LsFGiulR9FcmiKEC1Mhs GH0ANTr7/Sy6MSDmfH0pj2Ki7bcs2B/mEpwlnU+e0uTt06m3BnTtp/3laakTuhNaYDRS DHK48uFO+J1x0OBYSCYlZ+pETZ/F5KPT7xZxkEa4qal4y4gHEV0E68zFE0c8TzpM4Qx1 kIJA== X-Gm-Message-State: AOJu0YzDmq+5VVDBMc6ew0eYwJCQh78SCR54q6BzAKDTkt9KP6LXNFGx v8gceJmlFF0ciAycNbbY4fUF0V0w8d8rplUF8i0Knx0HUWClXcNcFUNMRCCq09kAcA5reRJezDm kurI= X-Received: by 2002:a2e:bd09:0:b0:2fa:d604:e522 with SMTP id 38308e7fff4ca-2fedb669b19mr31690021fa.0.1730466206390; Fri, 01 Nov 2024 06:03:26 -0700 (PDT) Received: from artemis2.broadband ([2a0a:ef40:edb:fc01:7dcf:21b3:7ed8:3010]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d685287sm62986385e9.35.2024.11.01.06.03.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Nov 2024 06:03:25 -0700 (PDT) From: Andrew Goodbody To: u-boot@lists.denx.de Cc: Andrew Goodbody , Simon Glass , Tom Rini Subject: [PATCH 1/2] test: bootm: bootm_process_cmdline_env takes flags Date: Fri, 1 Nov 2024 13:02:53 +0000 Message-Id: <20241101130254.473017-2-andrew.goodbody@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241101130254.473017-1-andrew.goodbody@linaro.org> References: <20241101130254.473017-1-andrew.goodbody@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The function bootm_process_cmdline_env takes flags as its third parameter, not a bool. Correct the usage by replacing 'true' with BOOTM_CL_ALL so that the intent is clear. A similar change was made throughtout this file in the previous commit to the one mentioned below as being fixed. Fixes: 4448fe8e4e7c ("bootm: Allow updating the bootargs in a buffer") Signed-off-by: Andrew Goodbody Reviewed-by: Simon Glass --- test/bootm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/bootm.c b/test/bootm.c index 26c15552bf..5f57ecb337 100644 --- a/test/bootm.c +++ b/test/bootm.c @@ -27,11 +27,11 @@ static int bootm_test_nop(struct unit_test_state *uts) char buf[BUF_SIZE]; *buf = '\0'; - ut_assertok(bootm_process_cmdline(buf, BUF_SIZE, true)); + ut_assertok(bootm_process_cmdline(buf, BUF_SIZE, BOOTM_CL_ALL)); ut_asserteq_str("", buf); strcpy(buf, "test"); - ut_assertok(bootm_process_cmdline(buf, BUF_SIZE, true)); + ut_assertok(bootm_process_cmdline(buf, BUF_SIZE, BOOTM_CL_ALL)); ut_asserteq_str("test", buf); return 0; @@ -45,21 +45,21 @@ static int bootm_test_nospace(struct unit_test_state *uts) /* Zero buffer size */ *buf = '\0'; - ut_asserteq(-ENOSPC, bootm_process_cmdline(buf, 0, true)); + ut_asserteq(-ENOSPC, bootm_process_cmdline(buf, 0, BOOTM_CL_ALL)); /* Buffer string not terminated */ memset(buf, 'a', BUF_SIZE); - ut_asserteq(-ENOSPC, bootm_process_cmdline(buf, BUF_SIZE, true)); + ut_asserteq(-ENOSPC, bootm_process_cmdline(buf, BUF_SIZE, BOOTM_CL_ALL)); /* Not enough space to copy string */ memset(buf, '\0', BUF_SIZE); memset(buf, 'a', BUF_SIZE / 2); - ut_asserteq(-ENOSPC, bootm_process_cmdline(buf, BUF_SIZE, true)); + ut_asserteq(-ENOSPC, bootm_process_cmdline(buf, BUF_SIZE, BOOTM_CL_ALL)); /* Just enough space */ memset(buf, '\0', BUF_SIZE); memset(buf, 'a', BUF_SIZE / 2 - 1); - ut_assertok(bootm_process_cmdline(buf, BUF_SIZE, true)); + ut_assertok(bootm_process_cmdline(buf, BUF_SIZE, BOOTM_CL_ALL)); return 0; } From patchwork Fri Nov 1 13:02:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Goodbody X-Patchwork-Id: 840100 Delivered-To: patch@linaro.org Received: by 2002:adf:a38c:0:b0:37d:45d0:187 with SMTP id l12csp816850wrb; Fri, 1 Nov 2024 06:03:40 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVe2cLufEzF5LIDpR7+uLWWu1L5Wo1HHW9SKzcVlPeTYvEOoHBK+3FssC+X0y+mCTMc3PeBmA==@linaro.org X-Google-Smtp-Source: AGHT+IG6yrN5T+VxD/ZGvUcC06xptakt0OxCr+15+jI9OSR0GfOIsVAEV2gE6Kt4AExyooOFGTAy X-Received: by 2002:a5d:614f:0:b0:37d:398f:44f9 with SMTP id ffacd0b85a97d-3806115ae92mr15756128f8f.32.1730466220229; Fri, 01 Nov 2024 06:03:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730466220; cv=none; d=google.com; s=arc-20240605; b=AQF9+X+pGRBH3GSKBrXdjaSHDKol3riVBXepJI+TcNdwGjJynwCGt1dzbEfaqF9Upp WDe462LSzU89pcqgNn9NoS9aPsp1ezPgxR3I7EE4Bou1Y9C4zdZsvf++JWOE29YMn2qC HwEDsSfU+yj4lx+7RYShm+O7X10V4TGrkwjflUuDZwlTrYJ8xw5L56f9HyKX5BeQXemE 82hcIfIziHBeP6KP5UZwIQ0mVddaNpfjIzaTwuYlYA4KD1L5Llrv2G3MjSmYAlqf4cEF /BqvS9cX1v9jQkNIZFqodebvMljfFuC87V0fktwCRgUQSWwxxMoM21CmDxTxZ3rdmGjT opoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5miTQ+tzSnPBKkENx7Q93bOMKqAg7gUkwuBRCGboYqA=; fh=mvv6mVRmKOPcEmZLoMLLhpun845FJri2xT3sxnR+3xI=; b=d57UHyI88DKBidBqIhdCdm5DDMW3JaHXOHB+qq9sGsRsZ3TBtejhH6QI98qoWaXeD0 xLYdKvZdl5iGWTdgJNCHBI39dAsiMTBA9abh6w7v2LJMHq+iK3k9pt8O3mhpPMpyOXfU Wvp4C4kc7VvGeAPu6WbOvztMgntevkimL6unGxaLtCjDSnF+3lOZsEo4VAmdkhUTnY7N etgLg1ph2k0uv3Lg5brTUK0yp8Yf83vxQ9VkxaTVmcyX8d4Zt6ngcErCo1JGtWqwErFY JFNMYxxbbw7vLuFh8+uTMw/3qIJagkwWB4ytoA440+KjtQQMVaCiuviDDACsecyLdt0w APPg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Yp6qrkG7; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id ffacd0b85a97d-381c1173b1dsi2504042f8f.430.2024.11.01.06.03.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Nov 2024 06:03:40 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Yp6qrkG7; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7C9B7892A2; Fri, 1 Nov 2024 14:03:32 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Yp6qrkG7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3F119892DB; Fri, 1 Nov 2024 14:03:31 +0100 (CET) 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, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4C88389287 for ; Fri, 1 Nov 2024 14:03:29 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=andrew.goodbody@linaro.org Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-43168d9c6c9so15686795e9.3 for ; Fri, 01 Nov 2024 06:03:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730466209; x=1731071009; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5miTQ+tzSnPBKkENx7Q93bOMKqAg7gUkwuBRCGboYqA=; b=Yp6qrkG7Fg+qHpzX5VRJkEwPxzr4JGKWVdBwEJWHhYHc5l5ZG5XqteJoy5gTSVuZnI 443BoB8GOhlaL7PFLau3+foEFHexcGp7e3EyxeCpIdR5PvU/cQ2udel25uLmOELhrQaN jZtbXKSft8Hn5gtyuVIackel71BcBwHb+IHWjXx98cd3Gqq9hVFo2Bku94F0aQTzlhR4 qMdk7YWj2NFBwSj2JTuraEgy+K6DtJWB48KJfUYpZN4uqQtxnaMxeYeQxAsYy1m9OZ0A +WGudSzqe0Vqubb6zx1aYXgAxfwJ7i1yI0usyS/mtccGUnaDFzaHrcvS8K8Mn3k57Vsu wnlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730466209; x=1731071009; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5miTQ+tzSnPBKkENx7Q93bOMKqAg7gUkwuBRCGboYqA=; b=KxoboWrnq4W6ClylK0QY36f6OV0j/LzxDHjywYWLF/p28F4aX3pSwL7F19vLExCDeH 4MCzqzGVhu6KJ4ZobjYUdid/oZHkyjfAW+0D8TnhDvMe3S9IvOorjBo+gFRDqFu/niip 73f5cfzwgJN4ZtC+ZVxp8EGsV5AOPAE3vMRR8cxPn+RDoQcm1SKlYKGPmjAYbIfbR7ZO Kb6awh/GRnF05ifAJYAevV+5iH52bn0bIP6lScZGu5Fo5Ymw0NxWkkY/Bw01ntQByG+u Woc/MbUC95giGbBXa7/lJ3eP44ksLRN+O35IDPPYIoxpUJanWMRgW2XE7nESxv6KqpRI Zwew== X-Gm-Message-State: AOJu0YwGlc88O7QrU9k5mFY8c79yHRtbC3H9+BMMUV7Aul3ck/acnYny s/m7vK6E4x2MJd3sFTaDMRnVmyCU9Ohbm9pDZoiPfYBOb9l/S3/rJgiCDcpfzSCMMdcvzqe86wF rarQ= X-Received: by 2002:a05:600c:46c8:b0:42c:b905:2bf9 with SMTP id 5b1f17b1804b1-4319acb17a9mr216425485e9.16.1730466208726; Fri, 01 Nov 2024 06:03:28 -0700 (PDT) Received: from artemis2.broadband ([2a0a:ef40:edb:fc01:7dcf:21b3:7ed8:3010]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d685287sm62986385e9.35.2024.11.01.06.03.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Nov 2024 06:03:28 -0700 (PDT) From: Andrew Goodbody To: u-boot@lists.denx.de Cc: Andrew Goodbody , Simon Glass , Tom Rini Subject: [PATCH 2/2] test: bootm: Ensure GD_FLG_SILENT is reset Date: Fri, 1 Nov 2024 13:02:54 +0000 Message-Id: <20241101130254.473017-3-andrew.goodbody@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241101130254.473017-1-andrew.goodbody@linaro.org> References: <20241101130254.473017-1-andrew.goodbody@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Some bootm tests expect that GD_FLG_SILENT is reset in order to work as expected. This is the state if the test is run with 'pytest --verbose' but not if run from, say, the sandbox command line. So reset the flag for those tests that rely on it being reset. This has to be done in each test as the test infrastructure will set it again before every test when not invoked with 'pytest --verbose'. Signed-off-by: Andrew Goodbody Reviewed-by: Simon Glass --- test/bootm.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/bootm.c b/test/bootm.c index 5f57ecb337..52b83f149c 100644 --- a/test/bootm.c +++ b/test/bootm.c @@ -26,6 +26,9 @@ static int bootm_test_nop(struct unit_test_state *uts) { char buf[BUF_SIZE]; + /* This tests relies on GD_FLG_SILENT not being set */ + gd->flags &= ~GD_FLG_SILENT; + *buf = '\0'; ut_assertok(bootm_process_cmdline(buf, BUF_SIZE, BOOTM_CL_ALL)); ut_asserteq_str("", buf); @@ -43,6 +46,9 @@ static int bootm_test_nospace(struct unit_test_state *uts) { char buf[BUF_SIZE]; + /* This tests relies on GD_FLG_SILENT not being set */ + gd->flags &= ~GD_FLG_SILENT; + /* Zero buffer size */ *buf = '\0'; ut_asserteq(-ENOSPC, bootm_process_cmdline(buf, 0, BOOTM_CL_ALL)); @@ -70,6 +76,9 @@ static int bootm_test_silent(struct unit_test_state *uts) { char buf[BUF_SIZE]; + /* This tests relies on GD_FLG_SILENT not being set */ + gd->flags &= ~GD_FLG_SILENT; + /* 'silent_linux' not set should do nothing */ env_set("silent_linux", NULL); strcpy(buf, CONSOLE_STR);