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 5C4CFC433FE for ; Thu, 31 Mar 2022 10:13:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D70578422C; Thu, 31 Mar 2022 12:12:33 +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="P5wSu6tX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BB12D841ED; Thu, 31 Mar 2022 12:10:27 +0200 (CEST) Received: from mail-ej1-x64a.google.com (mail-ej1-x64a.google.com [IPv6:2a00:1450:4864:20::64a]) (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 29D278420B for ; Thu, 31 Mar 2022 12:10: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=3BH5FYgYKBi8LdNfWWRZZRWP.NZXf-MZZeWTded.OPYi.OP@flex--ascull.bounces.google.com Received: by mail-ej1-x64a.google.com with SMTP id w11-20020a170907270b00b006df8927010eso11267398ejk.0 for ; Thu, 31 Mar 2022 03:10:13 -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=XNEIfyrDH2TQJRgbKMhN3LFUusisxgHuvWjDtFsY2Sw=; b=P5wSu6tX3AAlR59uba782JdW9rteEsQdRaBsXYZuw7AdH9YtwVfo1sdQJCDkUOeSCs roN8sV0UgNQ7CQJmkklMzyK8c1HTxOyehroJBES2ri3EzHhmD81nR9sAmHZFnjKy9+kL nyw+g2pyoIkwHQs4OZ8NJSo1PDe8PY2nChqxwvwlmms+ppbNwUDMCzOMYap9PUo3Au6z r/KSBlR0GjUEbQMnekSXnznO1p7IPJgxB6r35XpK1EeK0bq1sDG7ovCpuFuBgjPKDfoN vLpP6eanz96Q/y6uLXR8JY6okm3tVh6RIte4bsrQr5omPWKpMY1KPdV+rHG9uDfAr0Om ZoUg== 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=XNEIfyrDH2TQJRgbKMhN3LFUusisxgHuvWjDtFsY2Sw=; b=ApDRXXoHjtEPEChLM14kW+Q3Ix18BTuGWvOm6l6rjPnl8VxbS9qZTkom2dbqN33vNE TZPd2aOgU+YwxktuhUk5y/IKMcep75O4HUMdnJALNuYXNgYckto0w6LfcQ3whGL6gA84 ZmD327MuHZ77Z5Hsn4vPCiYxuiKvEuTpmDIaAMdz5cdmU5meBzdnLl1O7YvKZryRHmRf QTiISJVIcGklJErlORtREAEb94qktfj1nzIS71YgBp9jKcnqCgVOtIqztLXqWycb1GHF fMIq5WQx8xVAjTJhrgepjGzKlh8drmmkdgkoaJdcfrI0fWliz+7N6lGMg0fX7t3yC0ci 8/qg== X-Gm-Message-State: AOAM530/eO/cpsrsNHiW/+3kQKmPAyu7qovzxOWaEatg+VZbzghUNOjC ocEpz8jXTTh2x5kgWcLQuskKALQo5kCphESMx203V5KMUnwcTv7oCxGkJSAFOFUvmpHoTUSX4MB 5ZEohvot0NHMHFH3wQD3795SeSdXmWbwcjhgWmwfoKkDHWJOvz9WZpcRgSQc= X-Google-Smtp-Source: ABdhPJxE7swK3q6/LD/r40ttUXr91bAqmyafrDbDa/xPpAprsnqy970OOO4LNxcEqFo1q7yO17n/I6Z07KA= X-Received: from ascull.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:1510]) (user=ascull job=sendgmr) by 2002:a17:907:97cc:b0:6da:a8fb:d1db with SMTP id js12-20020a17090797cc00b006daa8fbd1dbmr4250886ejc.267.1648721412550; Thu, 31 Mar 2022 03:10:12 -0700 (PDT) Date: Thu, 31 Mar 2022 10:09:45 +0000 In-Reply-To: <20220331100949.3637425-1-ascull@google.com> Message-Id: <20220331100949.3637425-8-ascull@google.com> Mime-Version: 1.0 References: <20220331100949.3637425-1-ascull@google.com> X-Mailer: git-send-email 2.35.1.1094.g7c7d902a7c-goog Subject: [PATCH 07/11] test: dm: virtio: Test notify before del_vqs From: Andrew Scull To: u-boot@lists.denx.de Cc: sjg@chromium.org, bmeng.cn@gmail.com, adelva@google.com, keirf@google.com, ptosi@google.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 --- 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 63fcc22172..d054ccfaa4 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.1094.g7c7d902a7c-goog