From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH] qio: fix command spawn RDONLY/WRONLY
Date: Thu, 1 Sep 2022 11:51:16 +0100 [thread overview]
Message-ID: <YxCOpKg14gSvijX9@redhat.com> (raw)
In-Reply-To: <CAJ+F1C+t59uYMPtaaxay1uZfxMu=J47LPKiYO1tnYL4oQBbwxw@mail.gmail.com>
On Thu, Sep 01, 2022 at 02:47:17PM +0400, Marc-André Lureau wrote:
> Hi
>
> On Thu, Sep 1, 2022 at 2:32 PM Daniel P. Berrangé <berrange@redhat.com>
> wrote:
>
> > On Thu, Sep 01, 2022 at 02:11:20PM +0400, marcandre.lureau@redhat.com
> > wrote:
> > > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> > >
> > > The in/out handling is inverted, although nothing seemed to notice that
> > yet.
> >
> > On the contrary, it is correct, and the unit tests validate this.
> >
>
> > > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > > ---
> > > io/channel-command.c | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/io/channel-command.c b/io/channel-command.c
> > > index 9f2f4a1793..ed17b44f74 100644
> > > --- a/io/channel-command.c
> > > +++ b/io/channel-command.c
> > > @@ -79,10 +79,10 @@ qio_channel_command_new_spawn(const char *const
> > argv[],
> > > flags = flags & O_ACCMODE;
> > >
> > > if (flags == O_RDONLY) {
> > > - stdinnull = true;
> > > + stdoutnull = true;
> > > }
> > > if (flags == O_WRONLY) {
> > > - stdoutnull = true;
> > > + stdinnull = true;
> > > }
> >
> > This change breaks the unit tests.
> >
> >
> Does it really test it then? we are talking about test-io-channel-command ?
> It works before and after for me. Other tests as well.
Yes, it certainly fails for me:
$ ./build/tests/unit/test-io-channel-command -p /io/channel/command/fifo/sync
# random seed: R02S5134a426f643aeefdbe73921046b66da
# Start of io tests
# Start of channel tests
# Start of command tests
# Start of fifo tests
**
ERROR:../tests/unit/io-channel-helpers.c:152:qio_channel_test_validate: assertion failed: (test->readerr == NULL)
Bail out! ERROR:../tests/unit/io-channel-helpers.c:152:qio_channel_test_validate: assertion failed: (test->readerr == NULL)
Aborted (core dumped)
With 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 :|
prev parent reply other threads:[~2022-09-01 10:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 10:11 [PATCH] qio: fix command spawn RDONLY/WRONLY marcandre.lureau
2022-09-01 10:31 ` Daniel P. Berrangé
2022-09-01 10:47 ` Marc-André Lureau
2022-09-01 10:51 ` Daniel P. Berrangé [this message]
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=YxCOpKg14gSvijX9@redhat.com \
--to=berrange@redhat.com \
--cc=marcandre.lureau@gmail.com \
--cc=qemu-devel@nongnu.org \
/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).