Commit graph

375 commits

Author SHA1 Message Date
Fabian 52b6e0caae Normalise memory offset in output wast in expect tests 2020-08-30 19:37:15 -05:00
Fabian 3f3446b5dd Update linux-boot benchmark script 2020-08-30 19:37:15 -05:00
Ernest Wong ba8a67f249 Filestorage tests: Avoid globals to improve script readability 2020-08-30 19:37:15 -05:00
Ernest Wong c928964562 Minor: Tidy quotes and spacing 2020-08-30 19:37:15 -05:00
Ernest Wong c273741405 Add tests for file storage chunking 2020-08-30 19:37:15 -05:00
Ernest Wong dfb47f5907 Filesystem Tests: Add stopping-on-first-failure option 2020-08-30 19:37:15 -05:00
Fabian 639ec0019b Commit a temporary workaround 2020-08-30 19:37:15 -05:00
Fabian ff3945bab4 Don't skip Linux 4 bzImage test 2020-08-30 19:37:15 -05:00
Fabian 7a31922078 Add test for bzimage_initrd_from_filesystem 2020-08-30 19:37:15 -05:00
Fabian 92346f51ed Add test for clean shutdown 2020-08-30 19:37:15 -05:00
Fabian d2f86799e9 Simplify load_from_json: Accept json object directly, don't run asynchronously 2020-08-30 19:37:14 -05:00
Fabian 99a7bdd6e3 Fix error message when libv86-debug.js hasn't been built 2020-08-30 19:37:14 -05:00
Fabian ae4733a25e Integration test: Boot from bzimage 2020-08-30 19:37:14 -05:00
Fabian 028e131ddb Rename OnJSONLoaded & small refactor 2020-08-30 19:37:14 -05:00
Fabian 23a2ac9c44 Default to synchronous execution for nasm tests 2020-08-30 19:37:14 -05:00
Fabian 148be53525 Try fixing nasmtests hang for gdb 8.2 2020-08-30 19:37:14 -05:00
Fabian b83ed1b7c1 Minor 2020-08-30 19:29:54 -05:00
Fabian 0798a0b40e Don't create unnecessary entry points
This commit prevents creation of entry points for jumps within the same
page. In interpreted mode, execution is continued on these kinds of
jumps.

Since this prevents the old hotness detection from working efficiently,
hotness detection has also been changed to work based on instruction
counters, and is such more precise (longer basic blocks are compiled
earlier).

This also breaks the old detection loop safety mechanism and causes
Linux to sometimes loop forever on "calibrating delay loop", so
JIT_ALWAYS_USE_LOOP_SAFETY has been set to 1.
2020-08-30 19:29:54 -05:00
Fabian fc35ea3ee2 Add emms after code that uses mmx registers before code that uses fpu registers 2020-08-30 19:29:54 -05:00
Fabian fd1f8e1108 Test more edge cases for sse shifts 2020-08-30 19:29:54 -05:00
Fabian 76cc19dee4 Tests for sse shifts with 64 bit shift operand 2020-08-30 19:29:54 -05:00
Ernest Wong a23b4f969e Filesystem tests: Also use non-blocking flock -n 2020-08-30 19:29:54 -05:00
Ernest Wong 401b814f93 Filesystem: Store infinite lock lengths
Having both lock.length and lock.get_length() giving different values is
confusing.
2020-08-30 19:29:54 -05:00
Ernest Wong f7ee28d8ca Filesystem tests: Replace nlinks script with function
Simplifies the code, as well as to experiment to see why there are
processes being killed during only the hard links test and only on CI.
2020-08-30 19:29:54 -05:00
Ernest Wong 400ed64d54 Filesystem: Add tests for byte-range file locks 2020-08-30 19:29:54 -05:00
Ernest Wong e14ef4b8a9 Filesystem: Add tests for whole-file locks. 2020-08-30 19:29:54 -05:00
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