summaryrefslogtreecommitdiffstats
path: root/debian/patches/pmap_test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 20:34:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 20:34:44 +0000
commitb08293e544fb5eb5e004f02139e4aa06660395b6 (patch)
tree4b00360b4f034158a87d15d0d6dd797c42270717 /debian/patches/pmap_test
parentAdding upstream version 2:4.0.4. (diff)
downloadprocps-b08293e544fb5eb5e004f02139e4aa06660395b6.tar.xz
procps-b08293e544fb5eb5e004f02139e4aa06660395b6.zip
Adding debian version 2:4.0.4-4.debian/2%4.0.4-4debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/pmap_test')
-rw-r--r--debian/patches/pmap_test61
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