diff mbox

vhost-user-test: don't rely on RESET_OWNER

Message ID 1447675059-7277-1-git-send-email-mst@redhat.com
State New
Headers show

Commit Message

Michael S. Tsirkin Nov. 16, 2015, 11:57 a.m. UTC
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(-)

Comments

Michael S. Tsirkin Nov. 16, 2015, 12:35 p.m. UTC | #1
On Mon, Nov 16, 2015 at 01:57:45PM +0200, Michael S. Tsirkin wrote:
> 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>

Sorry wrong patch. Pls ignore.

> ---
>  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
diff mbox

Patch

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: