[LTP] [PATCH 1/1] lapi/mmap.h: Add MAP_SHARED_VALIDATE

Petr Vorel pvorel@suse.cz
Fri Mar 24 11:16:30 CET 2023


It will be needed in new mmap20.c test for CentOS 7.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Hi,

Fix required for patch:
https://patchwork.ozlabs.org/project/ltp/patch/20230323121330.92244-1-paulson@zilogic.com/

CI shows failures on CentOS 7:

https://github.com/pevik/ltp/actions/runs/4509751194/jobs/7939880067

/__w/ltp/ltp/testcases/kernel/syscalls/mmap/mmap20.c:48:25: error: 'MAP_SHARED_VALIDATE' undeclared (first use in this function)
          INVALID_FLAG | MAP_SHARED_VALIDATE, fd, 0);
/__w/ltp/ltp/testcases/kernel/syscalls/mmap/mmap20.c:48:25: note: each undeclared identifier is reported only once for each function it appears in

More at he patch

 include/lapi/mmap.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/lapi/mmap.h b/include/lapi/mmap.h
index 48795369d..7512e9f81 100644
--- a/include/lapi/mmap.h
+++ b/include/lapi/mmap.h
@@ -10,6 +10,10 @@
 #include "config.h"
 #include <sys/mman.h>
 
+#ifndef MAP_SHARED_VALIDATE
+# define MAP_SHARED_VALIDATE 0x03
+#endif
+
 #ifndef MAP_HUGETLB
 # define MAP_HUGETLB 0x40000
 #endif
-- 
2.40.0



More information about the ltp mailing list