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>
set testshmproc_spawnid $spawn_id
expect {
-i $testshmproc_spawnid
- -re "^SHMID: (\\d+)" { set shmid $expect_out(1,string) }
- default { fail "spawning testshm" }
+ -re "^SHMID: (\[0-9a-f\]+)" { set shmid $expect_out(1,string) }
+ default { set shmid "" }
}
}
set test "pmap finding shm"
make_testshm_proc
-spawn $pmap $testshmproc_pid
-expect_pass $test "\[ shmid=0x$shmid \]"
+if { $shmid == "" } {
+ unsupported "$test - could not start test_shm"
+} else {
+ spawn $pmap $testshmproc_pid
+ expect_pass $test "\[ shmid=0x$shmid \]"
+}
kill_testshm_proc