Browse Source

tests: tolerate zero process group ID and session ID in strace-DDD.test

Paul Chaignon reported [1] that in some of Travis CI build environments
process group ID and session ID may be equal to zero.

Change the affected strace-DDD.test to tolerate these odd values as long
as they don't interfere with the purpose of the test.

[1] https://travis-ci.community/t/unexpected-zero-values-in-proc-pid-stat/5774

* tests/strace-DDD.test: Tolerate zero process group ID and session ID.

Reported-by: Paul Chaignon <paul.chaignon@gmail.com>
Dmitry V. Levin 1 month ago
parent
commit
74012e23f1
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      tests/strace-DDD.test

+ 2
- 2
tests/strace-DDD.test View File

@@ -23,8 +23,8 @@ set -- -enone -esignal=none ../tracer_ppid_pgid_sid
23 23
 run_strace "$@" > "$OUT"
24 24
 read -r ppid pgid sid < "$OUT" &&
25 25
 [ "$ppid" -gt 1 ] &&
26
-[ "$pgid" -gt 0 ] &&
27
-[ "$sid" -gt 0 ] || {
26
+[ "$pgid" -ge 0 ] &&
27
+[ "$sid" -ge 0 ] || {
28 28
 	cat < "$OUT" > "$LOG"
29 29
 	dump_log_and_fail_with "$STRACE $args: unexpected output"
30 30
 }

Loading…
Cancel
Save