[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-5.2 01/10] test: new qTest case to test the vhost-user-bl
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH for-5.2 01/10] test: new qTest case to test the vhost-user-blk-server |
Date: |
Mon, 7 Dec 2020 11:28:38 +0000 |
On Wed, Nov 25, 2020 at 04:28:20PM +0800, Coiby Xu wrote:
> On Wed, Nov 25, 2020 at 04:20:56PM +0800, Coiby Xu wrote:
> > On Wed, Nov 11, 2020 at 12:43:22PM +0000, Stefan Hajnoczi wrote:
> > > +static void quit_storage_daemon(void *qmp_test_state)
> > > +{
> > > + const char quit_str[] = "{ 'execute': 'quit' }";
> > > +
> > > + /* Before quiting storate-daemon, quit qemu to avoid dubious
> > > messages */
> > > + qobject_unref(qtest_qmp(global_qtest, quit_str));
> > > +
> > > + /*
> > > + * Give storage-daemon enough time to wake up&terminate
> > > + * vu_client_trip coroutine so the Coroutine object could
> > > + * be cleaned up. Otherwise LeakSanitizer would complain
> > > + * about memory leaks.
> > > + */
> > > + g_usleep(1000);
> >
> > Your "[PATCH for-5.2 07/10] vhost-user-blk-test: fix races by using fd
> > passing"
> > prompts to me think if there is a race condition under which 1000 ms
> ^^^^^^^
> Sorry, I meant 1000 μs.
In the next revision vhost-user-blk-test sends a SIGTERM signal to
qemu-storage-daemon and then calls waitpid(2). This way there is a clean
shutdown without a sleep.
Regarding the LeakSanitizer issue you saw, are you still able to
reproduce it with commit f10802d2c9fd8bfd92c70f465da1a5992445157f
("qemu-storage-daemon: add missing cleanup calls") applied? Maybe
qemu-storage-daemon is still missing some cleanup code (e.g. to stop
exports before terminating).
Stefan
signature.asc
Description: PGP signature
- Re: [PATCH for-5.2 01/10] test: new qTest case to test the vhost-user-blk-server,
Stefan Hajnoczi <=