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 807CFC433EF for ; Mon, 16 May 2022 10:43:44 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CF0288424A; Mon, 16 May 2022 12:42:55 +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="gWiixWzN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1887884266; Mon, 16 May 2022 12:42:23 +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 CCACD841EC for ; Mon, 16 May 2022 12:42:07 +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=3fiqCYgYKBvUXpZriidlldib.Zljr-Yllqifpqp.abku.ab@flex--ascull.bounces.google.com Received: by mail-wm1-x349.google.com with SMTP id l38-20020a05600c1d2600b00395cf292797so3397265wms.3 for ; Mon, 16 May 2022 03:42:07 -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=q/JsNrugLsoEapTD/cgVh1bUE1+kyShw/ikhlCFf0Y8=; b=gWiixWzNgAatD03UjLwc3iLrqj53uh+3gkFSctRTQ6ngjHxuLpn1y74kzc5+osbpus glGYgYJ4/Sdf678Yn47RtF9upo8MG9Df+50qXwjZPY9opjKncC+LXTbHmA+9yqa7DENW qUclNbG9lf0yGy1wM8xmxQPhSUGkmhlIQ8GPG1XsNJFNnpUdv+RhpJIwJn6guBfRfkKz yJnBCu0Sp8rBLfQZ12FYNolO7J4b8JVjxeFAW6/XTyeHlD/QvRlGf2wpQSy1bDv5Lqqx +LO/GNZrJQw7ftNYY+RTPmFWkmoz4I6LpO7V4BnZrmhGknaDsVMMB2YiqCYrcHyK5LCZ Nxfw== 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=q/JsNrugLsoEapTD/cgVh1bUE1+kyShw/ikhlCFf0Y8=; b=VaXhzvo9RCagqGOEQUlW7znqoMSZqu1E/irIzHWJ36g+fulKdH8U6IA0GIik8NtIto GTMATUr4Nfd97V42g4MTkBq+lEDEgGTnwcs9TpRZvsRCh+xgsBtu6J+rXHTMsxjhkzte RiZ0+7x9nYjwYnfVuplK2C5ADFXN9KEsNwCaJ4uOWHJZYpwXygGjHHYxw7ZhGURZvNOi BeESb6gJA7DPwKDa/3P+9FJ27F+OLy0Dd2OeLqLZromxd9DwHTyJA2wWEMsvELhJIeLq Hc2Kewt3DAjlN27qFwbIEWrb1aiVHATe5CUuI5hfMxnJn1ck/Fpbj487CMi639b0ihcK SOPg== X-Gm-Message-State: AOAM533JeNdNR63Q8FrIOFs8Hac5OOXriUFQ4I3YjjHBS9IyXe3YzLrF IMknQtjQAPqjk0nVNUG1d5ntmrSP1MKxvMQWNlqA7zebIBHx1Adr8dIAeHG4X9+Umg7LF5SXlTK zu3x8bANNZ0nAIuKBsyCyfrK/mCUKXohHIc0ZMDuCxoQy54FgCKSWRdeXGRY= X-Google-Smtp-Source: ABdhPJwxtwSCsKtlecx98T6kkig79WOmx85V/TlTpibPEdGi/Azp0p1ooJwUXyzU66SsM7nH4updCfpDBPQ= X-Received: from ascull.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:1510]) (user=ascull job=sendgmr) by 2002:a1c:35c7:0:b0:38e:4c59:6788 with SMTP id c190-20020a1c35c7000000b0038e4c596788mr823007wma.1.1652697726786; Mon, 16 May 2022 03:42:06 -0700 (PDT) Date: Mon, 16 May 2022 10:41:35 +0000 In-Reply-To: <20220516104140.1047229-1-ascull@google.com> Message-Id: <20220516104140.1047229-8-ascull@google.com> Mime-Version: 1.0 References: <20220516104140.1047229-1-ascull@google.com> X-Mailer: git-send-email 2.36.0.550.gb090851708-goog Subject: [PATCH v3 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, bmeng.cn@gmail.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.36.0.550.gb090851708-goog