From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] preadv02/pwritev02: fix EFAULT testcase on s390/x
Date: Mon, 25 Apr 2016 17:19:05 +0200 [thread overview]
Message-ID: <20160425151905.GF20158@rei.lan> (raw)
In-Reply-To: <4d64dda152c0b8020df70f88d838c649aec716c0.1461277019.git.jstancek@redhat.com>
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?
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2016-04-25 15:19 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 [this message]
2016-04-25 16:38 ` Jan Stancek
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=20160425151905.GF20158@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 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.