Message ID | 20220306125016.3133737-10-sjg@chromium.org |
---|---|
State | Changes Requested |
Delegated to: | Tom Rini |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=XN63Cdne; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KBM232VkGz9sFr for <incoming@patchwork.ozlabs.org>; Sun, 6 Mar 2022 23:52:43 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2951283D30; Sun, 6 Mar 2022 13:51:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="XN63Cdne"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8B17D83D01; Sun, 6 Mar 2022 13:51:30 +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.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) (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 A8D8783BE5 for <u-boot@lists.denx.de>; Sun, 6 Mar 2022 13:51:08 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2f.google.com with SMTP id s20so945071iol.2 for <u-boot@lists.denx.de>; Sun, 06 Mar 2022 04:51:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bhLyLO3z7WCeKPHet50+Nh/6Q7lniplZcYQM0KVs5Tw=; b=XN63Cdne16zKCJAJPmfQ4CtUltpwV2FvKBcxAmXKz0Si9jdEdmsl8qBFwqEWRUy9+p Zc6L6wCHP070AhqvxjXDMPtWivL49DTFgM6PoTVMCji7tB1KzW1nixrnu4tRzD8fiRhC SlOBK3wDU7jm6lgFW2kJB8kFSL+fzNKvxtu4k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bhLyLO3z7WCeKPHet50+Nh/6Q7lniplZcYQM0KVs5Tw=; b=zE2vOTl9NFzOailG01fMKQPTTfohrUhVpsseIxdIGk4wA9zLrCBOaUhgYvnOnlOuei K7k0uwjDN3mVpH3LN9EnQL2kveRzfxv2p8mnhlVjWtulVMijDrxkEjM9webCEHtkmJOj aiIjG06l9F7dOTGxKzhXj+pzeoYM4aC4kNCsyybid90jgc/fqJPOgtzLmB0o50nnkTEQ KqW9+Y2+BdcCPcG5FZPHEIy4qqSVbqhwAHfQtziXWEPvrbE/yrOFITpB6cCVzztOOmLT gfakclb5tZBDQnX78hZNHIxF0M3fFtblK56gTv7vkchWKLcV/6Z9HyzvyY1I3pSdSL1K GABw== X-Gm-Message-State: AOAM532K2ZuaBHFeKGfAxEnkyPKex5W6/5hG3fbpjDX3VAQeewfwt6zE Alxi4UA8LplzI0iy0cm+ZLl6PIuCbIUfyA== X-Google-Smtp-Source: ABdhPJzwPzwkkJN1gomfgBqwNxFv73Prl/Ul0kU+V6c0xJLa8S7wRY/+azE0qxemhGZtnryEl/b2aQ== X-Received: by 2002:a05:6638:3049:b0:317:9a63:ec26 with SMTP id u9-20020a056638304900b003179a63ec26mr6725677jak.273.1646571067277; Sun, 06 Mar 2022 04:51:07 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id p22-20020a5d8d16000000b006115627b87csm7653533ioj.55.2022.03.06.04.51.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Mar 2022 04:51:07 -0800 (PST) From: Simon Glass <sjg@chromium.org> To: U-Boot Mailing List <u-boot@lists.denx.de> Cc: Dennis Gilmore <dennis@ausil.us>, Ilias Apalodimas <ilias.apalodimas@linaro.org>, Lukas Auer <lukas.auer@aisec.fraunhofer.de>, Tom Rini <trini@konsulko.com>, Heinrich Schuchardt <xypron.glpk@gmx.de>, Michal Simek <michal.simek@xilinx.com>, Daniel Schwierzeck <daniel.schwierzeck@gmail.com>, Steffen Jaeckel <jaeckel-floss@eyet-services.de>, Simon Glass <sjg@chromium.org>, Marek Vasut <marex@denx.de>, Pavel Herrmann <morpheus.ibis@gmail.com> Subject: [PATCH v4 09/33] test: dm: Restart USB before assuming it is stopped Date: Sun, 6 Mar 2022 05:49:52 -0700 Message-Id: <20220306125016.3133737-10-sjg@chromium.org> X-Mailer: git-send-email 2.35.1.616.g0bdcbb4464-goog In-Reply-To: <20220306125016.3133737-1-sjg@chromium.org> References: <20220306125016.3133737-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean |
Series |
Initial implementation of standard boot
|
expand
|
diff --git a/test/dm/blk.c b/test/dm/blk.c index deccf05289..b5957a20fb 100644 --- a/test/dm/blk.c +++ b/test/dm/blk.c @@ -15,6 +15,9 @@ DECLARE_GLOBAL_DATA_PTR; +/* Allow resetting the USB-started flag */ +extern char usb_started; + /* Test that block devices can be created */ static int dm_test_blk_base(struct unit_test_state *uts) { @@ -66,8 +69,11 @@ static int dm_test_blk_usb(struct unit_test_state *uts) struct udevice *usb_dev, *dev; struct blk_desc *dev_desc; + usb_started = false; + /* Get a flash device */ state_set_skip_delays(true); + ut_assertok(usb_stop()); ut_assertok(usb_init()); ut_assertok(uclass_get_device(UCLASS_MASS_STORAGE, 0, &usb_dev)); ut_assertok(blk_get_device_by_str("usb", "0", &dev_desc));
Update the blk test to stop USB first, in case another test has started it. Signed-off-by: Simon Glass <sjg@chromium.org> --- (no changes since v1) test/dm/blk.c | 6 ++++++ 1 file changed, 6 insertions(+)