Commit Graph

131 Commits

Author SHA1 Message Date
Jakub Konka
7e0e8daf46 Check out submodules in Azure 2019-08-23 20:36:11 -07:00
Marcin Mielniczuk
9f840ff6f1 Quick & dirty misc_testsuite 2019-08-23 20:36:11 -07:00
Marcin Mielniczuk
9950bddee5 Use safe casts in path_filestat_set_times on unix. 2019-08-23 13:02:21 +02:00
Sendil Kumar
69d60c4711 update nix version 2019-08-23 09:24:38 +02:00
Marcin Mielniczuk
1bf5106f40 Implement path_filestat_get & path_filestat_set_times on Windows. 2019-08-21 13:20:40 +02:00
Marcin Mielniczuk
2ed69b1d10 Add .concatenate() method to PathGet on Windows. 2019-08-21 13:20:40 +02:00
Marcin Mielniczuk
7a991921bf Add the test for path_filestat_* 2019-08-21 09:57:35 +02:00
Dan Gohman
d7883dd60a Don't publish misc_testsuite/*.wasm. 2019-08-21 00:04:00 -07:00
Dan Gohman
eb90f76b42 Add #![cfg(windows)] to allow publishing from non-Windows hosts. 2019-08-21 00:04:00 -07:00
Dan Gohman
19055d0178 Add description fields. 2019-08-21 00:04:00 -07:00
Jakub Konka
cf0bef84cc Fix filestat_from_nix conversion fn 2019-08-20 23:38:53 -07:00
Dan Gohman
f37b672c8d Update the pinned wasmtime revision.
This resynchronizes the versions of cranelift used in wasi-common
and wasmtime to 0.40.
2019-08-21 07:46:18 +02:00
Dan Gohman
6921782fbf Add license declarations to headers. 2019-08-20 16:17:36 -07:00
Dan Gohman
500bf83082 Update to latest cranelift and target-lexicon. 2019-08-20 16:17:36 -07:00
Marcin Mielniczuk
065fbea252 Implement path_filestat_set_times using nix instead of libc.
As advised in #16.
2019-08-20 17:28:25 +02:00
Jakub Konka
a38af109b3 Fix linter warnings 2019-08-14 12:59:00 +02:00
Dan Gohman
05852977ac Use char/byte literals instead of single-char/byte string literals. 2019-08-14 12:59:00 +02:00
Dan Gohman
2809be666a Minor simplifications to get_path_by_handle. 2019-08-14 12:59:00 +02:00
Dan Gohman
8b576779f2 Use fs::read instead of doing it manually. 2019-08-14 12:59:00 +02:00
Jakub Konka
b14570e887 Move checks into error handling of std::fs::rename (where possible) 2019-08-14 12:10:34 +02:00
Jakub Konka
1b7d9bed2b Implement path_rename on Windows 2019-08-14 12:10:34 +02:00
Jakub Konka
b980c2aa11 Disable path_rename testcase on Windows 2019-08-14 11:56:04 +02:00
Jakub Konka
b1e29869fd Add testcase for path_rename 2019-08-14 11:56:04 +02:00
Jakub Konka
5c7373959c Fix linter warnings 2019-08-13 21:34:35 +02:00
Marcin Mielniczuk
550cfb90e7 Bump filetime to 0.2.7 2019-08-13 21:34:35 +02:00
Marcin Mielniczuk
74d1c11fbe Fix fd_filestat_set_times and enable the fd_filestat_set test on Windows. 2019-08-13 21:34:35 +02:00
Marcin Mielniczuk
2f1afc4846 Implement fd_filestat_set_times using the filetime crate. 2019-08-13 21:34:35 +02:00
Jakub Konka
46c41abd60 Update tests for pread_pwrite and seek_tell 2019-08-12 11:23:28 +02:00
Jakub Konka
aac7fa766d Add testcase for unbuffered fd_write 2019-08-12 10:44:48 +02:00
Marcin Mielniczuk
b9834e3016 Disable the test on Windows, because it depends on fd_filestat_set_times, which is not implemented yet 2019-08-09 22:20:20 +02:00
Marcin Mielniczuk
a52eb205a4 Add a testcase for fd_filestat_set_*
This PR matches https://github.com/CraneStation/wasi-misc-tests/pull/14.
The file was created using `cargo build --release --target=wasm32-wasi`
2019-08-09 22:20:20 +02:00
Marcin Mielniczuk
4c9be5909a Add an overflow check
The check will be removed when rust-lang/rust#63326 is fixed
2019-08-08 18:41:41 +02:00
Marcin Mielniczuk
e731965fbb Implement fd_filestat_set_size using libstd 2019-08-08 18:41:41 +02:00
Marcin Mielniczuk
92c2b563fc Reuse errno_from_ioerror to simplify error handling 2019-08-08 18:22:58 +02:00
Jakub Konka
e18175c556 path_get refactor and implementation of missing path_ hostcalls on Windows (#41)
* Move path_get outside of sys module

* Add implementation of readlinkat

* Clean up path_open; use OpenOptions as much as possible

* Enable close_preopen test

* Implement path_create_directory; fix path_open

* Refactor path concatenation onto a descriptor

* Implement path_remove_directory

* Implement path_unlink_file

* Rewrite path_open using specific access mask

* Fix error mapping when unlinking file

* Fix readlinkat to pass nofollow_errors testcase

* Clean up winerror to WASI conversion

* Spoof creating dangling symlinks on windows (hacky!)

* Add positive testcase for readlink

* Implement path_readlink (for nonzero buffers for now)

* Clean up

* Add Symlink struct immitating *nix symlink

* Fix path_readlink

* Augment interesting_paths testcase with trailing slashes example

* Encapsulate path_get return value as PathGet struct

* Remove dangling symlink emulation

* Extract dangling symlinks into its own testcase

This way, we can re-enable nofollow_errors testcase
on Windows also.

* Return __WASI_ENOTCAPABLE if user lacks perms to symlink
2019-08-08 17:06:01 +02:00
Jakub Konka
8ea7a983d8 Make fd_write unbuffered; fixes CraneStation/wasmtime#255 2019-08-07 04:44:48 -07:00
Jakub Konka
6797db66a2 Add cargo doc and apply cargo fmt to stable only 2019-08-02 14:15:31 +02:00
Jakub Konka
3e68834938 Remove Travis conf and redundant scripts 2019-08-02 12:17:42 +02:00
Jakub Konka
7bd8d5be98 Update CI status in README 2019-08-02 11:54:16 +02:00
Till Schneidereit
fd787c2c99 Merge pull request #49 from kubkon/azure
Add azure pipelines definition
2019-08-02 11:12:15 +02:00
Jakub Konka
a2b99bb74c Add azure pipelines definition 2019-08-02 10:47:33 +02:00
Jakub Konka
3125dc4a79 Update readlink_no_buffer testcase 2019-08-02 10:43:15 +02:00
Marcin Mielniczuk
89fbde2c3f Implement fd_filestat_get for all platforms (#42)
* Implement fd_filestat_get for all platforms

* Remove an old comment

* Remove panics from the syscall wrappers

* Return WASI error type

* Reuse Metadata if possible to save syscalls.

* Refactor the change for two separate fd_filestat_get_impl

* Refactor error handling
2019-07-26 19:15:29 +02:00
Jakub Konka
e759e3c2a4 Update dependencies and lock wasmtime-* on a specific rev 2019-07-26 14:16:24 +02:00
Marcin Mielniczuk
696eee22b2 Mark all functions in host_impl.rs as pub(crate)
It will allow the compiler to spot more unused functions.
2019-07-26 09:02:01 +02:00
Jakub Konka
86ae6e3df4 Refactor hostcalls_impl in sys module 2019-07-23 15:02:23 -07:00
Jakub Konka
7f0219e6d0 Move hostcalls impl into separate module 2019-07-23 15:02:23 -07:00
Jakub Konka
c4704ba573 Fix error mapping for fd_seek on Windows 2019-07-22 16:05:30 -07:00
Jakub Konka
8ee4bed226 Add testcase for fd_seek and fd_tell 2019-07-22 16:05:30 -07:00
Jakub Konka
919262b5b9 Make fd_tell host independent 2019-07-22 16:05:30 -07:00