Commit dda49cc
authored
Name the end of the pipeline that actually broke (#176)
Windows failed twice this month at the same line, and both logs said the
same thing:
bin/makepkg.conf: Write error: Broken pipe
That is bsdtar, naming whatever file it happened to be reading when its
output closed. The file was fine. What broke was the other end -- most
likely xz, killed for memory during a silent three-minute -9 over the
core payload -- and a process the kernel kills leaves no message at all,
so nothing in the log was about it.
Under pipefail the failing status does surface; the text does not,
because it belongs to whichever element noticed first, and that is never
the one that died. So both compression pipelines now capture PIPESTATUS
and report every element that failed, by name, and a status above 128 as
the signal it is. The status the caller sees is unchanged: report_pipeline
returns the last failing one, which is what pipefail would have given it.
Simulated by putting an xz on PATH that dies mid-write, against
tests/package/test-core-package.sh:
before : Write error (and a job-control dump)
after packaging vdpm-…pkg.tar.xz: bsdtar exited 1
packaging vdpm-…pkg.tar.xz: xz killed by signal 9
both exiting 137.
tests/ci/test-pipeline-report.sh drives the function the script defines,
not a copy: silence when nothing failed, the killed compressor with its
signal, the upstream SIGPIPE reported too, an ordinary exit as an exit,
an element past the names given, and the status preserved.1 parent 8df1099 commit dda49cc
2 files changed
Lines changed: 140 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
109 | 143 | | |
110 | 144 | | |
111 | 145 | | |
| |||
171 | 205 | | |
172 | 206 | | |
173 | 207 | | |
| 208 | + | |
174 | 209 | | |
175 | 210 | | |
176 | 211 | | |
177 | 212 | | |
178 | 213 | | |
179 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
180 | 219 | | |
181 | 220 | | |
182 | 221 | | |
183 | 222 | | |
184 | 223 | | |
| 224 | + | |
185 | 225 | | |
186 | 226 | | |
187 | 227 | | |
188 | 228 | | |
189 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
190 | 234 | | |
191 | 235 | | |
192 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
0 commit comments