Commit Graph

88 Commits

Author SHA1 Message Date
Takeshi Yoneda
56d19deb16 wasi: uses io.Seek{Start,Current} in reopen (#1868)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2023-12-13 08:33:23 -08:00
Yage Hu
f46d5b943d wasi: resets offsets in reopen (#1866)
Signed-off-by: Yage Hu <me@huyage.dev>
2023-12-12 15:29:20 -08:00
Yage Hu
99ededcefd Fix fd_fdstat_set_flags truncating with O_TRUNC (#1863) 2023-12-12 06:49:56 -08:00
Edoardo Vacchi
76dce033d3 Upgrade floor Go version to 1.19 everywhere. (#1622) 2023-08-10 06:09:16 +09:00
Nuno Cruces
fa11db75a6 Use unix build constraint.
Now that we floor on Go 1.19, take advantage of the unix build constraint:
https://tip.golang.org/doc/go1.19#go-unix

Signed-off-by: Nuno Cruces <ncruces@users.noreply.github.com>
2023-08-09 11:46:04 +01:00
Crypt Keeper
009ee7056c Re-introduces internal fsapi.File with non-blocking methods (#1613)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-08-07 15:50:38 +08:00
Edoardo Vacchi
edb7bc2b10 wasi: add more test cases to poll_oneoff, cleanup impl (#1612)
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
2023-08-05 15:22:15 +02:00
Crypt Keeper
2f2b6a9d2c sysfs: Makes ReadFS and AdaptFS embeddable (#1607)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-08-02 08:27:50 +08:00
Crypt Keeper
1f8c908f1c Exposes writeable filesystem as experimentalsys.FS (#1605)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-07-31 07:56:28 +08:00
Edoardo Vacchi
d88286ba63 sysfs: restore check for EINTR in poll test, fix Windows tests (#1604)
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
2023-07-31 06:47:47 +08:00
Crypt Keeper
66070781b1 Supports compilation with GOOS=plan9 (#1603)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-07-31 06:47:23 +08:00
Crypt Keeper
2382bbf730 sysfs: decouples FS and File from the syscall package (#1602)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-07-30 16:06:22 +08:00
Crypt Keeper
8d3874d3c8 fsapi: migrates PollRead to Poll with Pflag (#1599)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
Co-authored-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
2023-07-30 10:56:17 +08:00
Edoardo Vacchi
023a38349a sysfs: implements PollRead with poll instead of select (#1596)
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
2023-07-28 10:49:17 +02:00
Crypt Keeper
180ff682d9 sysfs: changes PollRead to accept int32 timeoutMillis (#1597)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
Co-authored-by: Takeshi Yoneda <takeshi@tetrate.io>
2023-07-28 10:01:00 +08:00
Crypt Keeper
fb6147ca94 Emulates AT_SYMLINK_NOFOLLOW instead of sometimes implementing it (#1588)
Some checks failed
Release CLI / Pre-release build (push) Has been cancelled
Release CLI / Pre-release test (macos-12) (push) Has been cancelled
Release CLI / Pre-release test (ubuntu-22.04) (push) Has been cancelled
Release CLI / Pre-release test (windows-2022) (push) Has been cancelled
Release CLI / Release (push) Has been cancelled
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-07-22 08:03:47 +08:00
Crypt Keeper
b842d6cbfd fsapi: adds Oflag to decouple from syscall package (#1586)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-07-19 16:01:44 +08:00
Edoardo Vacchi
1e0c73d569 wasi: nonblocking I/O for sockets and pipes on Windows (#1579)
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
2023-07-19 07:30:06 +08:00
Edoardo Vacchi
1cdb72d431 fs: nonblocking writes should use syscall.Write (#1581)
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
2023-07-17 10:19:27 +02:00
Crypt Keeper
2f8dd23097 adds experimental sys.Errno to begin decoupling from the syscall package (#1582)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-07-17 08:13:29 +08:00
Crypt Keeper
1dafce0b2a sysfs: cleanup windows rename (#1584)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-07-16 07:57:05 +08:00
Crypt Keeper
15fa5c4de5 Changes build to test go 1.21rc2 (#1571)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-07-10 13:39:37 +08:00
Crypt Keeper
6efcf25505 Exposes sys.Stat_t as a portable alternative to syscall.Stat_t (#1567)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-07-10 11:46:20 +08:00
Edoardo Vacchi
d3f09bdcff wasi: nonblocking pipes on Windows (#1570)
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
2023-07-10 06:50:26 +08:00
Crypt Keeper
276257102f gojs: removes user/group behavior (#1566)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-07-07 10:27:41 +08:00
Crypt Keeper
6a9088b46b Centralizes docs on Ino, specifically zero (#1560)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-07-07 08:33:50 +08:00
Crypt Keeper
0ec3c852d6 fs: pares down to functions used in wasip1 and wasip2 (#1563)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-07-07 07:58:36 +08:00
Crypt Keeper
d7193952e1 Allows wrapped filesystems to return dirent.ino except in windows (#1558)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-07-05 17:41:35 +08:00
Crypt Keeper
511b032fa6 readdir: defer re-opening when Seek(0,SeekStart) on a directory (#1551)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-07-02 12:59:44 +08:00
Crypt Keeper
820685c4b2 Simplifies filesystem implementations (#1548)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-07-01 06:53:09 +08:00
Edoardo Vacchi
39f2ff23a6 wasi: improve stdin support for nonblocking, fix stdout (#1542)
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
2023-06-29 07:51:23 +08:00
Crypt Keeper
53ce5eea83 Allows wasip1 guests to use arbitrarily nested pre-opens (#1536)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-06-27 10:02:57 +08:00
Edoardo Vacchi
b01ba67fdc wasi: add nonblock_test.go from gotip, fix nonblock read on Unix-like (#1517)
Some checks failed
Release CLI / Pre-release build (push) Has been cancelled
Release CLI / Pre-release test (macos-12) (push) Has been cancelled
Release CLI / Pre-release test (ubuntu-22.04) (push) Has been cancelled
Release CLI / Pre-release test (windows-2022) (push) Has been cancelled
Release CLI / Release (push) Has been cancelled
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
2023-06-15 07:08:44 +08:00
Crypt Keeper
f3778cae08 wasi: fix nonblocking sockets on *NIX (gotip net/http) (#1503)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
Co-authored-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
2023-06-13 06:51:32 +10:00
Edoardo Vacchi
390437e1fe Revert "wip"
This reverts commit 1588723735.
2023-06-09 15:23:25 +02:00
Edoardo Vacchi
1588723735 wip
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
2023-06-09 15:21:32 +02:00
Edoardo Vacchi
97d0d70b73 wasi: add support for sockets (#1493)
Some checks failed
Release CLI / Pre-release build (push) Has been cancelled
Release CLI / Pre-release test (macos-12) (push) Has been cancelled
Release CLI / Pre-release test (ubuntu-22.04) (push) Has been cancelled
Release CLI / Pre-release test (windows-2022) (push) Has been cancelled
Release CLI / Release (push) Has been cancelled
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
Signed-off-by: Adrian Cole <adrian@tetrate.io>
Co-authored-by: Crypt Keeper <64215+codefromthecrypt@users.noreply.github.com>
Co-authored-by: Achille <achille.roussel@gmail.com>
Co-authored-by: Adrian Cole <adrian@tetrate.io>
2023-06-02 20:45:42 +08:00
Achille
1b35900911 linux: support using huge pages (#1475)
Signed-off-by: Achille Roussel <achille.roussel@gmail.com>
2023-05-17 11:14:31 -07:00
Crypt Keeper
34324031cb extracts FS interfaces into fsapi package and consolidates impls (#1477)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
Co-authored-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
2023-05-17 07:19:54 +03:00
Crypt Keeper
11b346ed75 Removes AccessMode from platform.File (#1472)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-05-16 11:32:50 +08:00
Crypt Keeper
2ad2921eed Separates fs.File from os.File implementations of platform.File (#1455)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-05-15 13:42:20 +08:00
Crypt Keeper
16baeaab47 Adds Readdir to platform.File and removes internal use of fs.FS (#1454)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-05-11 10:04:34 +08:00
Crypt Keeper
4dd4d54cda Removes platform.Readdirnames (#1451)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-05-10 14:44:54 +08:00
Crypt Keeper
29c7c7667b Adds IsDir and Seek to platform.File (#1441)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-05-09 07:47:25 +08:00
Crypt Keeper
3bf7e342c2 Adds Utimens to platform.File (#1440)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-05-08 11:14:28 +08:00
Crypt Keeper
76ef347b8c Adds Read and Pread to platform.File (#1439)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-05-08 07:54:06 +08:00
Crypt Keeper
b5198a46ff Adds AccessMode Write and Pwrite to platform.File (#1438)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-05-05 13:23:30 +08:00
Crypt Keeper
e5dc733df7 Adds Path to platform.File and refactors tests (#1431)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
Co-authored-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
2023-05-04 07:05:40 +08:00
Adrian Cole
cf5ebf6f6b Use require.ErrnoEquals for more precise failures
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-05-03 13:54:12 +08:00
Crypt Keeper
c5871c772c Adds Datasync to platform.File (#1427)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-05-02 14:12:47 +08:00