[LTP] [PATCH v2 05/11] syscalls/preadv01: Make use of guarded buffers.
Cyril Hrubis
chrubis@suse.cz
Mon Aug 12 16:39:35 CEST 2019
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
testcases/kernel/syscalls/preadv/preadv01.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/testcases/kernel/syscalls/preadv/preadv01.c b/testcases/kernel/syscalls/preadv/preadv01.c
index 2452f216a..95431bc60 100644
--- a/testcases/kernel/syscalls/preadv/preadv01.c
+++ b/testcases/kernel/syscalls/preadv/preadv01.c
@@ -24,12 +24,8 @@
#define CHUNK 64
static int fd;
-static char buf[CHUNK];
-static struct iovec rd_iovec[] = {
- {buf, CHUNK},
- {NULL, 0},
-};
+static struct iovec *rd_iovec;
static struct tcase {
int count;
@@ -111,4 +107,8 @@ static struct tst_test test = {
.test = verify_preadv,
.min_kver = "2.6.30",
.needs_tmpdir = 1,
+ .bufs = (struct tst_buffers []) {
+ {&rd_iovec, .iov_sizes = (int[]){CHUNK, 0, -1}},
+ {},
+ }
};
--
2.21.0
More information about the ltp
mailing list