Skip to contentSkip to conversation

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

PATCH In review Michael S. Tsirkin 1 participant 2 messages Nov 16, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vhost-user-test: don't rely on RESET_OWNER

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

---
 tests/vhost-user-test.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/vhost-user-test.c +3 -1
index 431aa9f..3593803 100644
@@ -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:
Signature · 1 line
MST
#1 lore raw
Quoted 5 lines · Michael S. Tsirkin

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

Sorry wrong patch. Pls ignore.

Quoted 21 lines
---
 tests/vhost-user-test.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/vhost-user-test.c +3 -1
index 431aa9f..3593803 100644
@@ -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:
Signature · 1 line
MST