From patchwork Mon Nov 30 01:53:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1407936 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: 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=TSIffCsE; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 ozlabs.org (Postfix) with ESMTPS id 4CkpJG0qRLz9sTc for ; Mon, 30 Nov 2020 12:57:02 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AA1AB827C6; Mon, 30 Nov 2020 02:56:17 +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="TSIffCsE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 565BF827BD; Mon, 30 Nov 2020 02:55:04 +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=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) (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 B836A82623 for ; Mon, 30 Nov 2020 02:54:45 +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-il1-x144.google.com with SMTP id v3so9824130ilo.5 for ; Sun, 29 Nov 2020 17:54:45 -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=Hp10Wixee1mz3N0v8w76QN58M5WMgAX1xtopPPKKt9k=; b=TSIffCsEwbndu7wiZthQr8XiRMpjrPSC1Hyx4Wya/r4XTR2qGuWNlmzzylinXHCZIG OY2unOaZfhRBykV4kg7a3gN5eA9RbYE/YzhaJDF33S2r3pN4BO78sLmtk4biESXZw7eH pJVfNKv53W5l4tmkkqf7ej9aRpy3Iws6fTysw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Hp10Wixee1mz3N0v8w76QN58M5WMgAX1xtopPPKKt9k=; b=MmQrzXAabaIvQHI+paEroWzTY5GA8lMxD89PlUiPp+uf0LGFL60IiJHDE5FMA7UVlo f/f3/Fjifl8PzbBKxdQSKZUNRW7kLTa3Yd0BJT2R8IZvWdyuEnaedf2MMBEzynOWDVng uIAC8rXxCexO6Q99geBUXuvOUQUfwCYQf8MRimHokEixpeFJs+a2v2aVb30lowfwxr5K CBrD1n13yAV8w7ZY7/pZ6X0D50Vvmj15y8F/WwvomdWEBEPkTP0fz3rrAU/ICs5l1In0 8tv/A4ozfxYsvHnMnAfAcRK1lXyDmQPm+gPp3/03j06hTl+yxYchUtuJnhm7bGlwky5O LsHQ== X-Gm-Message-State: AOAM533dyKykyIJqRNGNiTZhPI1586/Irn/Ku8YJWOOu+P1KQJ8nz17O aBfawD/XnyDJDpoPmUa0qsqMsNS2VbJA3Q== X-Google-Smtp-Source: ABdhPJyKgOyGWcAyTyN154IR3ozm1LtsHreT9Np3ei4cgJtCYlevsOOC/Xx3UN3Zexlvy8dWeKnfoQ== X-Received: by 2002:a92:c88c:: with SMTP id w12mr17162956ilo.204.1606701284441; Sun, 29 Nov 2020 17:54:44 -0800 (PST) Received: from localhost.localdomain (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id q5sm6543341ilg.62.2020.11.29.17.54.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2020 17:54:43 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Simon Glass , Marek Vasut , Pavel Herrmann Subject: [PATCH 09/27] dm: test: Drop assumptions of no sequence numbers Date: Sun, 29 Nov 2020 18:53:44 -0700 Message-Id: <20201130015402.2328621-8-sjg@chromium.org> X-Mailer: git-send-email 2.29.2.454.gaff20da3a2-goog In-Reply-To: <20201130015402.2328621-1-sjg@chromium.org> References: <20201130015402.2328621-1-sjg@chromium.org> MIME-Version: 1.0 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.102.3 at phobos.denx.de X-Virus-Status: Clean Drop code in a few tests which assumes that sequence numbers are only valid when a device is probed. Signed-off-by: Simon Glass --- test/dm/blk.c | 3 --- test/dm/i2c.c | 3 --- test/dm/spi.c | 3 --- 3 files changed, 9 deletions(-) diff --git a/test/dm/blk.c b/test/dm/blk.c index f34c13f7511..ea5e0955d98 100644 --- a/test/dm/blk.c +++ b/test/dm/blk.c @@ -19,9 +19,6 @@ static int dm_test_blk_base(struct unit_test_state *uts) { struct udevice *blk1, *blk3, *dev; - /* Make sure there are no block devices */ - ut_asserteq(-ENODEV, uclass_get_device_by_seq(UCLASS_BLK, 0, &dev)); - /* Create two, one the parent of the other */ ut_assertok(blk_create_device(gd->dm_root, "sandbox_host_blk", "test", IF_TYPE_HOST, 1, 512, 2, &blk1)); diff --git a/test/dm/i2c.c b/test/dm/i2c.c index 681ce45107c..d74f5f9fbc7 100644 --- a/test/dm/i2c.c +++ b/test/dm/i2c.c @@ -28,9 +28,6 @@ static int dm_test_i2c_find(struct unit_test_state *uts) struct udevice *bus, *dev; const int no_chip = 0x10; - ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_I2C, busnum, - false, &bus)); - /* * The post_bind() method will bind devices to chip selects. Check * this then remove the emulation and the slave device. diff --git a/test/dm/spi.c b/test/dm/spi.c index fb180aed1f0..b767cf9c4a0 100644 --- a/test/dm/spi.c +++ b/test/dm/spi.c @@ -26,9 +26,6 @@ static int dm_test_spi_find(struct unit_test_state *uts) struct spi_cs_info info; ofnode node; - ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_SPI, busnum, - false, &bus)); - /* * The post_bind() method will bind devices to chip selects. Check * this then remove the emulation and the slave device.