<div dir="ltr"><div class="gmail_default" style="font-size:small">ping<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 14, 2018 at 5:26 PM, Li Wang <span dir="ltr"><<a href="mailto:liwang@redhat.com" target="_blank">liwang@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The kernel commit (d2cd9ed mm,fork: introduce MADV_WIPEONFORK)<br>
introduces two new advices for madvise() in kernel-v4.14. Here<br>
making LTP cover that test accordingly.<br>
<br>
Signed-off-by: Li Wang <<a href="mailto:liwang@redhat.com">liwang@redhat.com</a>><br>
---<br>
 include/lapi/mmap.h                           | 5 +++++<br>
 testcases/kernel/syscalls/<wbr>madvise/madvise01.c | 3 +++<br>
 2 files changed, 8 insertions(+)<br>
<br>
diff --git a/include/lapi/mmap.h b/include/lapi/mmap.h<br>
index 7a55800..18547c0 100644<br>
--- a/include/lapi/mmap.h<br>
+++ b/include/lapi/mmap.h<br>
@@ -71,6 +71,11 @@<br>
 # define MADV_FREE     8<br>
 #endif<br>
<br>
+#ifndef MADV_WIPEONFORK<br>
+# define MADV_WIPEONFORK 18<br>
+# define MADV_KEEPONFORK 19<br>
+#endif<br>
+<br>
 #ifdef HAVE_SYS_SHM_H<br>
 # include <sys/shm.h><br>
 # define MMAP_GRANULARITY SHMLBA<br>
diff --git a/testcases/kernel/syscalls/<wbr>madvise/madvise01.c b/testcases/kernel/syscalls/<wbr>madvise/madvise01.c<br>
index 4b18a21..8d1d787 100644<br>
--- a/testcases/kernel/syscalls/<wbr>madvise/madvise01.c<br>
+++ b/testcases/kernel/syscalls/<wbr>madvise/madvise01.c<br>
@@ -62,6 +62,9 @@ static struct tcase {<br>
        {MADV_DONTDUMP,    "MADV_DONTDUMP",    &sfile}, /* since Linux 3.4 */<br>
        {MADV_DODUMP,      "MADV_DODUMP",      &sfile}, /* since Linux 3.4 */<br>
        {MADV_FREE,        "MADV_FREE",        &amem},  /* since Linux 4.5 */<br>
+       {MADV_WIPEONFORK,  "MADV_WIPEONFORK",  &amem},  /* since Linux 4.14 */<br>
+       {MADV_KEEPONFORK,  "MADV_KEEPONFORK",  &amem},  /* since Linux 4.14 */<br>
+<br>
 };<br>
<br>
 static void setup(void)<br>
<span class="HOEnZb"><font color="#888888">-- <br>
2.9.5<br>
<br>
<br>
-- <br>
Mailing list info: <a href="https://lists.linux.it/listinfo/ltp" rel="noreferrer" target="_blank">https://lists.linux.it/<wbr>listinfo/ltp</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div>
</div>