qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Marcel Apfelbaum" <marcel@redhat.com>,
	=?UTF-8?q?Marc-Andr=C3=A9=20Lureau?=
	<marcandre.lureau@redhat.com>,
	"Yuanhan Liu" <yuanhan.liu@linux.intel.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: [Qemu-devel] [PATCH] vhost-user-test: don't rely on RESET_OWNER
Date: Mon, 16 Nov 2015 13:57:45 +0200	[thread overview]
Message-ID: <1447675059-7277-1-git-send-email-mst@redhat.com> (raw)

vhost-user-test is broken now: it assumes
QEMU sends RESET_OWNER, and we stopped doing that.
Wait for ENABLE_RING with 0 instead.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 tests/vhost-user-test.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
index 431aa9f..3593803 100644
--- a/tests/vhost-user-test.c
+++ b/tests/vhost-user-test.c
@@ -321,7 +321,9 @@ static void chr_read(void *opaque, const uint8_t *buf, int size)
         break;
 
     case VHOST_USER_SET_VRING_ENABLE:
-        s->fds_num = 0;
+        if (!msg.payload.state.num) {
+            s->fds_num = 0;
+        }
         break;
 
     default:
-- 
MST

             reply	other threads:[~2015-11-16 11:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-16 11:57 Michael S. Tsirkin [this message]
2015-11-16 12:35 ` [Qemu-devel] [PATCH] vhost-user-test: don't rely on RESET_OWNER Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1447675059-7277-1-git-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=marcel@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yuanhan.liu@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).