From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
"Julia Suvorova" <jusual@mail.ru>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"Steffen Görtz" <contrib@steffen-goertz.de>,
qemu-devel@nongnu.org, "Joel Stanley" <joel@jms.id.au>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Jim Mussared" <jim@groklearning.com>
Subject: Re: [Qemu-devel] [PATCH v5 1/3] tests/libqtest: Introduce qtest_init_with_serial()
Date: Wed, 23 Jan 2019 14:56:44 +0000 [thread overview]
Message-ID: <20190123145644.GK27270@redhat.com> (raw)
In-Reply-To: <8f1c4cff-c186-9fc3-10ee-7f628882ef82@redhat.com>
On Wed, Jan 23, 2019 at 08:44:12AM -0600, Eric Blake wrote:
> On 1/23/19 8:20 AM, Alex Bennée wrote:
> >
> > Julia Suvorova <jusual@mail.ru> writes:
> >
> >> Run qtest with a socket that connects QEMU chardev and test code.
> >>
> >> Signed-off-by: Julia Suvorova <jusual@mail.ru>
> >> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> >
> > Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> >
>
> >> +QTestState *qtest_init_with_serial(const char *extra_args, int *sock_fd)
> >> +{
> >> + int sock_fd_init;
> >> + char *sock_path, sock_dir[] = "/tmp/qtest-serial-XXXXXX";
> >> + QTestState *qts;
> >> +
> >> + g_assert_true(mkdtemp(sock_dir) != NULL);
> >> + sock_path = g_strdup_printf("%s/sock", sock_dir);
> >> +
> >> + sock_fd_init = init_socket(sock_path);
> >> +
> >> + qts = qtest_initf("-chardev socket,id=s0,path=%s -serial chardev:s0 %s",
> >> + sock_path, extra_args);
>
> EWWWW. Please, let's not bake in this interface. Relying on shell
> splitting is nasty.
qtest_initf() is long a standing interface that's relied on
shell splitting for years :-( I agree we should fix that, but
its a pre-existing problem that this patch doesn't make worse.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2019-01-23 14:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-23 12:07 [Qemu-devel] [PATCH v5 0/3] tests/microbit-test: Add UART device test Julia Suvorova
2019-01-23 12:07 ` [Qemu-devel] [PATCH v5 1/3] tests/libqtest: Introduce qtest_init_with_serial() Julia Suvorova
2019-01-23 13:06 ` Thomas Huth
2019-01-23 14:20 ` Alex Bennée
2019-01-23 14:44 ` Eric Blake
2019-01-23 14:56 ` Daniel P. Berrangé [this message]
2019-01-23 12:07 ` [Qemu-devel] [PATCH v5 2/3] tests/microbit-test: Make test independent of global_qtest Julia Suvorova
2019-01-23 12:07 ` [Qemu-devel] [PATCH v5 3/3] tests/microbit-test: Check nRF51 UART functionality Julia Suvorova
2019-01-23 13:09 ` Thomas Huth
2019-01-23 17:49 ` Stefan Hajnoczi
2019-01-24 13:44 ` [Qemu-devel] [PATCH v5 0/3] tests/microbit-test: Add UART device test Peter Maydell
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=20190123145644.GK27270@redhat.com \
--to=berrange@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=contrib@steffen-goertz.de \
--cc=eblake@redhat.com \
--cc=jim@groklearning.com \
--cc=joel@jms.id.au \
--cc=jusual@mail.ru \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.