aboutsummaryrefslogtreecommitdiff
path: root/lib/std/net/test.zig
AgeCommit message (Collapse)Author
2025-10-29WIP land the std.Io interfaceAndrew Kelley
fix std lib compilation errors caused by introducing std.Io
2025-10-29Io.net: partial implementation of dns lookupAndrew Kelley
2025-09-15std.net.Ip6Address: format numerical scope iddatabase64128
2025-07-14std.net: update to new I/O APIAndrew Kelley
2025-07-11Remove numerous things deprecated during the 0.14 release cycleLinus Groh
Basically everything that has a direct replacement or no uses left. Notable omissions: - std.ArrayHashMap: Too much fallout, needs a separate cleanup. - std.debug.runtime_safety: Too much fallout. - std.heap.GeneralPurposeAllocator: Lots of references to it remain, not a simple find and replace as "debug allocator" is not equivalent to "general purpose allocator". - std.io.Reader: Is being reworked at the moment. - std.unicode.utf8Decode(): No replacement, needs a new API first. - Manifest backwards compat options: Removal would break test data used by TestFetchBuilder. - panic handler needs to be a namespace: Many tests still rely on it being a function, needs a separate cleanup.
2025-07-07std: formatted printing no longer prints type namesAndrew Kelley
for structs, enums, and unions. auto untagged unions are no longer printed as pointers; instead they are printed as "{ ... }". extern and packed untagged unions have each field printed, similar to what gdb does. also fix bugs in delimiter based reading
2025-07-07std.fmt: breaking API changesAndrew Kelley
added adapter to AnyWriter and GenericWriter to help bridge the gap between old and new API make std.testing.expectFmt work at compile-time std.fmt no longer has a dependency on std.unicode. Formatted printing was never properly unicode-aware. Now it no longer pretends to be. Breakage/deprecations: * std.fs.File.reader -> std.fs.File.deprecatedReader * std.fs.File.writer -> std.fs.File.deprecatedWriter * std.io.GenericReader -> std.io.Reader * std.io.GenericWriter -> std.io.Writer * std.io.AnyReader -> std.io.Reader * std.io.AnyWriter -> std.io.Writer * std.fmt.format -> std.fmt.deprecatedFormat * std.fmt.fmtSliceEscapeLower -> std.ascii.hexEscape * std.fmt.fmtSliceEscapeUpper -> std.ascii.hexEscape * std.fmt.fmtSliceHexLower -> {x} * std.fmt.fmtSliceHexUpper -> {X} * std.fmt.fmtIntSizeDec -> {B} * std.fmt.fmtIntSizeBin -> {Bi} * std.fmt.fmtDuration -> {D} * std.fmt.fmtDurationSigned -> {D} * {} -> {f} when there is a format method * format method signature - anytype -> *std.io.Writer - inferred error set -> error{WriteFailed} - options -> (deleted) * std.fmt.Formatted - now takes context type explicitly - no fmt string
2025-04-04std.net: Implement if_nametoindex for windows (#22555)Zenomat
2025-02-22zig fmtAndrew Kelley
2025-02-22std.net: Fix IPv6 address format compression for long zero runs (#22441)Anders Bondehagen
2025-01-26std.net.listen: no REUSEPORT with unix socketPierre Tachoire
On Linux, set REUSEPORT option on an unix socket returns a EOPNOTSUPP error. See https://github.com/torvalds/linux/commit/5b0af621c3f6ef9261cf6067812f2fd9943acb4b
2024-02-23std.net, std.http: simplifyAndrew Kelley
2024-02-01remove std.io.ModeVeikka Tuominen
2023-12-19std: disable flaky tcp server testAndrew Kelley
Tracking issue: #18315
2023-12-16std.net: add explicit error sets for IP parsingArtem Kolichenkov
Inferred errors in switch statements prevented IP address parsing at comptime. Adding explicit error sets fixes it. Closes #18276
2023-12-15std.net.test: cleanup socket streamJan Philipp Hafer
2023-11-21std.net: enable forcing non-blocking mode for acceptJan Philipp Hafer
Justification: It is common for non-CPU bound short routines to do non-blocking accept to eliminate unnecessary delays before subscribing to data, for example in hardware integration tests.
2023-11-19lib: correct unnecessary uses of 'var'mlugg
2023-11-03x86_64: fix std test failuresJacob Young
2023-10-26x86_64: fix behavior of `getValue`Jacob Young
Old behavior renamed to `getValueIfFree`.
2023-10-25x86_64: pass more testsJacob Young
* 128-bit integer multiplication with overflow * more instruction encodings used by std inline asm * implement the `try_ptr` air instruction * follow correct stack frame abi * enable full panic handler * enable stack traces
2023-10-23x86_64: implement 128-bit builtinsJacob Young
* `@clz` * `@ctz` * `@popCount` * `@byteSwap` * `@bitReverse` * various encodings used by std
2023-10-23x86_64: implement enough to pass unicode testsJacob Young
* implement vector comparison * implement reduce for bool vectors * fix `@memcpy` bug * enable passing std tests
2023-10-22Revert "Revert "Merge pull request #17637 from jacobly0/x86_64-test-std""Jacob Young
This reverts commit 6f0198cadbe29294f2bf3153a27beebd64377566.
2023-10-22Revert "Merge pull request #17637 from jacobly0/x86_64-test-std"Andrew Kelley
This reverts commit 0c99ba1eab63865592bb084feb271cd4e4b0357e, reversing changes made to 5f92b070bf284f1493b1b5d433dd3adde2f46727. This caused a CI failure when it landed in master branch due to a 128-bit `@byteSwap` in std.mem.
2023-10-21x86_64: disable failing tests, enable test-std testingJacob Young
2023-10-21x86_64: fix bugs and disable erroring testsJacob Young
2023-09-06std.net: Fix IPv6 address parsing for single digitLuis Cáceres
This fixes the case where IPv6 address parsing incorrectly succeeded on input such as `1`, which now returns error.Incomplete.
2023-05-08Disallow named test decls with duplicate namesDominic
2023-05-02Add a random generated prefix to the unix socket_path to guard against ↵DraagrenKirneh
multiple tests/threads running the same test at the same time
2023-04-24std.net.StreamServer.Options: add reuse_portJon
2023-04-12Zir: implement explicit block_comptime instructionmlugg
Resolves: #7056
2023-02-18update std lib and compiler sources to new for loop syntaxAndrew Kelley
2022-07-13AstGen: fix loop control flow applying to wrong loopAndrew Kelley
In the case of 'continue' or 'break' inside the 'else' block of a 'while' or 'for' loop. Closes #12109
2022-06-30LLVM: fix lowering of untagged union typesAndrew Kelley
The LLVM backend was calculating the amount of padding solely based on the payload size. However, in the case where there is no union tag, this fails to take into account alignment. Closes #11857
2022-06-07std: adjust for stage2 semanticsVeikka Tuominen
2022-01-14Check for isDarwin() instead of linked libcJohn Schmidt
2022-01-12Use libc if_nametoindex if available when parsing IPsJohn Schmidt
Fixes https://github.com/ziglang/zig/issues/10521 and makes a couple of additional tests pass when linking libc.
2021-11-30allocgate: std Allocator interface refactorLee Cannon
2021-10-04migrate from `std.Target.current` to `@import("builtin").target`Andrew Kelley
closes #9388 closes #9321
2021-09-16net.Address: Fix writing 0-bytes when formatting Unix addressesKirjastonhoitaja
The entire 'path' array would get written to the formatting function, when it should instead be treated as a regular zero-terminated string. Note that this doesn't handle abstract paths on Linux, those paths *start* with a \0 byte and are hence treated as empty strings instead. But fixing that would require more adjustments than just formatting, in particular to getOsSockLen().
2021-08-24remove redundant license headers from zig standard libraryAndrew Kelley
We already have a LICENSE file that covers the Zig Standard Library. We no longer need to remind everyone that the license is MIT in every single file. Previously this was introduced to clarify the situation for a fork of Zig that made Zig's LICENSE file harder to find, and replaced it with their own license that required annual payments to their company. However that fork now appears to be dead. So there is no need to reinforce the copyright notice in every single file.
2021-08-09Ip4Address parser: reject 0-prefixed components (#9538)Frank Denis
Some parsers interpret these as octal, some don't, and the confusion can lead to vulnerabilities. Return error.NonCanonical when parsing IPv4 addresses with 0 prefixes.
2021-06-30changes to accomodate std.Thread updatekprotty
2021-05-08std: update usage of std.testingVeikka Tuominen
2021-02-28std: Swap arguments in Thread.spawnLemonBoy
Beside the new order being consistent with the ThreadPool API and making more sense, this shuffling allows to write the context argument type in terms of the startFn arguments, reducing the use of anytype (eg. less explicit casts when using comptime_int parameters, yay). Sorry for the breakage. Closes #8082
2021-01-11Apparently unix sockets are supported on WindowsLemonBoy
Starting from Windows 10 build 17063.
2021-01-11Let the kernel pick a random portLemonBoy
Avoid errors if the socket enters the TIME_WAIT state and we need to re-execute this test before the OS releases it. This problem was not really a problem before since the accept()-ed socket was never closed on the server-side.
2021-01-11std: Add a small test for i/o on unix socketsLemonBoy
2021-01-11std: Decouple network streams from fs.FileLemonBoy
The overlap between files and sockets is minimal and lumping them together means supporting only a small subset of the functionalities provided by the OS. Moreover the socket and file handles are not always interchangeable: on Windows one should use Winsock's close() call rather than the one used for common files.