Commit Graph

18 Commits

Author SHA1 Message Date
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
a46c2ad0aa split poll tests up, only one requires "real" stdio 2021-01-21 16:54:40 -08:00
Pat Hickey
04805fcc5f pass a test, dubiously 2020-12-14 19:48:30 -08:00
Pat Hickey
c16e731455 get rid of linker Rc cycle, and add debug info to test programs 2020-12-14 17:15:03 -08:00
Pat Hickey
759455192b test-programs: learn how to preopen a dir again 2020-12-11 16:38:55 -08:00
Pat Hickey
dfcdbfd0fe test-programs: no longer test virtfs separately
wasi-c2 does not have a virtfs yet, and when it does we'll design a
better test harness

also fix prestat get: i was reporting the wrong error
2020-12-11 15:51:14 -08:00
Peter Huene
41b4721512 Add a test case for WASI file truncation. 2020-07-10 14:28:08 -07:00
Alex Crichton
d8920c0125 Sync expected successful tests on AArch64 (#1581)
* Sync expected successful tests on AArch64

Fixes CI for recent merges which have fixed features on AArch64!

* Enable more passing tests
2020-04-22 17:43:59 -05:00
Alex Crichton
d1aa86f91a Add AArch64 tests to CI (#1526)
* Add AArch64 tests to CI

This commit enhances our CI with an AArch64 builder. Currently we have
no physical hardware to run on so for now we run all tests in an
emulator. The AArch64 build is cross-compiled from x86_64 from Linux.
Tests all happen in release mode with a recent version of QEMU (recent
version because it's so much faster, and in release mode because debug
mode tests take quite a long time in an emulator).

The goal here was not to get all tests passing on CI, but rather to get
AArch64 running on CI and get it green at the same time. To achieve that
goal many tests are now ignored on aarch64 platforms. Many tests fail
due to unimplemented functionality in the aarch64 backend (#1521), and
all wasmtime tests involving compilation are also disabled due to
panicking attempting to generate generate instruction offset information
for trap symbolication (#1523).

Despite this, though, all Cranelift tests and other wasmtime tests
should be runnin on AArch64 through QEMU with this PR. Additionally
we'll have an AArch64 binary release of Wasmtime for Linux, although it
won't be too useful just yet since it will panic on almost all wasm
modules.

* Review comments
2020-04-22 12:56:54 -05:00
Marcin Mielniczuk
f6e3ab03a2 Implement path_link for Windows. (#1199)
Implement path_link for Windows.
2020-04-03 21:24:38 +02:00
iximeow
7e0d9decbf Virtual file support (#701)
* Add support for virtual files (eg, not backed by an OS file).

Virtual files are implemented through trait objects, with a default
implementation that tries to behave like on-disk files, but entirely
backed by in-memory structures.

Co-authored-by: Dan Gohman <sunfish@mozilla.com>
2020-03-06 11:08:13 -08:00
Marcin Mielniczuk
4695c95374 WIP implementation of poll_oneoff on Windows 2020-01-09 18:46:02 +01:00
Alex Crichton
e13fabb276 Start to update the wasi crate in wasi tests (#675)
* Move `wasi` to `wasi_old` in wasi-tests

Leave space for the new `wasi` crate but allow us to incrementally
update tests.

* Update the big_random_buf test

* Update clock_time_get test

* Update close_preopen test

* Review comments

* Update to latest Wasmtime API
2019-12-09 13:08:47 +01:00
Jakub Konka
bbe2a797ba Fix feature-gating of test-programs (#612)
* Fix feature-gating of test-programs

This commit fixes bugs in enabling feature-gating of `test-programs`
which was introduced in #600. It turns out, #600 accidentally
disabled `test-programs` from ever running, and this commit fixes
that.

* Fix the CI
2019-11-21 13:52:15 +01:00
Jakub Konka
a58709d99e Feature-gate test-programs
This commit feature-gates `test-programs` as a workaround for
`cargo test` not allowing for optional dev-dependencies.

This commit addresses #595.
2019-11-21 07:01:53 +01:00
Dan Gohman
58dd4c6c88 Replace more miscellaenous read_wasm utilities with wat::parse_file. (#601) 2019-11-19 09:34:17 -06:00
Jakub Konka
9896a5cabd Add test for dangling file/dir handles (#566)
* Add test for dangling file/dir handles

This commit adds a test for dangling file/dir handles. The logic is
quite simple: we first create a resource (file or dir), get a WASI file
descriptor to it, remove the resource without closing the FD, and then
try to re-create it.

* Disable on Windows for now
2019-11-15 23:28:50 +01:00
Dan Gohman
d4fd229e5e Reorganize wasi-misc-tests. (#575)
* Reorganize wasi-misc-tests.

Move wasi-misc-tests out of wasi-common, to break a dependency cycle;
previously, wasmtime-* depended on wasi-common, but wasi-common
dev-dependended on wasmtime-*.

Now, wasi-common no longer dev-depends on wasmtime-*; instead, the
tests are in their own crate which depends on wasi-common and on
wasmtime-*.

Also, rename wasi-misc-tests to wasi-tests for simplicity.

This also removes the "wasm_tests" feature; it's replaced by the
"test-programs" feature.

* Update the CI script to use the new feature name.

* Update the CI script to use the new feature name in one more place.

* Change a `write!` to a `writeln!`.
2019-11-15 08:03:43 -08:00