From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] preadv02/pwritev02: fix EFAULT testcase on s390/x
Date: Mon, 25 Apr 2016 12:38:20 -0400 (EDT) [thread overview]
Message-ID: <1048042510.133236.1461602300545.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20160425151905.GF20158@rei.lan>
----- Original Message -----
> From: "Cyril Hrubis" <chrubis@suse.cz>
> To: "Jan Stancek" <jstancek@redhat.com>
> Cc: ltp@lists.linux.it
> Sent: Monday, 25 April, 2016 5:19:05 PM
> Subject: Re: [LTP] [PATCH] preadv02/pwritev02: fix EFAULT testcase on s390/x
>
> Hi!
> > static struct iovec rd_iovec2[] = {
> > +#if !defined(__s390__) && !defined(__s390x__)
> > {buf, CHUNK},
> > +#endif
> > {(char *)-1, CHUNK},
> > };
>
> What about splitting it as:
>
> --- a/testcases/kernel/syscalls/preadv/preadv02.c
> +++ b/testcases/kernel/syscalls/preadv/preadv02.c
> @@ -58,6 +58,9 @@ static struct iovec rd_iovec1[] = {
>
> static struct iovec rd_iovec2[] = {
> {buf, CHUNK},
> +};
> +
> +static struct iovec rd_iovec3[] = {
> {(char *)-1, CHUNK},
> };
>
> @@ -71,7 +74,7 @@ static struct tcase {
> {&fd1, rd_iovec1, 1, 0, EINVAL},
> {&fd1, rd_iovec2, -1, 0, EINVAL},
> {&fd1, rd_iovec2, 1, -1, EINVAL},
> - {&fd1, rd_iovec2, 2, 0, EFAULT},
> + {&fd1, rd_iovec3, 1, 0, EFAULT},
> {&fd3, rd_iovec2, 1, 0, EBADF},
> {&fd2, rd_iovec2, 1, 0, EBADF},
> {&fd4, rd_iovec2, 1, 0, EISDIR},
>
> instead of adding #ifdefs?
>
> That should work fine as well. Or do you want to reatain the part that tests
> that we get EFAULT for the second part of the iovec as well?
No, I think we can split it as you suggested. I'll run a quick test and post v2.
Regards,
Jan
prev parent reply other threads:[~2016-04-25 16:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-21 22:22 [LTP] [PATCH] preadv02/pwritev02: fix EFAULT testcase on s390/x Jan Stancek
2016-04-25 15:19 ` Cyril Hrubis
2016-04-25 16:38 ` Jan Stancek [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=1048042510.133236.1461602300545.JavaMail.zimbra@redhat.com \
--to=jstancek@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox