From patchwork Wed Oct 16 09:56:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 835791 Delivered-To: patch@linaro.org Received: by 2002:a5d:6804:0:b0:37d:45d0:187 with SMTP id w4csp343399wru; Wed, 16 Oct 2024 02:57:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXs3qAJ8HiHn5R0OX1tTqUhu1oakCYYFZ384NMhCRWXK0p2N5RVPAvK+6IQqaFp2nsBkoiURA==@linaro.org X-Google-Smtp-Source: AGHT+IGPO465qus6j8HW8+5uhBv4yh7LgGybuqqLcgSCrc4p5OKuYuKoRBmE0KG9Oz1ezWmmOWyg X-Received: by 2002:a05:6602:2b87:b0:82c:eeaa:b1e0 with SMTP id ca18e2360f4ac-837947798bbmr1627499239f.11.1729072665742; Wed, 16 Oct 2024 02:57:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729072665; cv=none; d=google.com; s=arc-20240605; b=Q3myjw1O67a9u3fG1OJMlNJcizT/3bDIl0J4ssb/7XIzASpxuVmr7V/8VLWVHZbes0 /BBdQoGR/X1Kwb/9Rf2sQ0hsgfZMzEsCBNXKpU8QbWq1gRG+9uJkVY00Z4mWfut5W3im cUZT2DwJCaLMsA2ZYpX9AQB4X7ExmLEifTUDSWYRcd1b6it3FYrcfS4Z2uzDv0CSBhFp vCkhwbmu31yqRhWA4pr1cblIcaEQAPtCBjVe7kwuIiSVa1fHP23G7zYmeHm8iwHCAq0L 4nldqtTAdtdvYk7mFqHKzpw49wZIpDWL6EjnaDvhr1EgdVqk+EHnsnpkjYzGZOTb52W2 jP1A== 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=1f3amPh9ObQpkp4lRVh54Ids70l7HQ905iISzEE+AaE=; fh=nej+w6m9gbRnK6RkZbbY3buI7TuJ7nR0LerABlBlevs=; b=do622ebnu3JAPQvvFErkM7P+TCTU0NyeKD1W2awkbioYgtc9LuGQzh4UwAD57jeSg7 oc/xr8A1sAvmyqUNyHGX1Zm3obQZddimSc9DFL+3VSB6AO0OtoNozl8zovHohKEQz3yc 1xGTwMykBXr3ylhNsjxTdKcr/GQ53+pt3GGdE0jRDiuFp7JSKkuI7yw740IHLzGIhdPd gSq0JXfN03YgozCaVgqGmTNsIrKYxNrwT45uRqN6EJkrf+khC8GaJd29Ag9lKAUZQvGh ZdOBfASC0AQO2KgNH6uqKoBRE5KygEZcHWM0ZVRDgz0LI4l1Mi/0PG34s3YZ1gUJ8QOY TtvA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Lklod/5y"; 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 ca18e2360f4ac-83a8b2ce380si155021139f.111.2024.10.16.02.57.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 02:57:45 -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="Lklod/5y"; 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 858AD88F57; Wed, 16 Oct 2024 11:57:17 +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="Lklod/5y"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CBAFB88EE0; Wed, 16 Oct 2024 11:57:15 +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-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (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 D52E588D1B for ; Wed, 16 Oct 2024 11:57:13 +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-wr1-x436.google.com with SMTP id ffacd0b85a97d-37d49ffaba6so4133998f8f.0 for ; Wed, 16 Oct 2024 02:57:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729072633; x=1729677433; 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=1f3amPh9ObQpkp4lRVh54Ids70l7HQ905iISzEE+AaE=; b=Lklod/5ykVBSCeEyHmapwwnmEuZA59m8z4j7bmoVv0EtLZST6i8tSxq47qSsqKkWKb pFiUpKRiTHogd1mOk5bL2/0TMF9JBkEExepLq2EyCD2Vu+YobQu1ZYkyXybfqujjXjMP npE+1i97z8onIyKlo9C1gYCnr2Mkf/AWt4YYWOj/Fhs7vQjseFQ+xyWavkeiODYMYE5h iG8s/Jlttzd/Ej5SvqDB+Nnjd8qoCEcbMJQGwusFm9TMEbdad/4++uWo4QXqMPQMF9A8 Gbq34JDGuZ8utNYzpb1J+3PC0sgTcufjlP2act7PIawU5KaTfBXoE51KDjNwgP6owsEV JdZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729072633; x=1729677433; 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=1f3amPh9ObQpkp4lRVh54Ids70l7HQ905iISzEE+AaE=; b=ZDHnDUwmQMy5Joqx3E5g78eRyemUa/0+K3Zwlp6TUhtsw9ljqghODXP3k7hJMzgFvv G3fTBDnk8jPcWxetTNs3OS0JXtphEOXpEwR4eWM2M29aGN2E/OHyvBJ2v8SEC4KQEDLs ePpDpJTg9DktDgEyW4On24gWnzxw5WBETkuxvWpt/HfXewAQKtamJhVtMlTnNuo1SGlD AM3MlcBjNi7HGwo5Ayb/uDOUE3R9SRpsSqm42qffa/Npm8n5j32BuQ/yiun3F9eoEBM1 nt9jNnG2m9HnoMHdoWlJ1UasreJf/+ZaxpGXC5ONXO1T+Tl14T+KKdNkJBC9Kr99vEhB xWww== X-Gm-Message-State: AOJu0YwgjtzsryZn8BQ0rTVxoyMspnL39OdRHi3IBsM6rAP8PxEQsIhA KjMyvVf+zdvOJGAX1drsyPe8cuhvXdvZ9r9px3lAqs12I0PLjToJAS+HZfYwzNPHwgMRQlI//8W nj69EbQ== X-Received: by 2002:adf:f3c9:0:b0:37d:3280:203a with SMTP id ffacd0b85a97d-37d55184cdbmr13538107f8f.10.1729072632996; Wed, 16 Oct 2024 02:57:12 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:6417:8cf6:a7f7:ee38]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4313f6b1ebfsm45236335e9.34.2024.10.16.02.57.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 02:57:12 -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 v13 03/21] test: boot: fix bootdev_test_any for when DSA_SANDBOX is disabled Date: Wed, 16 Oct 2024 11:56:25 +0200 Message-Id: <37694587e362f96d2e5179c27fd7e75990eaf4f2.1729070678.git.jerome.forissier@linaro.org> 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 Reviewed-by: Simon Glass --- 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);