From patchwork Mon Mar 6 23:18:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jassi Brar X-Patchwork-Id: 659276 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2085668wrb; Mon, 6 Mar 2023 15:19:44 -0800 (PST) X-Google-Smtp-Source: AK7set+sBMFS7IZOWjG/q34gqA6TKQLmNdNsBMwqo/JdqwaVluhJfH7TtJLP/cNf4RR3Ibex23Ck X-Received: by 2002:a05:600c:3549:b0:3eb:323e:de79 with SMTP id i9-20020a05600c354900b003eb323ede79mr11259957wmq.6.1678144784435; Mon, 06 Mar 2023 15:19:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678144784; cv=none; d=google.com; s=arc-20160816; b=EhkMaHdAvCc96VUoyPpMp8ym+1gpKLlhII3IDaYB/Hp1+GV5uhJvmyFG6n+qYiEhb0 vEIXlUQR3Ftj8RBm9rZNxX5KvxZQ//+sDeIUtG+Fg1Rkl0gpUFUcAAEVsywG6vIkKzbI ZZ5B2i7woxEozTj3A+KzZqcw9z6bSAZ0/pSn0smC1djg/hOAiKJy8hkc/7xNHSAMN8AC mYuQrIDk6FtsOck9qoMVPMTe+v7G53SphWXotWZ/AGOZuBey0GHdvY10qsSrDk6OPzdd fpNcHvRB0l9EQOxQlSKudzXsl5fwmw/gtKQiXZp4TKJ8Upcd6CaocdXFeu/OXk/Vg+eM fSTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=TE6Gh8wOl/LbgECmVMlKtUDVgA/1LR+JJYhuLYaNsUc=; b=b+eRD2x06qPkXwCnT8+/VlMkRlDx3iKuWsWK4Mj7+QCt7oeF6JwBqwISPx7PO7KTHK 8xTSnRR1zlnXSmiUSAMWIHOWq+llHmyD74V1dliaagp6hu08h6Me7Ta1blgxljgmLkyB mJX38QJqdhBixZ2kqXdiGZXgleMAXaK0DaFlqqusTds23BGXcZos6IJKcybwQn5kd1i4 K2rqqI+act1V4n4Amp14UAjlC9bXyFKQMD3ql4iFzqM2E56gdQbFaZMHdR1fo+I7LnhN MEf0sKSAd4dulH7pFysZvMyAhFvgdkQqUxPaSM8zYEUOenIA2u/nKcYLnqo0eYi1KsVv wWUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=R2ydOig8; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id y15-20020adff14f000000b002c56e5189f5si8540741wro.771.2023.03.06.15.19.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Mar 2023 15:19:44 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=R2ydOig8; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1E1F985B19; Tue, 7 Mar 2023 00:19:25 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com 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=gmail.com header.i=@gmail.com header.b="R2ydOig8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 86C3A85B19; Tue, 7 Mar 2023 00:19:18 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) (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 3B8CA8593D for ; Tue, 7 Mar 2023 00:19:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jassisinghbrar@gmail.com Received: by mail-qt1-x82a.google.com with SMTP id s12so12568028qtq.11 for ; Mon, 06 Mar 2023 15:19:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678144742; 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=TE6Gh8wOl/LbgECmVMlKtUDVgA/1LR+JJYhuLYaNsUc=; b=R2ydOig82vDOf8Fup/GHli9KoXPkuYENQ3IaTAXhnPN59XBk3QhVy/S02bbKoYtHlk 3msvMHAdYr/TEnT3XR7X4x3HkA2RZDjQxTzJa11TRik22Cw6jJB6UhUonZ0CJ+xvrnaU HiEsoPscTEsbEV9Y3B0aRKcbg5sSKLulctBzkzAEacsQptUj2ZZ3B24cXRIhLuzkWcfw dSD5Q49Mp84v7LhiFpR2oqBeYHFDb9URCT7qatf1w/rD5UhwNPrk9ahvMjRYYfJ9Pldn Y0tmC2zxZvXgCiod65+Ee8B+nhrTOl3hyUbOKqZy5noHLRKIrpcI/3zkHNz/TWRut0f2 KFIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678144742; 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=TE6Gh8wOl/LbgECmVMlKtUDVgA/1LR+JJYhuLYaNsUc=; b=vPYjLxzlhWNpQxN/9njXashPwWpNvwCNcN/KdcZXskQVwQLzbPivhK9jqm8gBop2UA YtTZOITT9ITs8GFn+ydf8/nZVyxw2o1pm8L/6UTIZZMfNotAWWEZCeXGDm9cYxH4A1B0 lGIo/lG6AXks40oD+/pFsCXF0H2o/S4tfUev+1mz0vmHt/FiX1PTgxmfbeLVlIeBbOon LZlcvAqArJBZLkhg3W55x7Lh0IaCzhSJRE0dWmvohZaWqM55Pf2SDENe+/iTtT4GK2x/ GzfNdQT6MgeJb2iiaz7D3KornrR0TEN3geYCKcbdWIRC5+5KXemFL0MET5O1PD2LlmBh AMJw== X-Gm-Message-State: AO0yUKUEvs0Su9hVWnp9JifGPEaemgziwRSkm6K09iDLJhNRzjze1cRN ErhiuxhLqddmXUfRaBtH6sdgu62o6KI= X-Received: by 2002:a05:622a:151:b0:3b9:e3fc:5689 with SMTP id v17-20020a05622a015100b003b9e3fc5689mr21434222qtw.58.1678144742244; Mon, 06 Mar 2023 15:19:02 -0800 (PST) Received: from jassi-desktop.. (wnpgmb0311w-ds01-45-177-228.dynamic.bellmts.net. [206.45.177.228]) by smtp.gmail.com with ESMTPSA id r2-20020ac83b42000000b003c034837d8fsm1151542qtf.33.2023.03.06.15.19.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Mar 2023 15:19:01 -0800 (PST) From: jassisinghbrar@gmail.com To: u-boot@lists.denx.de Cc: ilias.apalodimas@linaro.org, sughosh.ganu@linaro.org, etienne.carriere@linaro.org, trini@konsulko.com, sjg@chromium.org, xypron.glpk@gmx.de, patrick.delaunay@foss.st.com, patrice.chotard@foss.st.com, Jassi Brar Subject: [PATCH v6 7/7] test: dm: fwu: fix for the updated api Date: Mon, 6 Mar 2023 17:18:58 -0600 Message-Id: <20230306231858.1888643-1-jassisinghbrar@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230306231747.1888513-1-jassisinghbrar@gmail.com> References: <20230306231747.1888513-1-jassisinghbrar@gmail.com> 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 From: Jassi Brar fwu_get_mdata() no more requires 'dev' argument and fwu_check_mdata_validity() has been rendered useless and dropped. Fix the test cases to work with aforementioned changes. Signed-off-by: Jassi Brar Acked-by: Ilias Apalodimas --- test/dm/fwu_mdata.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/test/dm/fwu_mdata.c b/test/dm/fwu_mdata.c index b179a65c15..8b5c83ef4e 100644 --- a/test/dm/fwu_mdata.c +++ b/test/dm/fwu_mdata.c @@ -98,7 +98,7 @@ static int dm_test_fwu_mdata_read(struct unit_test_state *uts) ut_assertok(populate_mmc_disk_image(uts)); ut_assertok(write_mmc_blk_device(uts)); - ut_assertok(fwu_get_mdata(dev, &mdata)); + ut_assertok(fwu_get_mdata(&mdata)); ut_asserteq(mdata.version, 0x1); @@ -118,30 +118,14 @@ static int dm_test_fwu_mdata_write(struct unit_test_state *uts) ut_assertok(uclass_first_device_err(UCLASS_FWU_MDATA, &dev)); - ut_assertok(fwu_get_mdata(dev, &mdata)); + ut_assertok(fwu_get_mdata(&mdata)); active_idx = (mdata.active_index + 1) % CONFIG_FWU_NUM_BANKS; ut_assertok(fwu_set_active_index(active_idx)); - ut_assertok(fwu_get_mdata(dev, &mdata)); + ut_assertok(fwu_get_mdata(&mdata)); ut_asserteq(mdata.active_index, active_idx); return 0; } DM_TEST(dm_test_fwu_mdata_write, UT_TESTF_SCAN_FDT); - -static int dm_test_fwu_mdata_check(struct unit_test_state *uts) -{ - struct udevice *dev; - - ut_assertok(setup_blk_device(uts)); - ut_assertok(populate_mmc_disk_image(uts)); - ut_assertok(write_mmc_blk_device(uts)); - - ut_assertok(uclass_first_device_err(UCLASS_FWU_MDATA, &dev)); - - ut_assertok(fwu_check_mdata_validity()); - - return 0; -} -DM_TEST(dm_test_fwu_mdata_check, UT_TESTF_SCAN_FDT);