From: "Michael S. Tsirkin" <mst@redhat.com>
To: yskelg@gmail.com
Cc: "Jason Wang" <jasowang@redhat.com>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
"Eugenio Pérez" <eperezma@redhat.com>,
skhan@linuxfoundation.org, "Austin Kim" <austindh.kim@gmail.com>,
shjy180909@gmail.com, virtualization@lists.linux.dev,
linux-kernel@vger.kernel.org,
linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [PATCH] tools/virtio: pipe assertion in vring_test.c
Date: Mon, 27 May 2024 03:52:33 -0400 [thread overview]
Message-ID: <20240527035009-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20240527071330.105268-1-yskelg@gmail.com>
On Mon, May 27, 2024 at 04:13:31PM +0900, yskelg@gmail.com wrote:
> From: Yunseong Kim <yskelg@gmail.com>
>
> The virtio_device need to fail checking when create the geust/host pipe.
typo
>
> Signed-off-by: Yunseong Kim <yskelg@gmail.com>
I guess ...
> ---
> tools/virtio/vringh_test.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/virtio/vringh_test.c b/tools/virtio/vringh_test.c
> index 98ff808d6f0c..b1af8807c02a 100644
> --- a/tools/virtio/vringh_test.c
> +++ b/tools/virtio/vringh_test.c
> @@ -161,8 +161,8 @@ static int parallel_test(u64 features,
> host_map = mmap(NULL, mapsize, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
> guest_map = mmap(NULL, mapsize, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
>
> - pipe(to_guest);
> - pipe(to_host);
> + assert(pipe(to_guest) == 0);
> + assert(pipe(to_host) == 0);
I don't like == 0, prefer ! .
Also, calling pipe outside assert is preferable, since in theory
assert can be compiled out.
Not an issue here but people tend to copy/paste text.
> CPU_ZERO(&cpu_set);
> find_cpus(&first_cpu, &last_cpu);
> --
> 2.34.1
next prev parent reply other threads:[~2024-05-27 7:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 7:13 [PATCH] tools/virtio: pipe assertion in vring_test.c yskelg
2024-05-27 7:52 ` Michael S. Tsirkin [this message]
2024-05-27 8:40 ` Yunseong Kim
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=20240527035009-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=austindh.kim@gmail.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shjy180909@gmail.com \
--cc=skhan@linuxfoundation.org \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.com \
--cc=yskelg@gmail.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.