Skip to content
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

run tests inside SVSM #120

Merged
merged 10 commits into from
Oct 23, 2023

Commits on Oct 23, 2023

  1. mm: use target_os = "none" instead of test

    Once we'll start running tests in the SVSM, we'll want to use the
    correct implementations and not the fake ones for tests outside the
    SVSM.
    
    Signed-off-by: Tom Dohrmann <erbse.13@gmx.de>
    Freax13 committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    eee2f13 View commit details
    Browse the repository at this point in the history
  2. test: disable some tests inside SVSM

    For one reason or another some of the tests currently fail when run
    inside the SVSM.
    
    Signed-off-by: Tom Dohrmann <erbse.13@gmx.de>
    Freax13 committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    20e7531 View commit details
    Browse the repository at this point in the history
  3. Makefile: mark test as phony

    Signed-off-by: Tom Dohrmann <erbse.13@gmx.de>
    Freax13 committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    aecbe8c View commit details
    Browse the repository at this point in the history
  4. test: add no_std compatibly test crate

    Signed-off-by: Tom Dohrmann <erbse.13@gmx.de>
    Freax13 committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    251359d View commit details
    Browse the repository at this point in the history
  5. Makefile: remove kernel.elf dependency for stage1.o

    ... and move it to `all`. This way we can use the stage1/stage1.o target
    with another kernel (e.g. test kernel).
    
    Signed-off-by: Tom Dohrmann <erbse.13@gmx.de>
    Freax13 committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    f672c5a View commit details
    Browse the repository at this point in the history
  6. test: make it possible to run tests inside SVSM

    To build and run a kernel that runs the tests use
    ```
    QEMU=/path/to/qemu OVMF=/path/to/firmware/ make test-in-svsm
    ```
    
    Signed-off-by: Tom Dohrmann <erbse.13@gmx.de>
    Freax13 committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    7c5521f View commit details
    Browse the repository at this point in the history
  7. test: exit using QEMU debug exit device

    This is cleaner than `request_terminator_msr` as that MSR is more
    commonly used to signal errors rather than clean exits.
    
    Signed-off-by: Tom Dohrmann <erbse.13@gmx.de>
    Freax13 committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    ad133e1 View commit details
    Browse the repository at this point in the history
  8. docs: document how to run tests inside SVSM

    Signed-off-by: Tom Dohrmann <erbse.13@gmx.de>
    Freax13 committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    ad967ca View commit details
    Browse the repository at this point in the history
  9. utils: Add cbit helper

    Add a helper to print the C-bit position on the current platform.
    
    Signed-off-by: Joerg Roedel <jroedel@suse.de>
    joergroedel authored and Freax13 committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    4f7ab7d View commit details
    Browse the repository at this point in the history
  10. scripts: Add test-in-svsm.sh helper script

    Instead of having the full QEMU command line in the Makefile, extract
    the test-run into a separate script.
    
    Signed-off-by: Joerg Roedel <jroedel@suse.de>
    joergroedel authored and Freax13 committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    845ec96 View commit details
    Browse the repository at this point in the history