diff options
Diffstat (limited to 'usr/src/test/libc-tests')
-rw-r--r-- | usr/src/test/libc-tests/cfg/Makefile | 1 | ||||
-rw-r--r-- | usr/src/test/libc-tests/cfg/compilation.cfg | 3 | ||||
-rw-r--r-- | usr/src/test/libc-tests/cfg/symbols/sys_mman_h.cfg | 162 | ||||
-rw-r--r-- | usr/src/test/libc-tests/runfiles/default.run | 1 | ||||
-rw-r--r-- | usr/src/test/libc-tests/tests/symbols/Makefile | 1 |
5 files changed, 167 insertions, 1 deletions
diff --git a/usr/src/test/libc-tests/cfg/Makefile b/usr/src/test/libc-tests/cfg/Makefile index 0fb1a4096a..e1d83c43b3 100644 --- a/usr/src/test/libc-tests/cfg/Makefile +++ b/usr/src/test/libc-tests/cfg/Makefile @@ -36,6 +36,7 @@ CFGS = README \ symbols/string_h.cfg \ symbols/strings_h.cfg \ symbols/sys_atomic_h.cfg \ + symbols/sys_mman_h.cfg \ symbols/sys_stat_h.cfg \ symbols/sys_time_h.cfg \ symbols/sys_timeb_h.cfg \ diff --git a/usr/src/test/libc-tests/cfg/compilation.cfg b/usr/src/test/libc-tests/cfg/compilation.cfg index 1219844a0c..ec7e35660e 100644 --- a/usr/src/test/libc-tests/cfg/compilation.cfg +++ b/usr/src/test/libc-tests/cfg/compilation.cfg @@ -73,7 +73,8 @@ env_group | SUS+ | SUSv1+ env_group | XPG4+ | XPG4 SUSv1+ env_group | XPG3+ | XPG3 XPG4+ env_group | C99+ | C99 C11 POSIX-2001+ SUSv3+ -env_group | C+ | C90 C99 C11 POSIX+ SUS+ +env_group | STDC | C90 C99 C11 +env_group | C+ | STDC POSIX+ SUS+ env_group | ALL | C+ # diff --git a/usr/src/test/libc-tests/cfg/symbols/sys_mman_h.cfg b/usr/src/test/libc-tests/cfg/symbols/sys_mman_h.cfg new file mode 100644 index 0000000000..e9c8c1d5a5 --- /dev/null +++ b/usr/src/test/libc-tests/cfg/symbols/sys_mman_h.cfg @@ -0,0 +1,162 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2022 Oxide Computer Company +# + +# +# Historical note: This header has never been part of ISO C. The +# visibility rules were always specific to versions of POSIX/XPG. +# Applications have assumed that these are visible even in a strict ISO +# C environment, which we honor because this header isn't part of the +# standard. See <sys/mman.h> for more details, but this is why you see +# the STDC group here for things that aren't standardized, as we want +# to make sure we don't regress that support. +# + +# +# Types +# + +# +# Values. +# +value | PROT_READ | int | sys/mman.h | +ALL +value | PROT_WRITE | int | sys/mman.h | +ALL +value | PROT_EXEC | int | sys/mman.h | +ALL +value | PROT_NONE | int | sys/mman.h | +ALL +value | MAP_SHARED | int | sys/mman.h | +ALL +value | MAP_PRIVATE | int | sys/mman.h | +ALL +value | MAP_FILE | int | sys/mman.h | +ALL +value | MAP_FIXED | int | sys/mman.h | +ALL +value | MAP_NORESERVE | int | sys/mman.h | +ALL +value | MAP_ANON | int | sys/mman.h | +ALL +value | MAP_ALIGN | int | sys/mman.h | +ALL +value | MAP_TEXT | int | sys/mman.h | +ALL +value | MAP_INITDATA | int | sys/mman.h | +ALL + +value | MCL_CURRENT | int | sys/mman.h | STDC POSIX-1993+ SUSv2+ +value | MCL_FUTURE | int | sys/mman.h | STDC POSIX-1993+ SUSv2+ + + +value | POSIX_MADV_NORMAL | int | sys/mman.h | STDC SUSv3+ +value | POSIX_MADV_RANDOM | int | sys/mman.h | STDC SUSv3+ +value | POSIX_MADV_SEQUENTIAL | int | sys/mman.h | STDC SUSv3+ +value | POSIX_MADV_WILLNEED | int | sys/mman.h | STDC SUSv3+ +value | POSIX_MADV_DONTNEED | int | sys/mman.h | STDC SUSv3+ + +value | MAP_FAILED | void * | sys/mman.h | +ALL + +# +# Defines +# + +# +# Functions +# + +# +# This first group of functions basically should always be visible. +# +func | mmap |\ + void * |\ + void *; size_t; int; int; int; off_t |\ + sys/mman.h | +ALL + +func | munmap |\ + int |\ + void *; size_t |\ + sys/mman.h | +ALL + +func | mprotect |\ + int |\ + void *; size_t; int |\ + sys/mman.h | +ALL + +func | msync |\ + int |\ + void *; size_t; int |\ + sys/mman.h | +ALL + + +# +# This next group of functions were added in the realtime POSIX extensions, e.g. +# they should be in POSIX at POSIX-1993. However, they weren't part of XPG until +# XPG5, aka what we call SUSv2 in these tests. +# +func | mlock |\ + int |\ + void *; size_t |\ + sys/mman.h | STDC POSIX-1993+ SUSv2+ + +func | munlock |\ + int |\ + void *; size_t |\ + sys/mman.h | STDC POSIX-1993+ SUSv2+ + +func | mlockall |\ + int |\ + int |\ + sys/mman.h | STDC POSIX-1993+ SUSv2+ + +func | munlockall |\ + int |\ + void |\ + sys/mman.h | STDC POSIX-1993+ SUSv2+ + +func | shm_open |\ + int |\ + const char *; int; mode_t |\ + sys/mman.h | STDC POSIX-1993+ SUSv2+ + +func | shm_unlink |\ + int |\ + const char * |\ + sys/mman.h | STDC POSIX-1993+ SUSv2+ + +# +# Added in XPG6 +# +func | posix_madvise |\ + int |\ + void *; size_t; int |\ + sys/mman.h | STDC SUSv3+ + +# +# Our various extensions. No visibility expected in a standards environment. We +# do a handful of these with the assumption that as long as a few in the block +# are OK, the rest should be. +# +func | mincore |\ + int |\ + caddr_t; size_t; char * |\ + sys/mman.h | -ALL STDC + +func | memcntl |\ + int |\ + void *; size_t; int; void *; int; int |\ + sys/mman.h | -ALL STDC + +func | madvise |\ + int |\ + void *; size_t; int |\ + sys/mman.h | -ALL STDC + +func | getpagesizes |\ + int |\ + size_t *; int |\ + sys/mman.h | -ALL STDC + +func | getpagesizes2 |\ + int |\ + size_t *; int |\ + sys/mman.h | -ALL STDC diff --git a/usr/src/test/libc-tests/runfiles/default.run b/usr/src/test/libc-tests/runfiles/default.run index 32cac780d1..6c225db7a1 100644 --- a/usr/src/test/libc-tests/runfiles/default.run +++ b/usr/src/test/libc-tests/runfiles/default.run @@ -161,6 +161,7 @@ tests = [ 'string_h', 'strings_h', 'sys_atomic_h', + 'sys_mman_h', 'sys_stat_h', 'sys_time_h', 'sys_timeb_h', diff --git a/usr/src/test/libc-tests/tests/symbols/Makefile b/usr/src/test/libc-tests/tests/symbols/Makefile index 8377810b83..8e30245adf 100644 --- a/usr/src/test/libc-tests/tests/symbols/Makefile +++ b/usr/src/test/libc-tests/tests/symbols/Makefile @@ -37,6 +37,7 @@ SYMTESTS = \ string_h \ strings_h \ sys_atomic_h \ + sys_mman_h \ sys_stat_h \ sys_time_h \ sys_timeb_h \ |