Pat Hickey
c98d6f6201
fix warning
2021-01-26 12:18:39 -08:00
Pat Hickey
f4a6b95965
notes
2021-01-26 11:45:26 -08:00
Pat Hickey
17f43d4cc3
path_link test: we no longer support symlink following
...
just assert that setting the symlink following lookupflag gives an
ERRNO_INVAL.
2021-01-25 17:15:32 -08:00
Pat Hickey
fded424e68
Dir::hard_link: dont support symlink following
...
if we're asked to follow symlinks, give ERRNO_INVAL instead.
2021-01-25 17:08:02 -08:00
Pat Hickey
a993090e30
fix warning
2021-01-25 17:07:39 -08:00
Pat Hickey
42ccb11f15
cap-std is going to use winerror::ERROR_STOPPED_ON_SYMLINK
...
to communicate eloop on windows
2021-01-25 17:02:11 -08:00
Pat Hickey
8f4fecacdc
interesting paths: loosen up errno requirements
2021-01-25 15:28:01 -08:00
Pat Hickey
b0b263f68e
find a symlink error
2021-01-25 15:20:46 -08:00
Pat Hickey
996d49c81f
nofollow test: permit ACCES as well as LOOP when opening with nofollow
2021-01-25 15:20:35 -08:00
Pat Hickey
144ca2f535
add a test of symlink happy path to isolate the windows failure
2021-01-25 15:14:26 -08:00
Pat Hickey
a8426125d2
kick the can
2021-01-25 14:56:58 -08:00
Pat Hickey
72b207de2e
path_link: some improvements required by windows
...
* need to close the handle to the subdirectory before its legal to
delete it
* windows doesnt give us a way to distinguish between an ERRNO_PERM and
an ERRNO_ACCES, so lets accept either one
2021-01-25 14:35:02 -08:00
Pat Hickey
2c6bde5ee4
elaborate!
2021-01-25 12:54:13 -08:00
Pat Hickey
7fd3d58b23
enumerate windows test failures, move the file
2021-01-25 12:20:10 -08:00
Pat Hickey
17a82c5b88
table: fix up errnos. trap on internal failures.
2021-01-25 12:16:07 -08:00
Pat Hickey
957c434b67
ErrorExt: trap convenience method
2021-01-25 12:16:01 -08:00
Pat Hickey
634e911a4b
tests: directory seeking is actually prohibited! but the test was wrong
...
* path_open of a directory without OFLAGS_DIRECTORY worked on linux,
but fortunately not on windows!
* the errno is BADF instead of NOTCAPABLE for fd_seek on a directory
* no way for a directory to have the FD_SEEK right.
2021-01-25 12:13:02 -08:00
Pat Hickey
2b70ea8b91
windows scheduler passes tests
...
unfortunately this does essentially nothing to convince me of its
correctness
2021-01-22 18:26:45 -08:00
Pat Hickey
19254bfd72
error mapping for windows!
2021-01-22 15:44:32 -08:00
Pat Hickey
423973a8ea
push the error types conversion all the way through
2021-01-22 15:29:09 -08:00
Pat Hickey
1d8070b734
wasi-c2: completely redo how errors work
2021-01-22 15:03:16 -08:00
Pat Hickey
a06c4fbe1a
make a pipe filetype, reorder filetype enum
2021-01-22 11:37:39 -08:00
Pat Hickey
86d369c72a
inline poll from yanix
2021-01-21 18:17:49 -08:00
Pat Hickey
9e0d295f8c
use unsafe to mark reopen_with_fdflags as having special safety features
2021-01-21 18:08:15 -08:00
Pat Hickey
69b7352332
various stdio fixes
2021-01-21 17:57:12 -08:00
Pat Hickey
f1a5dce716
change set_fdflags to reopen_with_fdflags
2021-01-21 17:56:03 -08:00
Pat Hickey
a46c2ad0aa
split poll tests up, only one requires "real" stdio
2021-01-21 16:54:40 -08:00
Pat Hickey
12056885eb
fix preopen dir to work on windows
2021-01-21 16:08:49 -08:00
Pat Hickey
16b42a5707
fix
2021-01-21 14:14:05 -08:00
Pat Hickey
85c3b73b4e
stdio compiles on windows!
2021-01-21 13:51:18 -08:00
Pat Hickey
fcd00f5de1
move more deps to cap-std-sync, define own SystemTimeSpec
2021-01-21 12:35:55 -08:00
Pat Hickey
61885b7071
stub in windows scheduler, get to some interesting errors
2021-01-20 21:03:33 -08:00
Pat Hickey
7ec03631da
inline only what we need of cap-std/system-interface traits
2021-01-20 20:53:44 -08:00
Pat Hickey
f3e40e2fc4
restructure cap-std impls into their own crate
2021-01-20 19:09:15 -08:00
Pat Hickey
016ed8966a
poll now handles monotonic clocks, not system clocks
...
I initially had it backwards. It is not sensible to poll on a system
clock timeout because the system clock is not necessarily monotonic!
only a monotonic clock makes sense for a timeout.
2021-01-19 15:11:54 -08:00
Pat Hickey
21713d3468
Revert "TEMPORARY: poll_oneoff test uses CLOCKID_REALTIME instead of MONOTONIC"
...
This reverts commit f667263d9c .
2021-01-19 14:57:10 -08:00
Pat Hickey
657024bd0d
latest system-interface provides ReadReady::num_ready_bytes
2021-01-19 14:39:20 -08:00
Pat Hickey
7f7a0be938
wasi-c2: implement a synchronous poll_oneoff in terms of yanix
...
doesnt work on unix yet! also breaks all the rules about using the
cap-std family instead of rawfds! but this is cool and im happy with it
2021-01-14 17:43:53 -08:00
Pat Hickey
b84c4d7488
poll_oneoff test: if you subscribe to a badf, the whole call fails with badf
...
rather than the results telling you an individual file was a badf.
why? i think the old behavior was too clever, and makes it harder to
write a scheduler.
* what should the call do when you pass it some badf and some not-badf?
i don't think anything besides exiting early is the correct answer.
* the results vector tells you something that the scheduler had to say
about the file, not about your inputs. the errno of the function
always says what the validity of the inputs was
2021-01-14 17:41:27 -08:00
Pat Hickey
f667263d9c
TEMPORARY: poll_oneoff test uses CLOCKID_REALTIME instead of MONOTONIC
...
the scheduler does not support the monotonic clock yet, i will fix this
soon
2021-01-14 17:40:56 -08:00
Pat Hickey
7d7acc4614
poll_oneoff test: outline assertions
...
this makes the panic message have the line number, which
is handy
2021-01-14 17:40:04 -08:00
Pat Hickey
9a1ce1a272
TEMPORARY: inherit stdio for the wasi ctx
...
this is unfortunate but the poll_oneoff test insists on polling on stdio
handles. to undo this temporary fix later, lets rewrite the test to open
some regular files from the scratch directory and poll on them instead.
2021-01-14 17:38:43 -08:00
Pat Hickey
4b39a14163
fix tests in pipe
2021-01-14 14:14:41 -08:00
Pat Hickey
5c8efe868e
need Any on WasiFile to upcast for AsRawFd
2021-01-14 13:39:01 -08:00
Pat Hickey
ea94d6f79d
this is indeed a nice way to do refs!
2021-01-13 15:11:11 -08:00
Pat Hickey
7beb52a2bc
i guess this is a way to do refs
2021-01-13 14:23:59 -08:00
Pat Hickey
8298ce9e4d
clock sub, start with the read sub
2021-01-13 11:57:42 -08:00
Pat Hickey
e0e205f8d2
ctx builder: fix warnings, test harness
2021-01-13 11:07:06 -08:00
Léo Gaspard
932378eb7b
reexport all the things required to implement WasiDir
2021-01-13 05:18:36 +01:00
Léo Gaspard
20bb4b211e
Also reexport Error from wasmtime_wasi
2021-01-13 05:10:28 +01:00