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