From: Xiao Yang <yangx.jy@cn.fujitsu.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/2] syscalls/splice05: check if splice supports stream af_unix sockets
Date: Wed, 14 Jun 2017 08:21:25 +0800 [thread overview]
Message-ID: <59408185.4070508@cn.fujitsu.com> (raw)
In-Reply-To: <1496904074-25394-2-git-send-email-yangx.jy@cn.fujitsu.com>
Hi,
I have modified it and will send the v2 patch.
Thanks,
Xiao Yang
On 2017/06/08 14:41, Xiao Yang wrote:
> On some older kernel(e.g, 3.10.0), test result should be TCONF instead
> of TFAIL when splice does not support stream af_unix sockets as input.
>
> This implement is introduced in kernel:
> '2b514574f7e8(net: af_unix: implement splice for stream af_unix sockets)'
>
> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
> ---
> testcases/kernel/syscalls/splice/splice05.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/testcases/kernel/syscalls/splice/splice05.c b/testcases/kernel/syscalls/splice/splice05.c
> index d7edf8d..b65df4b 100644
> --- a/testcases/kernel/syscalls/splice/splice05.c
> +++ b/testcases/kernel/syscalls/splice/splice05.c
> @@ -24,6 +24,7 @@
> */
>
> #define _GNU_SOURCE
> +#include <errno.h>
> #include <sys/types.h>
> #include <sys/socket.h>
> #include <sys/stat.h>
> @@ -90,6 +91,11 @@ static void pipe_socket(void)
> for (i = num_len_data; i > 0; i = i - ret) {
> ret = splice(sv[1], 0, pp2[1], NULL, i, 0);
> if (ret == -1) {
> + if (errno == EINVAL) {
> + tst_res(TCONF | TERRNO, "splice doesn't "
> + "support stream af_unix sockets");
> + goto exit;
> + }
> tst_res(TFAIL | TERRNO, "splice error");
> goto exit;
> }
next prev parent reply other threads:[~2017-06-14 0:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-08 6:41 [LTP] [PATCH 1/2] syscalls/splice04,05: fix max limit for pipe Xiao Yang
2017-06-08 6:41 ` [LTP] [PATCH 2/2] syscalls/splice05: check if splice supports stream af_unix sockets Xiao Yang
2017-06-14 0:21 ` Xiao Yang [this message]
2017-06-14 0:23 ` [LTP] [PATCH v2] " Xiao Yang
2017-06-15 12:46 ` Cyril Hrubis
2017-06-16 1:44 ` [LTP] [PATCH v3 1/2] syscalls/splice04,05: fix max limit for pipe Xiao Yang
2017-06-16 1:44 ` [LTP] [PATCH v3 2/2] syscalls/splice05: check if splice supports af_unix sockets Xiao Yang
2017-06-20 9:19 ` [LTP] [PATCH v3 1/2] syscalls/splice04, 05: fix max limit for pipe Cyril Hrubis
2017-06-15 12:43 ` [LTP] [PATCH 1/2] syscalls/splice04,05: " Cyril Hrubis
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=59408185.4070508@cn.fujitsu.com \
--to=yangx.jy@cn.fujitsu.com \
--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 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.