testsuite: Add check for shared memory

Created a test process test_shm that allocates a shared memory
segment and prints the segment ID. pmap testsuite runs pmap to
check that the segment is found.

The value returned by shmget() is the same value that is printed
in the fifth column /proc/<PID>/maps

Signed-off-by: Craig Small <csmall@dropbear.xyz>
This commit is contained in:
Craig Small
2022-04-26 22:04:05 +10:00
parent 1f085f5a9f
commit 9c5397a941
5 changed files with 100 additions and 1 deletions

View File

@@ -326,7 +326,8 @@ check_PROGRAMS = \
lib/test_strutils \
lib/test_fileutils \
lib/test_process \
lib/test_strtod_nol
lib/test_strtod_nol \
lib/test_shm
lib_test_strutils_SOURCES = lib/test_strutils.c lib/strutils.c
lib_test_strutils_LDADD = $(CYGWINFLAGS)
@@ -336,6 +337,8 @@ lib_test_process_SOURCES = lib/test_process.c
lib_test_process_LDADD = $(CYGWINFLAGS)
lib_test_strtod_nol_SOURCES = lib/test_strtod_nol.c lib/strutils.c
lib_test_strtod_nol_LDADD = $(CYGWINFLAGS)
lib_test_shm_SOURCES = lib/test_shm.c lib/strutils.c
lib_test_shm_LDADD = $(CYGWINFLAGS)
check_PROGRAMS += \
proc/test_Itemtables \