From ce60464d9bedd751341778aa1155b027f9003c17 Mon Sep 17 00:00:00 2001 From: adilger Date: Sat, 10 Sep 2005 09:09:48 +0000 Subject: [PATCH] Branch: b1_4 Don't allocate zero'd memory so we write non-zero'd data to disk in test 23. b=7279 --- lustre/liblustre/tests/sanity.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lustre/liblustre/tests/sanity.c b/lustre/liblustre/tests/sanity.c index 6f496e8..7a569cb 100644 --- a/lustre/liblustre/tests/sanity.c +++ b/lustre/liblustre/tests/sanity.c @@ -812,6 +812,8 @@ static int pages_io(int xfer, loff_t pos) snprintf(path, MAX_PATH_LENGTH, "%s/test_t50", lustre_path); + memset(buf_alloc, 0, buf_size); + /* create sample data */ for (i = 0, buf = buf_alloc; i < _npages; i++) { for (j = 0; j < PAGE_SIZE/sizeof(int); j++, buf++) { @@ -1006,7 +1008,7 @@ int main(int argc, char * const argv[]) __liblustre_setup_(); buf_size = _npages * PAGE_SIZE; - buf_alloc = calloc(_npages, PAGE_SIZE); + buf_alloc = malloc(buf_size); for (test = testlist; test->test != NULL; test++) { int run = 1, i; -- 1.8.3.1