From: "gux.fnst" <gux.fnst@cn.fujitsu.com>
To: ltp-list <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] [PATCH] splice/splice03.c: add EBADF, EINVAL and ESPIPE error value tests
Date: Fri, 30 May 2014 16:02:34 +0800 [thread overview]
Message-ID: <53883B1A.5070200@cn.fujitsu.com> (raw)
In-Reply-To: <1401098198-1109-1-git-send-email-gux.fnst@cn.fujitsu.com>
Please ignore this patch.
I will send a V2 version where "#define _GNU_SOURCE" is added, thanks.
Regards,
Xing Gu
于 05/26/2014 05:56 PM, Xing Gu 写道:
> Signed-off-by: Xing Gu <gux.fnst@cn.fujitsu.com>
> ---
> configure.ac | 1 +
> m4/ltp-splice.m4 | 25 ++++
> runtest/syscalls | 1 +
> testcases/kernel/syscalls/.gitignore | 1 +
> testcases/kernel/syscalls/splice/splice.h | 36 ++++++
> testcases/kernel/syscalls/splice/splice01.c | 9 +-
> testcases/kernel/syscalls/splice/splice02.c | 11 +-
> testcases/kernel/syscalls/splice/splice03.c | 178 ++++++++++++++++++++++++++++
> 8 files changed, 245 insertions(+), 17 deletions(-)
> create mode 100644 m4/ltp-splice.m4
> create mode 100644 testcases/kernel/syscalls/splice/splice.h
> create mode 100644 testcases/kernel/syscalls/splice/splice03.c
>
> diff --git a/configure.ac b/configure.ac
> index 8698c47..96611cf 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -182,5 +182,6 @@ LTP_CHECK_FALLOCATE
> LTP_CHECK_SYSCALL_FCNTL
> LTP_CHECK_SYSCALL_PERF_EVENT_OPEN
> LTP_CHECK_TIRPC
> +LTP_CHECK_SPLICE
>
> AC_OUTPUT
> diff --git a/m4/ltp-splice.m4 b/m4/ltp-splice.m4
> new file mode 100644
> index 0000000..0ddaae0
> --- /dev/null
> +++ b/m4/ltp-splice.m4
> @@ -0,0 +1,25 @@
> +dnl
> +dnl Copyright (c) Linux Test Project, 2014
> +dnl
> +dnl This program is free software; you can redistribute it and/or modify
> +dnl it under the terms of the GNU General Public License as published by
> +dnl the Free Software Foundation; either version 2 of the License, or
> +dnl (at your option) any later version.
> +dnl
> +dnl This program is distributed in the hope that it will be useful,
> +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
> +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
> +dnl the GNU General Public License for more details.
> +dnl
> +dnl You should have received a copy of the GNU General Public License
> +dnl along with this program; if not, write to the Free Software
> +dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> +dnl
> +
> +dnl
> +dnl LTP_CHECK_SPLICE
> +dnl ----------------------------
> +dnl
> +AC_DEFUN([LTP_CHECK_SPLICE],[
> +AC_CHECK_FUNCS(splice,,)
> +])
> diff --git a/runtest/syscalls b/runtest/syscalls
> index ae6d297..ea67137 100644
> --- a/runtest/syscalls
> +++ b/runtest/syscalls
> @@ -1151,6 +1151,7 @@ sockioctl01 sockioctl01
> #splice test
> splice01 splice01
> splice02 seq 1 10000000 | splice02 splice02-temp
> +splice03 splice03
>
> tee01 tee01
>
> diff --git a/testcases/kernel/syscalls/.gitignore b/testcases/kernel/syscalls/.gitignore
> index 825549f..f8460e8 100644
> --- a/testcases/kernel/syscalls/.gitignore
> +++ b/testcases/kernel/syscalls/.gitignore
> @@ -901,6 +901,7 @@
> /sockioctl/sockioctl01
> /splice/splice01
> /splice/splice02
> +/splice/splice03
> /ssetmask/ssetmask01
> /stat/stat01
> /stat/stat01_64
> diff --git a/testcases/kernel/syscalls/splice/splice.h b/testcases/kernel/syscalls/splice/splice.h
> new file mode 100644
> index 0000000..4e243fd
> --- /dev/null
> +++ b/testcases/kernel/syscalls/splice/splice.h
> @@ -0,0 +1,36 @@
> +/*
> + * Copyright (c) International Business Machines Corp., 2007
> + * Copyright (c) 2014 Fujitsu Ltd.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU Library General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
> + *
> + */
> +
> +#ifndef SPLICE_H
> +#define SPLICE_H
> +
> +#include "config.h"
> +#include "linux_syscall_numbers.h"
> +
> +#if !defined(HAVE_SPLICE)
> +ssize_t splice(int fd_in, loff_t *off_in, int fd_out,
> + loff_t *off_out, size_t len, unsigned int flags)
> +{
> + return ltp_syscall(__NR_splice, fd_in, off_in,
> + fd_out, off_out, len, flags);
> +}
> +#endif
> +
> +#endif /* SPLICE_H */
------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2014-05-30 8:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-26 9:56 [LTP] [PATCH] splice/splice03.c: add EBADF, EINVAL and ESPIPE error value tests Xing Gu
2014-05-30 8:02 ` gux.fnst [this message]
2014-05-30 8:05 ` [LTP] [PATCH v2] " Xing Gu
2014-06-03 9:07 ` chrubis
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=53883B1A.5070200@cn.fujitsu.com \
--to=gux.fnst@cn.fujitsu.com \
--cc=ltp-list@lists.sourceforge.net \
/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