Commit 844b5ef
committed
libsubprocess: support user friendly error string
Problem: When a subprocess fails the "failed_errno" value is
set and can be returned in flux_subprocess_fail_errno(). It would
be convenient if there was an error message to describe the
error in more detail.
Solution: Internally support a new "failed_error" field which can store
a text message describing the error in more detail. Generally speaking,
always fill this with a text message when "failed_errno" is also set.
Set user friendly error string in many cases throughout libsubprocess.
Support a new flux_subprocess_fail_error() to retrieve this error message.
Add corner case unit tests.
Fixes #52331 parent ac7774d commit 844b5ef
File tree
6 files changed
+58
-4
lines changed- src/common/libsubprocess
- test
6 files changed
+58
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
40 | 51 | | |
41 | 52 | | |
42 | 53 | | |
| |||
169 | 180 | | |
170 | 181 | | |
171 | 182 | | |
| 183 | + | |
172 | 184 | | |
173 | 185 | | |
174 | 186 | | |
| |||
192 | 204 | | |
193 | 205 | | |
194 | 206 | | |
| 207 | + | |
195 | 208 | | |
196 | 209 | | |
197 | 210 | | |
| |||
215 | 228 | | |
216 | 229 | | |
217 | 230 | | |
| 231 | + | |
218 | 232 | | |
219 | 233 | | |
220 | 234 | | |
| |||
254 | 268 | | |
255 | 269 | | |
256 | 270 | | |
257 | | - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
258 | 274 | | |
259 | 275 | | |
260 | 276 | | |
| |||
520 | 536 | | |
521 | 537 | | |
522 | 538 | | |
| 539 | + | |
523 | 540 | | |
524 | 541 | | |
525 | 542 | | |
| |||
539 | 556 | | |
540 | 557 | | |
541 | 558 | | |
| 559 | + | |
542 | 560 | | |
543 | 561 | | |
544 | 562 | | |
| |||
572 | 590 | | |
573 | 591 | | |
574 | 592 | | |
| 593 | + | |
575 | 594 | | |
576 | 595 | | |
577 | 596 | | |
| |||
592 | 611 | | |
593 | 612 | | |
594 | 613 | | |
595 | | - | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
596 | 617 | | |
597 | 618 | | |
598 | 619 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
| 140 | + | |
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
| |||
177 | 179 | | |
178 | 180 | | |
179 | 181 | | |
180 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
181 | 189 | | |
182 | 190 | | |
183 | 191 | | |
| |||
333 | 341 | | |
334 | 342 | | |
335 | 343 | | |
336 | | - | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
337 | 347 | | |
| 348 | + | |
338 | 349 | | |
339 | 350 | | |
340 | 351 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1121 | 1121 | | |
1122 | 1122 | | |
1123 | 1123 | | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
1124 | 1135 | | |
1125 | 1136 | | |
1126 | 1137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
460 | 466 | | |
461 | 467 | | |
462 | 468 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
| 177 | + | |
176 | 178 | | |
177 | 179 | | |
178 | 180 | | |
| |||
258 | 260 | | |
259 | 261 | | |
260 | 262 | | |
| 263 | + | |
| 264 | + | |
261 | 265 | | |
262 | 266 | | |
263 | 267 | | |
| |||
0 commit comments