Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ tags
/resources/x86_64
/resources/aarch64
redundant_seccomp_rules_build
test_instrumented_firecracker_build
13 changes: 13 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,20 @@ excluding tests marked with `pytest.mark.nonci`):
tools/devtool -y test
```

Note: some performance tests require host performance tuning (e.g. dedicating
some memory for `hugetlbfs`). For those tests, the `--performance` flag is also
required:

```sh
tools/devtool -y test --performance
```

To run only tests from specific directories and/or files:

```sh
tools/devtool -y test -- integration_tests/performance/test_boottime.py
# Or
tools/devtool -y test --performance -- integration_tests/performance/test_huge_pages.py
```

To run a single specific test from a file:
Expand Down Expand Up @@ -72,6 +82,9 @@ dev container automatically, so setting them on the host before invoking
at the uVM chroot root. The cheap artifacts (`host-dmesg.log` and the guest
serial console) are always collected. Default off. The nightly performance
pipeline sets this.
- `FC_TEST_DEVELOPMENT_ENVIRONMENT=1` — skip tests that depend on specific host
configurations that don't add any value when running on a development
environment.

### Output

Expand Down
2 changes: 2 additions & 0 deletions tests/framework/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def __init__(self):
self.buildkite_build_number = os.environ.get("BUILDKITE_BUILD_NUMBER")
self.buildkite_pr = os.environ.get("BUILDKITE_PULL_REQUEST", "false") != "false"
self.buildkite_revision_a = os.environ.get("BUILDKITE_PULL_REQUEST_BASE_BRANCH")
# Development environment detection
self.is_dev_env = os.environ.get("FC_TEST_DEVELOPMENT_ENVIRONMENT") == "1"

if self._in_git_repo():
self.git_commit_id = run_cmd("git rev-parse HEAD")
Expand Down
1 change: 1 addition & 0 deletions tests/framework/utils_cpuid.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class CpuModel(str, Enum):
CPU_DICT = {
CpuVendor.INTEL: {
"Intel(R) Xeon(R) Platinum 8259CL CPU": "INTEL_CASCADELAKE",
"Intel(R) Xeon(R) Platinum 8275CL CPU": "INTEL_CASCADELAKE",
"Intel(R) Xeon(R) Platinum 8375C CPU": "INTEL_ICELAKE",
"Intel(R) Xeon(R) Platinum 8488C": "INTEL_SAPPHIRE_RAPIDS",
"Intel(R) Xeon(R) 6975P-C": "INTEL_GRANITE_RAPIDS",
Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests/security/test_vulnerabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def download_spectre_meltdown_checker(tmp_path_factory):

# Nothing can be sensibly tested in a PR context here
@pytest.mark.skipif(
global_props.buildkite_pr,
global_props.buildkite_pr or global_props.is_dev_env,
reason="Test depends solely on factors external to GitHub repository",
)
def test_spectre_meltdown_checker_on_host(spectre_meltdown_checker):
Expand All @@ -121,7 +121,7 @@ def test_spectre_meltdown_checker_on_host(spectre_meltdown_checker):

# Nothing can be sensibly tested here in a PR context
@pytest.mark.skipif(
global_props.buildkite_pr,
global_props.buildkite_pr or global_props.is_dev_env,
reason="Test depends solely on factors external to GitHub repository",
)
def test_vulnerabilities_on_host():
Expand Down
Loading