public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v1] Add more madvise testcases in madvise01
@ 2022-08-24  8:06 Andrea Cervesato via ltp
  2022-10-06 11:53 ` Petr Vorel
  2022-10-17  8:13 ` Richard Palethorpe
  0 siblings, 2 replies; 3+ messages in thread
From: Andrea Cervesato via ltp @ 2022-08-24  8:06 UTC (permalink / raw)
  To: ltp

Added MADV_COLD and MADV_PAGEOUT madvise modes and created two new
testcases in madvise01 for them. Supported by kernel >= 5.4.

Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
 include/lapi/mmap.h                           | 8 ++++++++
 testcases/kernel/syscalls/madvise/madvise01.c | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/include/lapi/mmap.h b/include/lapi/mmap.h
index 12845b76e..49108338b 100644
--- a/include/lapi/mmap.h
+++ b/include/lapi/mmap.h
@@ -66,6 +66,14 @@
 # define MADV_KEEPONFORK 19
 #endif
 
+#ifndef MADV_COLD
+# define MADV_COLD	20
+#endif
+
+#ifndef MADV_PAGEOUT
+# define MADV_PAGEOUT	21
+#endif
+
 #ifndef MAP_FIXED_NOREPLACE
 
 #ifdef __alpha__
diff --git a/testcases/kernel/syscalls/madvise/madvise01.c b/testcases/kernel/syscalls/madvise/madvise01.c
index de5daf34a..ec64a1db3 100644
--- a/testcases/kernel/syscalls/madvise/madvise01.c
+++ b/testcases/kernel/syscalls/madvise/madvise01.c
@@ -55,6 +55,8 @@ static struct tcase {
 	{MADV_FREE,        "MADV_FREE",        &amem},  /* since Linux 4.5 */
 	{MADV_WIPEONFORK,  "MADV_WIPEONFORK",  &amem},  /* since Linux 4.14 */
 	{MADV_KEEPONFORK,  "MADV_KEEPONFORK",  &amem},  /* since Linux 4.14 */
+	{MADV_COLD,        "MADV_COLD",        &amem},  /* since Linux 5.4 */
+	{MADV_PAGEOUT,     "MADV_PAGEOUT",     &amem},  /* since Linux 5.4 */
 
 };
 
-- 
2.35.3


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-17  8:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-24  8:06 [LTP] [PATCH v1] Add more madvise testcases in madvise01 Andrea Cervesato via ltp
2022-10-06 11:53 ` Petr Vorel
2022-10-17  8:13 ` Richard Palethorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox