From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67F9EC433F5 for ; Sat, 23 Oct 2021 23:32:42 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E21B16023E for ; Sat, 23 Oct 2021 23:32:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E21B16023E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 979B7835CB; Sun, 24 Oct 2021 01:31:21 +0200 (CEST) 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="DjoYdYxC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 167D882E7A; Sun, 24 Oct 2021 01:28:16 +0200 (CEST) Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0: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 4DDDF83571 for ; Sun, 24 Oct 2021 01:27:27 +0200 (CEST) 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-ot1-x336.google.com with SMTP id e59-20020a9d01c1000000b00552c91a99f7so9328066ote.6 for ; Sat, 23 Oct 2021 16:27:27 -0700 (PDT) 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=dPh8PMzVUyVZdbwwL40T1cGXpxiGKI+FzaD1RguWsRg=; b=DjoYdYxCq2HSx1p8FPnw1dZSz/4x+RQNDxygnOslIfyfZQK3wiTCuuy+ZTN12Mkm4P 9ksGplH9ET7zDi2b2OuNrh+8pJumA7VVNw1giM4pQS1ihEhO8PivU1AgMdk7YL+NDEgA Enx7Q4kjGO9Y39retH5ta+H7WyGK466ex1RFA= 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=dPh8PMzVUyVZdbwwL40T1cGXpxiGKI+FzaD1RguWsRg=; b=WEXEOcTJlhHcavJpLkTahOaRyUQ2aAl9O3HgCU6J2ufNmd9qM0mvYRY9+5ItU1pmeN 7PJPCyMhzuKuZ9Z1OVPEOAKN0Y8D37PUzjB8Nrxg0VW7gg5KZMvH6kwc+aiLaH7d4UkL R4M/FjXZXLLZvK0XPObsZDezHyO7ZSxgMv6lNDntRkoFJR6tNtLuTffT52TfysgIE/oe g5WH2/AOhEni0JnGbbM2BkHnPyN5U5kNp1/n8epMEOeXvaFj6BU50VeKzO5DwpBTgTQk ixRcLFb04Dxx6iURqv58oetlueSsQF63s4792zXnbeWOAXfFPR56BzfVB24VSa3Om67P FKlg== X-Gm-Message-State: AOAM531NyctYkxouGnPHYVyWdNZl5T++jcyFnoaNhts3F023n8N+oR/M uIgs9t79xaUmqYbSdgb4pUCiQr3wNEu27g== X-Google-Smtp-Source: ABdhPJwXOVEu4IVDcNbGngI+9eO6koveUj04MzcgDiITl7gvJ4DYjWQE/moUMTTnEmKoVNf/EA7Q4A== X-Received: by 2002:a9d:6348:: with SMTP id y8mr6963783otk.179.1635031645860; Sat, 23 Oct 2021 16:27:25 -0700 (PDT) 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 l24sm2253885oop.4.2021.10.23.16.27.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Oct 2021 16:27:25 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Michal Simek , Heinrich Schuchardt , Tom Rini , Ilias Apalodimas , Daniel Schwierzeck , Steffen Jaeckel , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Lukas Auer , Dennis Gilmore , Simon Glass , Marek Vasut , Pavel Herrmann Subject: [PATCH v2 37/41] test: dm: Restart USB before assuming it is stopped Date: Sat, 23 Oct 2021 17:26:31 -0600 Message-Id: <20211023232635.9195-27-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.1079.g6e70778dc9-goog In-Reply-To: <20211023232635.9195-1-sjg@chromium.org> References: <20211023232635.9195-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Update the blk test to stop USB first, in case another test has started it. Signed-off-by: Simon Glass --- (no changes since v1) test/dm/blk.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/dm/blk.c b/test/dm/blk.c index deccf05289b..b5957a20fb0 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)); -- 2.33.0.1079.g6e70778dc9-goog