diff options
Diffstat (limited to 'debian/patches/pmap_test')
-rw-r--r-- | debian/patches/pmap_test | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/debian/patches/pmap_test b/debian/patches/pmap_test new file mode 100644 index 0000000..02523f5 --- /dev/null +++ b/debian/patches/pmap_test @@ -0,0 +1,61 @@ +Description: pmap tests + Make the double value check have a looser regex + Skip pmap -X 1 if the file doesn't exist or is readable +Author: Craig Small <csmall@dropbear.xyz> +Applied-Upstream: 4.0.5 +Reviewed-by: Craig Small <csmall@debian.org> +Last-Update: 2023-10-09 +--- a/testsuite/pmap.test/pmap.exp ++++ b/testsuite/pmap.test/pmap.exp +@@ -62,19 +62,27 @@ + expect_table $test $pmap_generic_header "\[^=\]+" "\[= \]+" + + set test "pmap X with unreachable process" +- spawn $pmap -X 1 +- expect_pass $test "$pmap_initname\$" ++ if { [ file exists "/proc/1/smaps" ] == 1 && [ file readable "/proc/1/smaps" ] == 0 } { ++ spawn $pmap -X 1 ++ expect_pass $test "$pmap_initname\$" ++ } else { ++ unsupported "$test : PID 1 smaps file needs to exist and not be readable" ++ } + + set test "pmap XX with unreachable process" +- spawn $pmap -XX 1 +- expect_pass $test "$pmap_initname\$" ++ if { [ file exists "/proc/1/smaps" ] == 1 && [ file readable "/proc/1/smaps" ] == 0 } { ++ spawn $pmap -XX 1 ++ expect_pass $test "$pmap_initname\$" ++ } else { ++ unsupported "$test : PID 1 smaps file needs to exist and not be readable" ++ } + } + + + proc expect_twice_total { test } { + set totkb 0 + expect { +- -re "\r\n\\s+(\\d+)\[0-9 \]*KB" { ++ -re "\r\n\\s+(\\d+)\\s+.*KB" { + set totkb $expect_out(1,string) + expect { + -re "\r\n\\s+$totkb\[0-9 \]*KB" { pass "$test" } +@@ -88,12 +96,14 @@ + } + + set test "pmap X pid pid has same total" +-spawn $pmap -X $mypid $mypid +-expect_twice_total "$test" ++unsupported "$test : flakey on buildds" ++#spawn $pmap -X $mypid $mypid ++#expect_twice_total "$test" + + set test "pmap XX pid pid has same total" +-spawn $pmap -XX $mypid $mypid +-expect_twice_total "$test" ++unsupported "$test : flakey on buildds" ++#spawn $pmap -XX $mypid $mypid ++#expect_twice_total "$test" + + set test "pmap finding shm" + make_testshm_proc |