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

Tiny enhancements for CI tests #4115

Merged
merged 3 commits into from
Sep 19, 2023
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
14 changes: 14 additions & 0 deletions tests/integration_tests/security/test_vulnerabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,20 @@ def get_vuln_files_exception_dict(template):
return exception_dict


@pytest.mark.no_block_pr
def test_vulnerabilities_on_host():
"""
Test vulnerabilities files on host.
"""
vuln_dir = "/sys/devices/system/cpu/vulnerabilities"

# `grep` returns 1 if no lines were selected.
ecode, stdout, stderr = utils.run_cmd(
f"grep -r Vulnerable {vuln_dir}", ignore_return_code=True
)
assert ecode == 1, f"stdout:\n{stdout}\nstderr:\n{stderr}\n"


@pytest.mark.no_block_pr
def check_vulnerabilities_files_on_guest(microvm, template=None):
"""
Expand Down
3 changes: 3 additions & 0 deletions tools/devtool
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,9 @@ cmd_test() {

# If we got to here, we've got all we need to continue.
say "Kernel version: $(uname -r)"
if [ "$(uname --machine)" = "x86_64" ]; then
say "Microcode version: $(sudo cat /sys/devices/system/cpu/cpu0/microcode/version)"
zulinx86 marked this conversation as resolved.
Show resolved Hide resolved
zulinx86 marked this conversation as resolved.
Show resolved Hide resolved
fi
say "$(lscpu)"
say "Starting test run ..."

Expand Down