From: Coiby Xu <coiby.xu@gmail.com>
To: Thomas Huth <thuth@redhat.com>
Cc: kwolf@redhat.com, Laurent Vivier <lvivier@redhat.com>,
qemu-devel@nongnu.org, bharatlkmlkvm@gmail.com,
stefanha@redhat.com, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v8 4/4] new qTest case to test the vhost-user-blk-server
Date: Fri, 5 Jun 2020 14:22:38 +0800 [thread overview]
Message-ID: <20200605062238.bkpcfd7rl2h5d3md@r> (raw)
In-Reply-To: <b8b6c706-e726-e7db-8a1c-ad6fce6ce461@redhat.com>
On Fri, Jun 05, 2020 at 07:01:33AM +0200, Thomas Huth wrote:
>> diff --git a/tests/qtest/libqos/vhost-user-blk.h b/tests/qtest/libqos/vhost-user-blk.h
>> new file mode 100644
>> index 0000000000..ef4ef09cca
>> --- /dev/null
>> +++ b/tests/qtest/libqos/vhost-user-blk.h
>> @@ -0,0 +1,44 @@
>> +/*
>> + * libqos driver framework
>> + *
>> + * Copyright (c) 2018 Emanuele Giuseppe Esposito <e.emanuelegiuseppe@gmail.com>
>> + *
>> + * This library is free software; you can redistribute it and/or
>> + * modify it under the terms of the GNU Lesser General Public
>> + * License version 2 as published by the Free Software Foundation.
>
>... but you've missed the header here :-(
Thank you for reminding me of this issue!
>> diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
>> index 49075b55a1..a7b7c96206 100644
>> --- a/tests/qtest/libqtest.c
>> +++ b/tests/qtest/libqtest.c
>> @@ -31,40 +31,9 @@
>> #include "qapi/qmp/qlist.h"
>> #include "qapi/qmp/qstring.h"
>>
>> -#define MAX_IRQ 256
>> #define SOCKET_TIMEOUT 50
>> #define SOCKET_MAX_FDS 16
>>
>> -
>> -typedef void (*QTestSendFn)(QTestState *s, const char *buf);
>> -typedef void (*ExternalSendFn)(void *s, const char *buf);
>> -typedef GString* (*QTestRecvFn)(QTestState *);
>> -
>> -typedef struct QTestClientTransportOps {
>> - QTestSendFn send; /* for sending qtest commands */
>> -
>> - /*
>> - * use external_send to send qtest command strings through functions which
>> - * do not accept a QTestState as the first parameter.
>> - */
>> - ExternalSendFn external_send;
>> -
>> - QTestRecvFn recv_line; /* for receiving qtest command responses */
>> -} QTestTransportOps;
>> -
>> -struct QTestState
>> -{
>> - int fd;
>> - int qmp_fd;
>> - pid_t qemu_pid; /* our child QEMU process */
>> - int wstatus;
>> - int expected_status;
>> - bool big_endian;
>> - bool irq_level[MAX_IRQ];
>> - GString *rx;
>> - QTestTransportOps ops;
>> -};
>
>Why do you have to move struct QTestState and friends to the header
>instead? I'd prefer if we could keep it here if possible?
tests/qtest/vhost-user-blk-test.c needs to talk to qemu-storage-daemon's
QMP. Thus I g_new0 a QTestState struct to make use of related functions
like qtest_qmp and this requires the QTestState struct definition.
next prev parent reply other threads:[~2020-06-05 6:23 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-04 23:35 [PATCH v8 0/4] vhost-user block device backend implementation Coiby Xu
2020-06-04 23:35 ` [PATCH v8 1/4] Allow vu_message_read to be replaced Coiby Xu
2020-06-11 10:45 ` Stefan Hajnoczi
2020-06-11 11:26 ` Marc-André Lureau
2020-06-04 23:35 ` [PATCH v8 2/4] generic vhost user server Coiby Xu
2020-06-11 13:14 ` Stefan Hajnoczi
2020-06-14 18:43 ` Coiby Xu
2020-06-04 23:35 ` [PATCH v8 3/4] vhost-user block device backend server Coiby Xu
2020-06-11 15:24 ` Stefan Hajnoczi
2020-06-14 19:04 ` Coiby Xu
2020-06-04 23:35 ` [PATCH v8 4/4] new qTest case to test the vhost-user-blk-server Coiby Xu
2020-06-05 5:01 ` Thomas Huth
2020-06-05 6:22 ` Coiby Xu [this message]
2020-06-05 9:25 ` Thomas Huth
2020-06-05 13:27 ` Coiby Xu
2020-06-11 12:37 ` [PATCH v8 0/4] vhost-user block device backend implementation Stefano Garzarella
2020-06-14 18:46 ` Coiby Xu
2020-06-15 8:46 ` Stefano Garzarella
2020-06-16 6:55 ` Coiby Xu
2020-06-11 15:27 ` Stefan Hajnoczi
2020-06-12 15:58 ` Coiby Xu
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=20200605062238.bkpcfd7rl2h5d3md@r \
--to=coiby.xu@gmail.com \
--cc=bharatlkmlkvm@gmail.com \
--cc=kwolf@redhat.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=thuth@redhat.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).