-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression testing? #9
Comments
I "test" for regressions by booting the following operating systems:
These operating systems are pretty complete in their usage of the entire x86 instruction set. Now, they won't check for edge-case shift instructions like the ones described in #7 and #8, but they do tell me if some major bug has been introduced. Another option is to randomly "fuzz" a bunch of instructions with random assignment of operands and inputs, but the process is too unpredictable and non-deterministic for me, and quite a few operations cause undefined behavior or faults, usually in flags (i.e. For a more rigorous test, I use the QEMU TCG test suite for i386, which can be found here. I use a version set up on this disk image, which includes test output created on a real processor. It exercises a large variety of arithmetic instructions, but is limited due to the fact that it runs entirely in user mode (so nothing crazy like far calls/far returns). I've always wanted a series of tests for x86 like the ones that NESDev developers use. I'll have a go at writing some; it'll be fun to write some x86 assembly. I'll create a separate repository for these tests so that other emulators can use them too; testing an x86 CPU is a project in itself. |
Unit tests: https://github.com/nepx/verr. |
It would be nice to have some instruction regression tests to be sure that the implementation would be consistent with real x86.
The text was updated successfully, but these errors were encountered: