[LTP] [PATCH V4] syscalls/madvise02: reconstruct and convert to new API
Li Wang
liwang@redhat.com
Wed Jun 8 05:22:12 CEST 2016
Hi Cyril,
On Tue, Jun 07, 2016 at 04:24:14PM +0200, Cyril Hrubis wrote:
>
> I've moved the setup-like parts from the filter function to setup, so
> that the filter function only filters the testcases.
>
> And also used the LTP_ALIGN() macro to align the tmp_addr and pushed,
> thanks.
Thanks for reviewing. But seems the aligned address is not right, we need
to apply a new patch to fix that.
madvise02: correct the aligned address
Signed-off-by: Li Wang <liwang@redhat.com>
diff --git a/testcases/kernel/syscalls/madvise/madvise02.c b/testcases/kernel/syscalls/madvise/madvise02.c
index 3a595c2..347d9cc 100644
--- a/testcases/kernel/syscalls/madvise/madvise02.c
+++ b/testcases/kernel/syscalls/madvise/madvise02.c
@@ -142,7 +142,7 @@ static void setup(void)
nonalign = file1 + 100;
ptr_addr = SAFE_MALLOC(st.st_size);
- tmp_addr = (void*)LTP_ALIGN((long)tmp_addr, pagesize);
+ tmp_addr = (void*)LTP_ALIGN((long)ptr_addr, pagesize);
SAFE_CLOSE(fd);
Regards,
Li Wang
More information about the ltp
mailing list