From patchwork Thu Oct 3 15:22:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 832404 Delivered-To: patch@linaro.org Received: by 2002:adf:8b52:0:b0:367:895a:4699 with SMTP id v18csp343258wra; Thu, 3 Oct 2024 08:24:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXpNRxf+lgXA16MBuInDlMsUykFhx1nKC8xqwBrtqEf5LkKf8xlxD+7fBtBZ/OCicg4jEfFHg==@linaro.org X-Google-Smtp-Source: AGHT+IFG7/24WY+s9l1kZU2/CdzeinJV3sEZIdPE6Yy5OHAsd0E7YL2kma5fX2DwSDglFbMcXdVb X-Received: by 2002:a05:6602:6d0e:b0:82d:2a45:79f5 with SMTP id ca18e2360f4ac-834d84d4e78mr612682839f.13.1727969075613; Thu, 03 Oct 2024 08:24:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727969075; cv=none; d=google.com; s=arc-20240605; b=UAi53kTpAMhtDNQbdfiEP5p/WU2oLNGDd6jt90VN/m2OGCk83FEc5N3vlGSueSHMZP pNlpMfATF7ZFten+oQZPO7T2KUJTaw3QlkNKEdGOoIvS7ppcxvinidZnO5bn4PjaiDWg ZhLTVKsgqgSANbhSP7c5jHx3uL24yEfubWeVnX+a9+J9wddsDP73PPGmLnALMKsZ3ojg K1MHqjCyc2NniHcVNyEYs/6HREsQfvoWFyh6rWUOWD+XAhVPtfdCnOQKjbK2lHvViePj YT7l37KIDvFp3y900xqJ0fWouaMAY6bw7kYe77Tv0DCf57MQBgGKJaGQJdCJD7NQVrpx 5/Ew== 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=9X4um2R6dVMJH/vlbJbwmbiVPamSmz2YnJf/D866L60=; fh=nej+w6m9gbRnK6RkZbbY3buI7TuJ7nR0LerABlBlevs=; b=OHjxBKxLhEr3AeyHSN89iuSUHJfDych2VJpuU3cXamSkFCb+WQBhINfqBiZNs7LH72 xLG0acGva+S2G40Sgu7eEDXQm8/I+X1uOXoH5WF96Ltnou3aMecgyScBPVgXTYOguJ0W JM9ftkcVS1Ye92P19k8xRfp+L3MFy1KtIg2OrOr88mPJn2h2acAWqSiDR88OHz73rR5a jSiB3OETRtF/fbeN4fYF6KchWukuDAhtHSrWWlkCoVraPal8DEjoyZPLS9BwuFf2Atwr I6WVtb2QVJSnvoQNYPY0pstOQgNu+HOci0FPm1XShoxsrSAlmAWowdlOo6szjFxWRj0R lksA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yDyV6C7r; 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 8926c6da1cb9f-4db559690e4si769110173.47.2024.10.03.08.24.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Oct 2024 08:24:35 -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=yDyV6C7r; 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 50CBE88EAB; Thu, 3 Oct 2024 17:23:47 +0200 (CEST) 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="yDyV6C7r"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E953588E7A; Thu, 3 Oct 2024 17:23:45 +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, 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-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (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 00CD888E19 for ; Thu, 3 Oct 2024 17:23:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jerome.forissier@linaro.org Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-42cba6cdf32so11162155e9.1 for ; Thu, 03 Oct 2024 08:23:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1727969023; x=1728573823; 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=9X4um2R6dVMJH/vlbJbwmbiVPamSmz2YnJf/D866L60=; b=yDyV6C7rqT1uGptv+2PvH64Zo+/qmtJu5GA2WuN9Y7jW20rQRYCjgnrbuPEGFxEMUx qoV3eWDe+xVBuXDyeThtWoBaOIHlZG9zZ2gZLRvIqzNOnGPnuwy4drfcTGji2yS6gsSs a0CamMG86/aezPH9S2b0XKgxLLaF3RA6Egiq1JnVp2mO2ojyUALMdzb8eYS/qopuWCPf XsgcRjGvd4AyXN5PFVHbWsrKygG9QeE1zyCuV8tkudEk6/7gJ1bIIHZQSS63tkMMNLGM kH5me5FUxHYeXe0wbilefJL/csm4XWqbqfS/D1odc7Ik6vblmh58bvoMBsamY711ezcL SZHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727969023; x=1728573823; 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=9X4um2R6dVMJH/vlbJbwmbiVPamSmz2YnJf/D866L60=; b=DbhKABvpzFMgCdNJJs5pp+0MwFwN0FWZ5GaknwMrWbjF3aJ64orFelZQ9FVHuIhEqz LIrtThhKqGQLDrIuRFkK8ZoN2MrDw+Tenvd/pLVuJdZreXmDBwZ8TF5OofGm7FuRKCu8 LehDuFRrLf9E/U6lYWk6UmkuRWZhK3ddq2fBU9R2fRE1KktbYGHBGZzFb+/3ud8S0Dp+ 09EOeEU2mWgR6w4XV/yT4hU+JvAroHknrXhjvsDZV9GLJK3SRqXF/ZA0Ug+el4dKDier ymgS+1A9fGysOOBjSbsWi96olS3p7emPGrGK9xnPQAvjqzv/lt11kDdFFwDx/1W8hhsE royg== X-Gm-Message-State: AOJu0YxZPTr+LTcmX0krJ60P/G4YmKo21YQ4gANY/NQXw8pNlu8JADKT oz9v5QQchcZnzqYteR8qTffLbDxTJx444Q6wp7EXtiQa81bb8+zSAZeLXlgkKlNwcSz8Df+/VVr 7uGyAHQ== X-Received: by 2002:a05:600c:230c:b0:42c:bdb0:c61e with SMTP id 5b1f17b1804b1-42f7a12bb01mr50224415e9.13.1727969023230; Thu, 03 Oct 2024 08:23:43 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:d888:7a58:deed:47d6]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d081f7482sm1506220f8f.8.2024.10.03.08.23.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Oct 2024 08:23:43 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Simon Glass , Tom Rini , Marek Vasut , Mattijs Korpershoek Subject: [PATCH v11 05/29] test: boot: fix bootdev_test_any for when DSA_SANDBOX is disabled Date: Thu, 3 Oct 2024 17:22:51 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 When DSA_SANDBOX is not set, the sandbox tests fail as follows: $ ./test/py/test.py --build-dir=$(pwd) -k bootdev_test_any [...] Test: bootdev_test_any: bootdev.c test/boot/bootdev.c:156, bootdev_test_any(): "mmc2" = media->name: Expected "mmc2", got "mmc0" [...] This is due to the device list containing two less entries than expected. Therefore, adjust the expected index to be two less when DSA_SANDBOX is disabled. The actual use case is NET_LWIP=y (to be introduced in later patches) which implies DSA_SANDBOX=n for the time being. Signed-off-by: Jerome Forissier --- test/boot/bootdev.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/boot/bootdev.c b/test/boot/bootdev.c index c635d06ec25..369105ca4cf 100644 --- a/test/boot/bootdev.c +++ b/test/boot/bootdev.c @@ -128,6 +128,7 @@ BOOTSTD_TEST(bootdev_test_labels, UTF_DM | UTF_SCAN_FDT | UTF_ETH_BOOTDEV); static int bootdev_test_any(struct unit_test_state *uts) { struct udevice *dev, *media; + char *seq; int mflags; /* @@ -147,8 +148,16 @@ static int bootdev_test_any(struct unit_test_state *uts) * 8 [ ] OK mmc mmc2.bootdev * 9 [ + ] OK mmc mmc1.bootdev * a [ ] OK mmc mmc0.bootdev + * + * However if DSA_SANDBOX is disabled the dsa-test@{0,1} devices + * are not there. */ - ut_assertok(bootdev_find_by_any("8", &dev, &mflags)); + if (CONFIG_IS_ENABLED(DSA_SANDBOX)) + seq = "8"; + else + seq = "6"; + + ut_assertok(bootdev_find_by_any(seq, &dev, &mflags)); ut_asserteq(UCLASS_BOOTDEV, device_get_uclass_id(dev)); ut_asserteq(BOOTFLOW_METHF_SINGLE_DEV, mflags); media = dev_get_parent(dev);