| 78 | |
| 79 | |
| 80 | def accounting_controls(stderr, owner_pid): |
| 81 | diagnostics = [] |
| 82 | for line in stderr.splitlines(): |
| 83 | if (line.startswith("LLVM Profile Error:") or line.startswith("coverage profile write failed:") |
| 84 | or line.startswith("coverage parent fixture failed:") |
| 85 | or line.startswith("coverage parent fixture usage error:") |
| 86 | or line.startswith("coverage child accounting unavailable:")): |
| 87 | raise common.Infrastructure("unrelated writer/fixture/activation failure: " + line) |
| 88 | if line.startswith("coverage child accounting failed:"): |
| 89 | expected = "coverage child accounting failed: owner_pid=%d reason=child-marker" % owner_pid |
| 90 | if line != expected: |
| 91 | raise common.Infrastructure("accounting diagnostic is not the original parent's pending marker event") |
| 92 | diagnostics.append(line) |
| 93 | if len(diagnostics) > 1: |
| 94 | raise common.Infrastructure("accounting error was not reported exactly once") |
| 95 | return diagnostics |
| 96 | |
| 97 | |
| 98 | def complete_rows(rows): |