From dbe1fc9fac8a06c02100275faeb6c9777a9f0ca3 Mon Sep 17 00:00:00 2001 From: James Curtis Date: Tue, 6 Aug 2024 12:17:38 +0000 Subject: [PATCH] Update test to write results to S3 bucket Change tests to save results to s3 bucket, so that the results can more easily be processed Signed-off-by: James Curtis --- tests/conftest.py | 5 ++++- tests/integration_tests/performance/test_vcpu_hotplug.py | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index a6985272a552..4b8598aaa84e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -362,7 +362,10 @@ def rootfs_fxt(request, record_property): guest_kernel_fxt, params=kernel_params("vmlinux-5.10*") ) guest_kernel_linux_acpi_only = pytest.fixture( - guest_kernel_fxt, params=kernel_params("vmlinux-5.10.221") + guest_kernel_fxt, params=kernel_params("vmlinux-5.10.219") +) +guest_kernel_linux_6_5 = pytest.fixture( + guest_kernel_fxt, params=kernel_params("vmlinux-6.5.*", select=kernels_unfiltered) ) # Use the unfiltered selector, since we don't officially support 6.1 yet. # TODO: switch to default selector once we add full 6.1 support. diff --git a/tests/integration_tests/performance/test_vcpu_hotplug.py b/tests/integration_tests/performance/test_vcpu_hotplug.py index 072740494e3d..fdeb9321e434 100644 --- a/tests/integration_tests/performance/test_vcpu_hotplug.py +++ b/tests/integration_tests/performance/test_vcpu_hotplug.py @@ -94,7 +94,7 @@ def test_custom_udev_rule_latency( "vcpu_count", [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30] ) def test_manual_latency( - microvm_factory, guest_kernel_linux_acpi_only, rootfs_rw, vcpu_count + microvm_factory, guest_kernel_linux_acpi_only, rootfs_rw, vcpu_count, results_dir ): """Test the latency for hotplugging and booting CPUs in the guest""" gcc_compile(Path("./host_tools/hotplug_time.c"), Path("host_tools/hotplug_time.o")) @@ -143,8 +143,9 @@ def test_manual_latency( data.append({"vcpus": vcpu_count, "api": api_duration, "onlining": timestamp}) - df = pandas.DataFrame.from_dict(data).to_csv( - f"../test_results/manual-hotplug_{vcpu_count}.csv", + output_file = results_dir / f"hotplug-{vcpu_count}.csv" + + csv_data = pandas.DataFrame.from_dict(data).to_csv( index=False, float_format="%.3f", )