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; }