diff --git a/tests/conftest.py b/tests/conftest.py index 3b75a3fa596..f9c9f56212b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -133,7 +133,7 @@ def pytest_runtest_logreport(report): "test": report.nodeid, "instance": global_props.instance, "cpu_model": global_props.cpu_model, - "host_kernel": "linux-" + global_props.host_linux_version, + "host_kernel": "linux-" + global_props.host_linux_version_metrics, "phase": report.when, }, # per test @@ -141,12 +141,12 @@ def pytest_runtest_logreport(report): "test": report.nodeid, "instance": global_props.instance, "cpu_model": global_props.cpu_model, - "host_kernel": "linux-" + global_props.host_linux_version, + "host_kernel": "linux-" + global_props.host_linux_version_metrics, }, # per phase {"phase": report.when}, # per host kernel - {"host_kernel": "linux-" + global_props.host_linux_version}, + {"host_kernel": "linux-" + global_props.host_linux_version_metrics}, # per CPU {"cpu_model": global_props.cpu_model}, # and global diff --git a/tests/framework/microvm.py b/tests/framework/microvm.py index 45375cd9c61..823a61495df 100644 --- a/tests/framework/microvm.py +++ b/tests/framework/microvm.py @@ -457,7 +457,7 @@ def dimensions(self): return { "instance": global_props.instance, "cpu_model": global_props.cpu_model, - "host_kernel": f"linux-{global_props.host_linux_version}", + "host_kernel": f"linux-{global_props.host_linux_version_metrics}", "guest_kernel": self.kernel_file.stem[2:], "rootfs": self.rootfs_file.name, "vcpus": str(self.vcpus_count), diff --git a/tests/framework/properties.py b/tests/framework/properties.py index c7c9dfe789d..83ff9dcdce2 100644 --- a/tests/framework/properties.py +++ b/tests/framework/properties.py @@ -102,6 +102,13 @@ def host_linux_version_tpl(self): """Host Linux version major.minor, as a tuple for easy comparison""" return tuple(int(x) for x in self.host_linux_version.split(".")) + @property + def host_linux_version_metrics(self): + """Host Linux version to be reported in metrics""" + return ( + "next" if self.host_linux_version_tpl > (6, 12) else self.host_linux_version + ) + @property def is_ec2(self): """Are we running on an EC2 instance?""" diff --git a/tests/host_tools/fcmetrics.py b/tests/host_tools/fcmetrics.py index 47661d5b27d..5aa247f40b7 100644 --- a/tests/host_tools/fcmetrics.py +++ b/tests/host_tools/fcmetrics.py @@ -508,7 +508,7 @@ def __init__(self, vm, timer=60): self.metrics_logger.set_dimensions( { "instance": global_props.instance, - "host_kernel": "linux-" + global_props.host_linux_version, + "host_kernel": "linux-" + global_props.host_linux_version_metrics, "guest_kernel": vm.kernel_file.stem[2:], } ) diff --git a/tests/integration_tests/performance/test_boottime.py b/tests/integration_tests/performance/test_boottime.py index 3bf74e3607a..4a2e6b61b70 100644 --- a/tests/integration_tests/performance/test_boottime.py +++ b/tests/integration_tests/performance/test_boottime.py @@ -23,7 +23,7 @@ "instance": global_props.instance, "cpu_model": global_props.cpu_model, "host_os": global_props.host_os, - "host_kernel": "linux-" + global_props.host_linux_version, + "host_kernel": "linux-" + global_props.host_linux_version_metrics, }