Skip to content

Commit

Permalink
Add kvm-unit-test (copy#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
copy committed Apr 29, 2017
1 parent d50101d commit 4e164c6
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ Credits
-

- CPU test cases via QEMU, http://wiki.qemu.org/Main_Page
- More tests via [kvm-unit-tests](https://www.linux-kvm.org/page/KVM-unit-tests)
- [Disk Images](https://github.com/copy/images)
- [The jor1k project](https://github.com/s-macke/jor1k) for 9p, filesystem and uart drivers
- [WinWorld](https://winworldpc.com/) sources of some old operating systems
Expand Down
36 changes: 36 additions & 0 deletions src/browser/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,42 @@
},
];

if(DEBUG)
{
// see tests/kvm-unit-tests/x86/
var tests = [
"realmode",
// All tests below require an APIC
"cmpxchg8b",
"port80",
"setjmp",
"sieve",
"hypercall", // crashes
"init", // stops execution
"msr", // TODO: Expects 64 bit msrs
"smap", // test stops, SMAP not enabled
"tsc_adjust", // TODO: IA32_TSC_ADJUST
"tsc", // TODO: rdtscp
"rmap_chain", // crashes
"memory", // missing mfence (uninteresting)
"taskswitch", // TODO: Jump
"taskswitch2", // TODO: Call TSS
"eventinj", // Missing #nt
"ioapic",
"apic",
];

for(let test of tests)
{
oses.push({
name: "Test case: " + test,
id: "test-" + test,
memory_size: 128 * 1024 * 1024,
multiboot: { "url": "tests/kvm-unit-tests/x86/" + test + ".flat", }
});
}
}

var query_args = get_query_arguments();
var profile = query_args["profile"];

Expand Down
2 changes: 2 additions & 0 deletions tests/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ A couple of test cases.
- [qemu](qemu/): Builds a Linux binary, which tests many CPU features. Needs to
be manually put on a Linux image and run in the emulator. This test is
contained in the `linux.iso` image and automatically run in the full test.
- [kvm-unit-test](kvm-unit-test/): Based on tests from the KVM project, tests
various CPU features.
- [perf-irhydra](perf-irhydra/): Manual performance test. Probably not
interesting for you.

0 comments on commit 4e164c6

Please sign in to comment.