]> granicus.if.org Git - procps-ng/commitdiff
testsuite: ps out tests more lenient
authorCraig Small <csmall@dropbear.xyz>
Tue, 22 Mar 2022 09:20:53 +0000 (20:20 +1100)
committerCraig Small <csmall@dropbear.xyz>
Tue, 22 Mar 2022 09:20:53 +0000 (20:20 +1100)
Sometimes due to race conditions or the way dejagnu gates the
output, or even there is another interesting process, the ps tests
sometimes fail. These changes make it a little more lenient without
losing the purpose of the test.

Replaces Debian patch ps_tests

References:
 https://salsa.debian.org/debian/procps/-/blob/debian/2%253.3.17-7/debian/patches/ps_checks

testsuite/ps.test/ps_output.exp

index fef4556364eb4a4b35b8356f9d31828616a9c520..99fa8d4d6877a78f296896a6507e4426a7d8dc13 100644 (file)
@@ -22,8 +22,8 @@ set ps_time "\(\d+-\)?\\\d{1,3}:\\d{2}\\s*"
 set ps_class "\[A-Z?-\]\\s*"
 
 set flag_match {
-    "%cpu,pcpu,%mem,pmem"   "%CPU\\s+%CPU\\s+%MEM\\s+%MEM\\s+\(\\d+\.\\d+\\s*\){4}$"
-    "blocked,sig_block,sigmask,caught,sigcatch,sig_catch" "\(BLOCKED\\s+\){3}\(CAUGHT\\s+\){2}CATCHED\\s+\(<?\[0-9a-f\]+\\s*\){6}$"
+    "%cpu,pcpu,%mem,pmem"   "%CPU\\s+%CPU\\s+%MEM\\s+%MEM\\s+\(\(\\d+\.\\d+\\s*\){4}\)+$"
+    "blocked,sig_block,sigmask,caught,sigcatch,sig_catch" "\(BLOCKED\\s+\){3}\(CAUGHT\\s+\){2}CATCHED\\s+\(<?\[0-9a-f\]+\\s*\)+$"
     "bsdstart,start,lstart" "\\s*START\\s+STARTED\\s+STARTED\\s+\(\\s*\(\[A-Z\]\[a-z\]{2} \\d+|\\d+:\\d{2}\)\\s+\(\[A-Z\]\[a-z\]{2} \\d+|\\d+:\\d{2}:\\d{2}\)\\s+\[A-Z\]\[a-z\]{2} \[A-Z\]\[a-z\]{2}\\s+\\d+ \\d{2}:\\d{2}:\\d{2} \\d{4}\\s*\)+$"
     "bsdtime,cputime,etime,etimes" "\\s*TIME\\s+TIME\\s+ELAPSED\\s+ELAPSED\\s*\(\\s*\\d+:\\d{2}\\s+\\d{2}:\\d{2}:\\d{2}\\s+\(\\d{2}:\)?\\d{2}:\\d{2}\\s+\\d+\\s*\)+$"
     "user,ruser,group,rgroup,uid,ruid,gid,rgid" "\\s*USER\\s+RUSER\\s+GROUP\\s+RGROUP\\s+UID\\s+RUID\\s+GID\\s+RGID\\s+\(\(\\s*\[A-Za-z0-9_+-\]+\\s+\){4}\(\\d+\\s+\){4}\\s*\)+$"