Commit graph

349 commits

Author SHA1 Message Date
Fabian
b70a5c081a Allow fast path for memory reads from pages that contain code 2020-08-30 19:29:54 -05:00
Ernest Wong
3773f0bfdf Filesystem tests: Increase memory size to 64MiB
OOM Killer was killing the processes.
2020-08-30 19:29:54 -05:00
Ernest Wong
e5a689ac2d Filesystem: Expand tests for hard links
Verify multiple hardlinks and verify nlinks counter.
2020-08-30 19:29:54 -05:00
Ernest Wong
c7dda46de1 Filesystem: Disallow hardlinks across filesystems
Although hardlinks across filesystems worked quite well in the current
implementation, we will run into problems when we try to implement
different backends for each sub-filesystem.

Note: EPERM is used instead of EXDEV since the mv command will silently
try to use copy-and-unlink when rename(2) fails with EXDEV.

The rules for linking has been reverted back:
 - Before commit: Any inode, including forwarders, could be linked as
long as the parent is not a forwarder and is a directory.
 - After commit: Only non-forwarders and root-forwarders are allowed to
be linked, and must be linked under a directory and not a forwarder.
2020-08-30 19:29:54 -05:00
Ernest Wong
00b9ad683a Filesystem tests: don't rely on inode.name 2020-08-30 19:29:54 -05:00
Ernest Wong
d368ccf617 Add more tests for filesystem hardlinks 2020-08-30 19:29:54 -05:00
Fabian
295985e8e0 Remove code section: Only a single buffer is used for generating code 2020-08-30 19:29:54 -05:00
Fabian
1a3c491647 More tests for rep {movs,stos}{b,d} 2020-08-30 19:29:54 -05:00
Fabian
920d150c8b qemu: Enable all sse2 tests, add tests for approximate operations 2020-08-30 19:29:54 -05:00
Fabian
0a9c2bf6e2 qemu tests: init fpu before fxsave as fpu state contains undefined values from previous operations 2020-08-30 19:29:54 -05:00
Fabian
12eb838939 Expect tests: Catch libwabt errors and try to help 2020-08-30 19:29:54 -05:00
Fabian
3b1063d58a Expect tests: Accept TEST_NAME env variable 2020-08-30 19:29:54 -05:00
Fabian
3706bcac12 Use jit for read-modify-write arithmetic instructions 2020-08-30 19:29:54 -05:00
Fabian
ca36680d52 PAGE_FAULT is u8 2020-08-30 19:29:54 -05:00
Fabian
d4d7d236d5 Make all instructions non-faulting; handle faulting case in gen_safe_{read,write} (#44) 2020-08-30 19:29:54 -05:00
Fabian
d67b91b895 Update expect tests 2020-08-30 19:29:53 -05:00
Fabian
1faf8ccc86 Allocate memory via Rust instead of ahead-of-time 2020-08-30 19:29:53 -05:00
Awal Garg
26fc44a61f simplify push16,32 2020-08-30 19:29:53 -05:00
Awal Garg
bfc04b80fb jit E8 2020-08-30 19:29:53 -05:00
Awal Garg
73cbea7d0f call gen_pop{16,32} instead of using interpreted variants, update expect
tests
2020-08-30 19:29:53 -05:00
Fabian
28ac891dc3 Filesystem: Load files via their sha256 2020-08-30 19:29:53 -05:00
Ernest Wong
4a76c66ff3 Improve tests for fs.Rename across mounts
- Test both file and directory.
- Test combinations of forwarder/non-forwarder source/destinations
- Test different destination filenames
- Test empty file

Can't test early failure behaviour when destination can't be unlinked,
since right now only non-empty directories and root directories can't be
unlinked and busybox's mv program does not support mv
--no-target-directory.
2020-08-30 19:29:53 -05:00
Ernest Wong
0a4b6c8388 Add fs test for using .. across filesystems 2020-08-30 19:29:53 -05:00
Ernest Wong
e683e812fd Mount only onto non-existent paths, existent parent
If mountpoint already exists, then we're silently making its children
inaccessible which may not be what we expected/intended.

Create a new forwarder inode upon mounting.
2020-08-30 19:29:53 -05:00
Ernest Wong
89592e8283 Use fs.RecursiveDelete before each fs test
Don't need to involve the guest os to delete everything.
2020-08-30 19:29:53 -05:00
Ernest Wong
1c6e5f2a51 Add failing tests for fs.SearchPath
Bugs in fs.SearchPath is causing problems with fs.Mount.
2020-08-30 19:29:53 -05:00
Ernest Wong
070c38c6a1 Add tests for host-side fs mounting
The testing "framework" code is slowly turning into spaghetti due to the
asynchronous nature of the triggers. Using async functions will help
clarify the program flow if we think we should address this issue.
2020-08-30 19:29:53 -05:00
Ernest Wong
fa7ffd6ccc FS tests: include preparation steps in timeout
Stop hangs caused by faults during mounting and file loading
2020-08-30 19:29:53 -05:00
Ernest Wong
d96a3373a6 FS tests: add enable-logs switch, simplify basefs option 2020-08-30 19:29:53 -05:00
Fabian
21018b880e Enable a few more sse tests 2020-08-30 19:29:53 -05:00
Fabian
6fa702c8aa Implement {min,max,div}{p,s}{s,d} sse instructions (#57) 2020-08-30 19:29:53 -05:00
Fabian
70ae4b720a Remove use of raising cpu exceptions for trigger_ud 2020-08-30 19:29:53 -05:00
Fabian
7e574dde52 Implement some floating point sse1/sse2 instructions (#57) 2020-08-30 19:29:53 -05:00
Fabian
384b7f3f73 Add more full tests and skip slow tests by default 2020-08-30 19:29:53 -05:00
Awal Garg
9b0fdc5019 Improve locals handling
Issuing of locals should only happen with set_new_local and
tee_new_local now
2020-08-30 19:29:53 -05:00
Awal Garg
7a14a010a8 Improve handling of locals and add tests
- adds alloc_local and free_local
- slightly better wasmgen tests
- caller of gen_safe_write32 is responsible for allocating
  and freeing locals for address and value
- updates expect-tests
2020-08-30 19:29:53 -05:00
Fabian
848b07a628 Skip tests that fail due to qemu bugs 2020-08-30 19:29:53 -05:00
Fabian
7d627ac13a Make tests a bit more robust 2020-08-30 19:29:53 -05:00
Fabian
c108aaaadd Extend qemu paging tests with cross-page page faults 2020-08-30 19:29:53 -05:00
Fabian
510c6c186b qemu tests: More sse shift tests 2020-08-30 19:29:53 -05:00
Fabian
9bd1e30439 qemu tests: Re-enable some sse tests and reduce diff between upstream version 2020-08-30 19:29:53 -05:00
Fabian
a7c25c423e nasmtests: Add timeout and clarify 2020-08-30 19:29:53 -05:00
Fabian
1ee5895c44 api test: Print error 2020-08-30 19:29:53 -05:00
Fabian
f43ab3387a Remove use of cpu exceptions for trigger_gp for instructions 2020-08-30 19:29:53 -05:00
Fabian
4ee7da8f83 Remove use of cpu exceptions for divisions 2020-08-30 19:29:53 -05:00
Ernest Wong
a538ba9960 Fix 9p caps test and add tests for xattr 2020-08-30 19:29:53 -05:00
Awal Garg
b3e415cf9f jit inline 0xC3 2020-08-30 19:29:53 -05:00
Awal Garg
9224fc3878 jit inline 0xEB 2020-08-30 19:29:53 -05:00
Ernest Wong
5ec59fa019 Increase 9p tests' timeouts 2020-08-30 19:29:51 -05:00
Fabian
766c50b6fb Enable api tests 2020-08-30 19:29:13 -05:00