Commit graph

400 commits

Author SHA1 Message Date
Fabian 6e005a2058 Integration test: Mark Windows 3 as slow test, print diff output in qemu tests 2020-12-31 19:14:28 -06:00
Fabian 5f31a8aba2 Update expect tests for flags and arithmetic code generation (last two commits) 2020-12-31 19:14:28 -06:00
Fabian b5a72061fb Custom codegen for absolute jmp/call (FF_2/FF_4) 2020-12-31 19:14:28 -06:00
Fabian aadaf13854 Update expect tests 2020-08-30 19:37:15 -05:00
Fabian 58292cfbc8 namstests: Handle pagefaults 2020-08-30 19:37:15 -05:00
Fabian 8eae31295d nasmtests: Handle exceptions in forced-jit mode 2020-08-30 19:37:15 -05:00
Fabian 158bb75fec FPU: Implement zero divide fault 2020-08-30 19:37:15 -05:00
Fabian 0269e9cecf Fix fxtract 2020-08-30 19:37:15 -05:00
Fabian 9959e758d5 nasmtests: Fix display of integers 2020-08-30 19:37:15 -05:00
Fabian c2508bc61e Update expect tests 2020-08-30 19:37:15 -05:00
Fabian 0c42ea0d1f Custom code generation for leave (C9) 2020-08-30 19:37:15 -05:00
Fabian 837e6ff362 Custom code generation for ret imm (C2) 2020-08-30 19:37:15 -05:00
Fabian fc954cecea Update libwabt (fix failing decoding of large generated modules) 2020-08-30 19:37:15 -05:00
Ernest Wong 644d2cfca8 Filestorage tests: Improve mock transaction lifetimes
- Assert that transaction operations are done within their callback
scopes.
- Improve test performance by using setImmediate for queueing macrotasks
instead of using setTimeout.
- Check for in-progress callbacks before completing transactions.

Note that promise callbacks are run as microtasks. When request
onsuccess callbacks are run, the transaction becomes active again and allows
further requests to be placed against that transaction. The transaction
becomes inactive when the program reaches the end of the event loop
iteration. However, all microtasks are exhausted before the event loop
iteration ends, so the transaction remains active even within the promise
callbacks.
2020-08-30 19:37:15 -05:00
Ernest Wong 22412f3815 Filestorage tests: Test non-existent files 2020-08-30 19:37:15 -05:00
Ernest Wong 1d41054001 style(Filestorage tests): Move openning braces to new lines 2020-08-30 19:37:15 -05:00
Ernest Wong 79928bae4d Filestorage tests: Mock transaction.abort and store.count 2020-08-30 19:37:15 -05:00
Ernest Wong 5a085f32e3 Filestorage tests: Check for unexpected early exits 2020-08-30 19:37:15 -05:00
Fabian 958fb7b9d6 Update expect tests 2020-08-30 19:37:15 -05:00
Fabian 29395181d2 Update expect test results 2020-08-30 19:37:15 -05:00
Fabian 05296b0586 Enable fpu instructions in nasm tests 2020-08-30 19:37:15 -05:00
Ernest Wong 9e82dde504 Filestorage tests: Mock idb transaction.oncomplete 2020-08-30 19:37:15 -05:00
Ernest Wong 27b365b30a Filestorage tests: Set failure exit code 2020-08-30 19:37:15 -05:00
Fabian 9e13650c19 fixup expect tests 2020-08-30 19:37:15 -05:00
Fabian 5b95165de2 Add TEST_RELEASE_BUILD to run tests on release build 2020-08-30 19:37:15 -05:00
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