From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v4 1/2] syscalls/splice04: add test for splice() from pipe to pipe
Date: Fri, 19 May 2017 16:38:02 +0200 [thread overview]
Message-ID: <20170519143801.GF17258@rei.lan> (raw)
In-Reply-To: <20170519142542.GD17258@rei.lan>
Hi!
> > + SAFE_PIPE(pp1);
> > + SAFE_PIPE(pp2);
> > + SAFE_WRITE(1, pp1[1], arr_in, num_len_data);
> > + for (i = 0; i < num_len_data; i++) {
> > + ret = splice(pp1[0], NULL, pp2[1], NULL, 1, SPLICE_F_MOVE);
> > + if (ret == -1) {
> > + tst_res(TFAIL | TERRNO, "splice error");
> > + goto exit;
> > + }
> > + SAFE_READ(1, pp2[0], arr_out + i, 1);
> > + }
>
> I do not understand why we are moving the data byte by byte here?
>
> And also the SPLICE_F_MOVE flag, even if that was correctly implemented,
> would be useless here.
Looked at the previous version of the patch and the comment from Jan.
What he meant there was that we should decrease the number of requested
bytes by the number of bytes we spliced already.
--
Cyril Hrubis
chrubis@suse.cz
prev parent reply other threads:[~2017-05-19 14:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-12 9:14 [LTP] [PATCH v4 1/2] syscalls/splice04: add test for splice() from pipe to pipe bxue
2017-05-12 9:14 ` [LTP] [PATCH v4 2/2] syscalls/splice05: add test for splice() between pipe and socket bxue
2017-05-19 14:27 ` Cyril Hrubis
2017-05-19 14:25 ` [LTP] [PATCH v4 1/2] syscalls/splice04: add test for splice() from pipe to pipe Cyril Hrubis
2017-05-19 14:38 ` Cyril Hrubis [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=20170519143801.GF17258@rei.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/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