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:
@ -66,3 +66,8 @@ set test "pmap XX with unreachable process"
|
||||
spawn $pmap -XX 1
|
||||
expect_pass $test "$pmap_initname\$"
|
||||
|
||||
set test "pmap finding shm"
|
||||
make_testshm_proc
|
||||
spawn $pmap $testshmproc_pid
|
||||
expect_pass $test "\[ shmid=0x$shmid \]"
|
||||
kill_testshm_proc
|
||||
|
Reference in New Issue
Block a user