Skip to content

nvx-rs: move the guest modules' tests out of their sources #1204

Closed

Description

Pull request: #1196, step 3 of 5, stacked on #1195.

Goal. Move the unit tests of the guest modules, and the code that only those tests compile, out of the production files.

Contents.

  • The inline tests modules of 75 guest files move, unchanged, into their tests.rs files.
  • The code that only tests compile moves into the tests modules of the modules that hold it, such as guest::sys's test helpers, guest::root's fake kernel, guest::managed_agent's loopback harness and process-test lock, and guest::mappings' privileged tests.
  • The test hooks that remain read their state from the tests modules, and the allowlist records them as seams: 20 hooks in 7 files. No guest file remains in its baseline.
  • GuestRustBuildConstants.TEST_MODULES goes, since the tests directories now cover the loopback harness. A change to a guest module's tests no longer rebuilds the guest images.
  • 12 tests change module path, which nvx-rs: move the guest modules' tests out of their sources #1196 lists.

Done when: #1196 merges.

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions