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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A2F0BC433EF for ; Wed, 13 Apr 2022 14:23:03 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DC80B83E1B; Wed, 13 Apr 2022 16:22:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=google.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=google.com header.i=@google.com header.b="P78ULqrb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C9C1D83E1B; Wed, 13 Apr 2022 16:22:02 +0200 (CEST) Received: from mail-wm1-x349.google.com (mail-wm1-x349.google.com [IPv6:2a00:1450:4864:20::349]) (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 03B8983DD9 for ; Wed, 13 Apr 2022 16:22:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=3h9xWYgYKBrQUmWoffaiiafY.Wigo-Viinfcmnm.XYhr.XY@flex--ascull.bounces.google.com Received: by mail-wm1-x349.google.com with SMTP id r132-20020a1c448a000000b0038eaca2b8c9so538081wma.7 for ; Wed, 13 Apr 2022 07:21:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=NFfC9YEwQ/tSKTCZ8Vi6HrE66iohWddQosRlLH8+i74=; b=P78ULqrbuIXKj1adnU4d5P4F4M2mkoiR3v6/rGccHlpdIA/yQiffzVysaUJtdbV9q4 btpR/wbFLWcKFT+jVW7nbADLNJEhXzpDweGMi91BhMx8eru0AZ460HF4sfBwkIsiICTR Bkqa6eN/9tpRycBMF9QMfS1UsUM1/DHQeNidDNReHbT1C2PR3MFrHtyAIMYzKcZKvdoR Um/jOZiKCfUMZUeY0t0iqlcQZLHMrZhg+irR0usOBTcJXMdhmazrZpNaK1Xw/p34ehS9 PJ/zI2gO1Fu5YoLA43NAeIO1KHOzE85gHGAzclqbmt4PGkStVATKMFTpX+4Y+0buCyeK TVWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=NFfC9YEwQ/tSKTCZ8Vi6HrE66iohWddQosRlLH8+i74=; b=7W0j0NASRcL6CKRj0BAozkwyhxcnEb1U1hJ6YMSBzB7j8rSu2gPBwHI/HVoM2DUnPt cixiQbLgM/hQUV7Kbiy84QZzoNnHqHOcAXt+8Kchgcf85S8hnSIfEi+8VrvKwkGkD+ZY TyAKVeESyAtDeeECyaufXRVdbpoDg4g8iHlN1SpJ322dWUVL9oaSCA1LARud1ZSlmG/p znaMRghXPiC5TUO9HdyRJjqP8OXVi/a7ePEAX9iuccZyVBXVSq6+Eqtqkltu1zRwvpP+ FXzxH5Y244CvhIMZBUUSjKL0CDRNN2pcp7duXnfPzY6tfg9SJ14YXDYilffMx5i7ydiL PfOA== X-Gm-Message-State: AOAM530YAmjrM6SZfFUOvNhy1dFMzyMRUskUd1yF9t9+AfJP9qwjl6H0 Z5ePgk/ALtTOyLwj18Zs7874I/BQwGF305qixw1nJAkMB3DXHzGC3O98TiBsFNiP1f+GLBOiPPI kvE9n0HU0gN4+84oT6Dxc66gtfIO3NpPyYE2Q9O8lE6uUlJN2+nSdU97hrsI= X-Google-Smtp-Source: ABdhPJzetN4KVeklWEeqVN7pJ512JuKB8jTGeezVxOvxuc1J1ZYRY9/uv3sPfSieoI1xtWPrrHhUltf1/sc= X-Received: from ascull.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:1510]) (user=ascull job=sendgmr) by 2002:a5d:468b:0:b0:207:a1c9:391c with SMTP id u11-20020a5d468b000000b00207a1c9391cmr15629997wrq.331.1649859719419; Wed, 13 Apr 2022 07:21:59 -0700 (PDT) Date: Wed, 13 Apr 2022 14:21:32 +0000 In-Reply-To: <20220413142137.560987-1-ascull@google.com> Message-Id: <20220413142137.560987-8-ascull@google.com> Mime-Version: 1.0 References: <20220413142137.560987-1-ascull@google.com> X-Mailer: git-send-email 2.35.1.1178.g4f1659d476-goog Subject: [PATCH v2 07/12] test: dm: virtio: Test notify before del_vqs From: Andrew Scull To: u-boot@lists.denx.de Cc: sjg@chromium.org, trini@konsulko.com, Andrew Scull Content-Type: text/plain; charset="UTF-8" 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.5 at phobos.denx.de X-Virus-Status: Clean The virtqueue is passed to virtio_notify() so move the virtqueue deletion to the end of the test when it's no longer needed. This wasn't causing any problems because the sandbox virtio transport driver doesn't do anything for notifications, but it could cause problems if things change and it was a bad example. Signed-off-by: Andrew Scull Reviewed-by: Simon Glass --- test/dm/virtio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/dm/virtio.c b/test/dm/virtio.c index aa4e3d778e..ff1dea323c 100644 --- a/test/dm/virtio.c +++ b/test/dm/virtio.c @@ -80,8 +80,8 @@ static int dm_test_virtio_all_ops(struct unit_test_state *uts) ut_asserteq_64(BIT_ULL(VIRTIO_F_VERSION_1), features); ut_assertok(virtio_set_features(dev)); ut_assertok(virtio_find_vqs(dev, nvqs, vqs)); - ut_assertok(virtio_del_vqs(dev)); ut_assertok(virtio_notify(dev, vqs[0])); + ut_assertok(virtio_del_vqs(dev)); return 0; } -- 2.35.1.1178.g4f1659d476-goog