zig/lib/std
mlugg 1a99c99ee9 std.Build: gracefully handle child stdin closing when running tests
We have deduced that it seems the sporadic BrokenPipe failures happening
on the CI runners (e.g.
https://github.com/ziglang/zig/actions/runs/12035916948/job/33555963190)
are likely caused by the test runner's stdin pipe abnormally closing,
likely due to the process crashing. Here, we introduce error handling
for this case, so that if these writes fail, the step is marked as
failed correctly, and we still collect the child's stderr to report.
This won't fix the CI issues, but it should promote them to proper error
messages including child stderr, which -- at least in theory -- should
allow us to ultimately track down where the errors come from.

Note that this change is desirable regardless of bugs in the test runner
or similar, since the child process could terminate abnormally for any
number of reasons (e.g. a crashing test), and such cases should be
correctly reported by the build runner.
2024-11-27 19:35:31 +00:00
..
Build std.Build: gracefully handle child stdin closing when running tests 2024-11-27 19:35:31 +00:00
c std.c.darwin: make os_log_t a pointer to opaque 2024-11-19 09:32:42 +00:00
compress Rewrite bit_reader and bit_writer to take advantage of current zig semantics and enhance readability (#21689) 2024-10-13 18:44:42 -07:00
crypto std.crypto.bcrypt: implement the actual OpenSSH KDF (#22027) 2024-11-22 10:02:14 +01:00
debug std.debug: Gracefully handle process_vm_readv() EPERM in MemoryAccessor.read(). 2024-11-20 23:07:46 +01:00
dwarf Dwarf: fix and test allowzero pointers 2024-08-17 05:57:45 -04:00
fmt std: update std.builtin.Type fields to follow naming conventions 2024-08-28 08:39:59 +01:00
fs std.fs.File: Fix metadata error check on Linux 2024-10-31 14:02:42 +01:00
hash Replace deprecated default initializations with decl literals 2024-09-12 16:01:23 +01:00
heap Fix index calculation in WasmPageAllocator 2024-10-12 22:53:02 +02:00
http std.http.Client: change ssl key log creation permission bits 2024-11-07 20:56:33 -05:00
io Rewrite bit_reader and bit_writer to take advantage of current zig semantics and enhance readability (#21689) 2024-10-13 18:44:42 -07:00
json Replace deprecated default initializations with decl literals 2024-09-12 16:01:23 +01:00
math std.math: Disable isSignalNan test on mips32. 2024-11-26 18:29:13 +01:00
mem Allocator.free: document zero-length behavior 2024-11-24 18:19:11 -05:00
meta std: update std.builtin.Type fields to follow naming conventions 2024-08-28 08:39:59 +01:00
net
os linux/bpf: add alignment for helper functions to make compiler happy 2024-11-18 16:19:44 +01:00
posix std.posix: Skip Stat struct comparison in fstatat test for s390x-linux. 2024-10-04 00:26:55 +02:00
process std.process.Child: explicit error set for wait 2024-11-25 14:18:55 -08:00
Random add std.testing.random_seed 2024-07-23 11:43:12 -07:00
sort compiler,lib,test,langref: migrate @setCold to @branchHint 2024-08-27 00:44:35 +01:00
tar Remove old deprecated symbols in std (#21584) 2024-10-04 13:50:25 -07:00
Target refactor update_cpu_features.zig 2024-11-25 01:11:15 -08:00
testing
Thread Revert "Enable thread_pool function to throw errors (#20260)" 2024-11-11 14:07:07 -08:00
time std.time.epoch: Fix comments referring to epoch as 1970-10-01 2024-08-15 17:54:27 -07:00
tz
unicode
valgrind std.valgrind: Fix some compile errors. 2024-11-04 10:56:32 +01:00
zig dwarf: fix stepping through an inline loop containing one statement 2024-11-24 17:28:12 -05:00
zip std: Convert deprecated aliases to compile errors and fix usages 2024-06-13 10:18:59 -04:00
array_hash_map.zig Replace deprecated default initializations with decl literals 2024-09-12 16:01:23 +01:00
array_list.zig compiler: remove anonymous struct types, unify all tuples 2024-10-31 20:42:53 +00:00
ascii.zig std.ascii: make toLower toUpper branchless (#21369) 2024-09-13 17:22:19 -07:00
atomic.zig std.atomic: add a function to get the cache line size for a particular cpu (#21956) 2024-11-13 05:35:05 +01:00
base64.zig stdlib : base64 encode to writer (#20961) 2024-09-04 08:10:12 +00:00
bit_set.zig std.DynamicBitSet: remove wrong and useless comments (#21418) 2024-09-19 17:06:23 -07:00
BitStack.zig std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
bounded_array.zig Revert "Smaller memory footprint for BoundedArray (#16299)" 2024-08-23 22:30:10 -07:00
buf_map.zig
buf_set.zig
Build.zig introduce a CLI flag to enable .so scripts; default off 2024-10-23 16:27:38 -07:00
builtin.zig add storage_buffer address space 2024-11-08 20:43:57 +01:00
c.zig Add missing pthread_key_t definition for Darwin 2024-11-16 17:18:07 +01:00
coff.zig std.{coff,elf}: Remove the {MachineType,EM}.toTargetCpuArch() functions. 2024-08-23 19:56:24 +02:00
compress.zig
crypto.zig std.crypto.aes: introduce AES block vectors (#22023) 2024-11-22 10:00:49 +01:00
debug.zig add assertLocked to std.debug.SafetyLock 2024-11-22 18:39:17 -05:00
dwarf.zig Dwarf: cleanup emitted debug info 2024-08-22 08:44:08 +02:00
dynamic_library.zig std.dynamic_library: update to new elf API 2024-10-12 10:44:17 -07:00
elf.zig link.Elf: eliminate an O(N^2) algorithm in flush() 2024-10-12 10:44:17 -07:00
enums.zig std: avoid field/decl name conflicts 2024-08-29 20:39:11 +01:00
fifo.zig std: promote tests to doctests 2024-03-21 14:11:46 -07:00
fmt.zig Remove unused buf field from std.fmt.Parser (#21994) 2024-11-24 15:09:36 -08:00
fs.zig fix compilation errors for fs and fs.Dir (#21643) 2024-10-17 01:08:58 +02:00
gpu.zig std.gpu: add instanceIndex 2024-11-01 02:04:27 +03:30
hash.zig std.hash.int: avoid words like "easy" and "fast" in doc comments 2024-11-24 15:30:52 -08:00
hash_map.zig add assertLocked to std.debug.SafetyLock 2024-11-22 18:39:17 -05:00
heap.zig Remove old deprecated symbols in std (#21584) 2024-10-04 13:50:25 -07:00
http.zig add std.http.WebSocket 2024-08-07 00:48:32 -07:00
io.zig std.io.Poller: handle EPIPE as EOF 2024-11-25 14:18:55 -08:00
json.zig Delete compile errors for deprecated decls 2024-05-03 13:27:30 -07:00
leb128.zig std: update std.builtin.Type fields to follow naming conventions 2024-08-28 08:39:59 +01:00
linked_list.zig
log.zig std: update std.builtin.Type fields to follow naming conventions 2024-08-28 08:39:59 +01:00
macho.zig remove hard tabs from source code 2024-07-31 16:57:42 -07:00
math.zig std.math: rename make_f80 to F80.toFloat and break_f80 to F80.fromFloat 2024-09-02 00:10:22 +03:00
mem.zig std.mem.asBytes: fix footgun when passing non-single pointer 2024-10-31 20:42:53 +00:00
meta.zig std.meta.eql: use == directly when comparing packed structs (#21982) 2024-11-24 14:29:44 -08:00
multi_array_list.zig std.MultiArrayList: add clear methods 2024-10-14 03:33:23 -07:00
net.zig std.c reorganization 2024-07-19 00:30:32 -07:00
once.zig compiler,lib,test,langref: migrate @setCold to @branchHint 2024-08-27 00:44:35 +01:00
os.zig std.c reorganization 2024-07-19 00:30:32 -07:00
pdb.zig std.pdb: obey naming conventions 2024-08-29 23:43:52 +01:00
posix.zig treat errno(6) (NXIO) as expected error in openatZ 2024-11-24 18:17:56 -05:00
priority_dequeue.zig add std.testing.random_seed 2024-07-23 11:43:12 -07:00
priority_queue.zig std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
process.zig move std.zig.fatal to std.process.fatal 2024-07-20 01:06:28 -07:00
Progress.zig std.Progress: fix data race 2024-10-23 13:47:44 -07:00
Random.zig std: fix Random.enumValueWithIndex of single-variant enum 2024-11-06 09:15:56 +00:00
RingBuffer.zig
segmented_list.zig std: update std.builtin.Type fields to follow naming conventions 2024-08-28 08:39:59 +01:00
SemanticVersion.zig compiler: remove anonymous struct types, unify all tuples 2024-10-31 20:42:53 +00:00
simd.zig std.simd: Disable vector prefix scan test on aarch64_be. 2024-11-04 08:29:42 +01:00
sort.zig std.equalRange: Compute lower and upper bounds simultaneously 2024-09-23 13:03:06 -07:00
start.zig Merge pull request #21843 from alexrp/callconv-followup 2024-11-03 14:27:09 +01:00
static_string_map.zig std.static_string_map: Cast length of input for runtime initialization 2024-06-20 23:22:39 +00:00
std.zig std.crypto.tls: improve debuggability of encrypted connections 2024-11-07 20:25:26 -05:00
tar.zig Remove old deprecated symbols in std (#21584) 2024-10-04 13:50:25 -07:00
Target.zig CI: update macOS runner to 13 2024-11-25 15:00:10 -08:00
testing.zig std.testing.expectError: fix error names 2024-11-12 14:35:14 +02:00
Thread.zig std.os.windows: Fix some incorrect callconv specifiers. 2024-11-02 10:44:18 +01:00
time.zig move std.time.sleep to std.Thread.sleep 2024-09-26 12:35:14 -07:00
treap.zig Condense and extend std.Treap's traversal functionalities. (#20002) 2024-07-28 19:47:55 -07:00
tz.zig
unicode.zig std: update eval branch quotas after bdbc485 2024-08-21 01:30:46 +01:00
Uri.zig std.http.Client: always omit port when it matches default 2024-04-12 22:37:07 -07:00
valgrind.zig std.valgrind: Port doClientRequest() to all archs supported by Valgrind. 2024-11-04 12:39:48 +01:00
wasm.zig
zig.zig Provide a detailed message for invalid arch in target triple (#21921) 2024-11-06 03:38:01 +00:00
zip.zig std.zip: Fix typo in doc comments 2024-06-17 16:12:19 -04:00