testsuite shmid can be hex too

Previously the match for shmid was \d+ but the variable is printed
as a hex number, updated the regex to suit.

Added some changes for pmap test so if the test_shm process fails
we just skip past it.

Signed-off-by: Craig Small <csmall@dropbear.xyz>
This commit is contained in:
Craig Small 2022-05-03 19:37:39 +10:00
parent d66c1f39b5
commit 38693960a1
2 changed files with 8 additions and 4 deletions

View File

@ -195,8 +195,8 @@ proc make_testshm_proc { } {
set testshmproc_spawnid $spawn_id set testshmproc_spawnid $spawn_id
expect { expect {
-i $testshmproc_spawnid -i $testshmproc_spawnid
-re "^SHMID: (\\d+)" { set shmid $expect_out(1,string) } -re "^SHMID: (\[0-9a-f\]+)" { set shmid $expect_out(1,string) }
default { fail "spawning testshm" } default { set shmid "" }
} }
} }

View File

@ -68,6 +68,10 @@ expect_pass $test "$pmap_initname\$"
set test "pmap finding shm" set test "pmap finding shm"
make_testshm_proc make_testshm_proc
if { $shmid == "" } {
unsupported "$test - could not start test_shm"
} else {
spawn $pmap $testshmproc_pid spawn $pmap $testshmproc_pid
expect_pass $test "\[ shmid=0x$shmid \]" expect_pass $test "\[ shmid=0x$shmid \]"
}
kill_testshm_proc kill_testshm_proc