v86/tests
2025-03-15 17:29:15 +07:00
..
api test for #1203 2025-01-17 12:40:09 -06:00
benchmark Optimize pack_memory by moving zero check to rust. 2025-02-01 19:07:54 -07:00
devices Some small fixes: 2025-03-14 23:01:19 -07:00
expect use BTree{Map,Set} to generate same graphs when rust version changes hashmap iteration order 2025-01-17 15:26:23 -06:00
full qemutests, integrationtests: enable cpu logging by default 2025-03-15 17:29:15 +07:00
jit-paging use emulator.destroy() over emulator.stop() to properly remove v86 instances 2024-12-20 10:41:09 -07:00
kvm-unit-tests fewer blank lines 2024-07-24 16:23:44 +02:00
manual use emulator.destroy() over emulator.stop() to properly remove v86 instances 2024-12-20 10:41:09 -07:00
nasm s/==/=== 2024-07-13 18:27:32 +02:00
qemu qemutests, integrationtests: enable cpu logging by default 2025-03-15 17:29:15 +07:00
rust Avoid console.assert (doesn't throw) 2020-12-31 19:14:30 -06:00
Readme.md Document env variables for tests 2021-01-01 21:51:17 -06:00

Use the corresponding make target in the root directory to run a test. The following list is roughtly sorted from most interesting/useful to least.

  • nasm: Small unit tests written in assembly, which are run using gdb on the host.
  • qemu: Based on tests from qemu. Builds a Linux binary, which tests many CPU features, which are then compared to a run on qemu.
  • kvm-unit-test: Based on tests from the KVM project, tests various CPU features.
  • full: Starts several OSes and checks if they boot correctly.
  • jit-paging: Tests jit and paging interaction.
  • api: Tests for several API functions of v86.
  • devices: Device tests.
  • rust: Rust unit test helpers.
  • expect: Expect tests for the jit output. Contains a set of asm+wasm files, where the jit is expected to produce the wasm file given the asm file.

The following environmental variables are respected by most tests if applicable:

  • TEST_RELEASE_BUILD=1: Test the release build (libv86.js, v86.wasm) instead of the debug build (libv86-debug.js, v86-debug.wasm)
  • MAX_PARALLEL_TESTS=n: Maximum number of tests to run in parallel. Defaults to the number of cores in your system or less.
  • TEST_NAME="…": Run only the specified test (only expect, full, nasm)