From cffc2e6144d636e8a464048655a339c4bfa49aa8 Mon Sep 17 00:00:00 2001 From: Erin Le Date: Mon, 4 Nov 2024 15:06:59 -0800 Subject: [PATCH] tests: modify tests to use ALL build This commit modifies a number of Testlib tests to use the ALL build instead of a more specific build. --- tests/gem5/arm_boot_tests/test_linux_boot.py | 11 +---------- tests/gem5/chi_protocol/test_chi_per_isa.py | 2 +- .../test_gem5_library_examples.py | 9 +++++---- .../kvm_fork_tests/configs/boot_kvm_fork_run.py | 8 ++++++-- tests/gem5/kvm_fork_tests/test_kvm_fork_run.py | 14 ++------------ .../configs/boot_kvm_switch_exit.py | 8 ++++++-- tests/gem5/kvm_switch_tests/test_kvm_cpu_switch.py | 14 ++------------ tests/gem5/m5threads_test_atomic/test.py | 2 +- .../test_replacement_policies.py | 2 +- tests/gem5/stdlib/test_requires.py | 2 +- tests/gem5/traffic_gen/test_memory_traffic_gen.py | 2 +- tests/gem5/x86_boot_tests/test_linux_boot.py | 14 ++------------ 12 files changed, 29 insertions(+), 59 deletions(-) diff --git a/tests/gem5/arm_boot_tests/test_linux_boot.py b/tests/gem5/arm_boot_tests/test_linux_boot.py index 074f3364b5..77b519552d 100644 --- a/tests/gem5/arm_boot_tests/test_linux_boot.py +++ b/tests/gem5/arm_boot_tests/test_linux_boot.py @@ -71,15 +71,6 @@ arm_boot_test" else: name += "_m5-exit" - if mem_system == "chi": - protocol_to_use = "CHI" - elif mem_system == "mesi_two_level": - protocol_to_use = None - elif mem_system == "mi_example": - protocol_to_use = "MI_example" - else: - protocol_to_use = None - gem5_verify_config( name=name, verifiers=verifiers, @@ -96,7 +87,7 @@ arm_boot_test" valid_isas=(constants.all_compiled_tag,), valid_hosts=constants.supported_hosts, length=length, - protocol=protocol_to_use, + protocol=None, ) diff --git a/tests/gem5/chi_protocol/test_chi_per_isa.py b/tests/gem5/chi_protocol/test_chi_per_isa.py index 91e86c8c77..e44ace5f91 100644 --- a/tests/gem5/chi_protocol/test_chi_per_isa.py +++ b/tests/gem5/chi_protocol/test_chi_per_isa.py @@ -72,6 +72,6 @@ for isa in ("arm", "riscv", "x86"): ], valid_isas=(constants.all_compiled_tag,), valid_hosts=constants.supported_hosts, - protocol="CHI", + protocol=None, length=constants.long_tag, ) diff --git a/tests/gem5/gem5_library_example_tests/test_gem5_library_examples.py b/tests/gem5/gem5_library_example_tests/test_gem5_library_examples.py index f91b4bba15..eba2d101e2 100644 --- a/tests/gem5/gem5_library_example_tests/test_gem5_library_examples.py +++ b/tests/gem5/gem5_library_example_tests/test_gem5_library_examples.py @@ -196,7 +196,7 @@ if False: # os.access("/dev/kvm", mode=os.R_OK | os.W_OK): ), config_args=["--benchmark", "blackscholes", "--size", "simsmall"], valid_isas=(constants.all_compiled_tag,), - protocol="MESI_Two_Level", + protocol=None, valid_hosts=(constants.host_x86_64_tag,), length=constants.long_tag, uses_kvm=True, @@ -218,11 +218,12 @@ if os.access("/dev/kvm", mode=os.R_OK | os.W_OK): ), config_args=[ "--benchmark", - "npb-bt-a" "--ticks", + "npb-bt-a", + "--ticks", "5000000000", ], valid_isas=(constants.all_compiled_tag,), - protocol="MESI_Two_Level", + protocol=None, valid_hosts=(constants.host_x86_64_tag,), length=constants.long_tag, uses_kvm=True, @@ -244,7 +245,7 @@ if os.access("/dev/kvm", mode=os.R_OK | os.W_OK): ), config_args=["--benchmark", "gapbs-bfs-test"], valid_isas=(constants.all_compiled_tag,), - protocol="MESI_Two_Level", + protocol=None, valid_hosts=(constants.host_x86_64_tag,), length=constants.long_tag, uses_kvm=True, diff --git a/tests/gem5/kvm_fork_tests/configs/boot_kvm_fork_run.py b/tests/gem5/kvm_fork_tests/configs/boot_kvm_fork_run.py index be6e6009e1..bc0d55edaf 100644 --- a/tests/gem5/kvm_fork_tests/configs/boot_kvm_fork_run.py +++ b/tests/gem5/kvm_fork_tests/configs/boot_kvm_fork_run.py @@ -56,7 +56,10 @@ from gem5.components.processors.simple_switchable_processor import ( ) from gem5.isas import ISA from gem5.resources.resource import obtain_resource -from gem5.runtime import get_runtime_coherence_protocol + +# This function was removed in the change to compile all Ruby protocols in one +# build +# from gem5.runtime import get_runtime_coherence_protocol from gem5.utils.requires import requires parser = argparse.ArgumentParser( @@ -204,7 +207,8 @@ motherboard.set_kernel_disk_workload( # Begin running of the simulation. This will exit once the Linux system boot # is complete. print("Running with ISA: " + processor.get_isa().name) -print("Running with protocol: " + get_runtime_coherence_protocol().name) +# This function was removed +# print("Running with protocol: " + get_runtime_coherence_protocol().name) print() # Disable the gdb ports. Required for forking. diff --git a/tests/gem5/kvm_fork_tests/test_kvm_fork_run.py b/tests/gem5/kvm_fork_tests/test_kvm_fork_run.py index be6821d6ef..462ee3fd9b 100644 --- a/tests/gem5/kvm_fork_tests/test_kvm_fork_run.py +++ b/tests/gem5/kvm_fork_tests/test_kvm_fork_run.py @@ -48,16 +48,6 @@ def test_kvm_fork_run(cpu: str, num_cpus: int, mem_system: str, length: str): name = f"{cpu}-cpu_{str(num_cpus)}-cores_{mem_system}_kvm-fork-run-test" verifiers = [] - if mem_system == "mesi_two_level": - protocol_to_use = None - isa_to_use = constants.all_compiled_tag - elif mem_system == "mi_example": - protocol_to_use = "MI_example" - isa_to_use = constants.x86_tag - else: - protocol_to_use = None - isa_to_use = constants.all_compiled_tag - gem5_verify_config( name=name, verifiers=verifiers, @@ -83,9 +73,9 @@ def test_kvm_fork_run(cpu: str, num_cpus: int, mem_system: str, length: str): resource_path, "--kernel-args=''", ], - valid_isas=(isa_to_use,), + valid_isas=(constants.all_compiled_tag,), valid_hosts=(constants.host_x86_64_tag,), - protocol=protocol_to_use, + protocol=None, length=length, uses_kvm=True, ) diff --git a/tests/gem5/kvm_switch_tests/configs/boot_kvm_switch_exit.py b/tests/gem5/kvm_switch_tests/configs/boot_kvm_switch_exit.py index bf43bf272a..4d6da7b5f4 100644 --- a/tests/gem5/kvm_switch_tests/configs/boot_kvm_switch_exit.py +++ b/tests/gem5/kvm_switch_tests/configs/boot_kvm_switch_exit.py @@ -46,7 +46,10 @@ from gem5.components.processors.simple_switchable_processor import ( ) from gem5.isas import ISA from gem5.resources.resource import obtain_resource -from gem5.runtime import get_runtime_coherence_protocol + +# This function was removed in the change to compile all Ruby protocols in one +# build +# from gem5.runtime import get_runtime_coherence_protocol from gem5.simulate.exit_event import ExitEvent from gem5.simulate.simulator import Simulator from gem5.utils.requires import requires @@ -186,7 +189,8 @@ motherboard.set_kernel_disk_workload( # Begin running of the simulation. This will exit once the Linux system boot # is complete. print("Running with ISA: " + processor.get_isa().name) -print("Running with protocol: " + get_runtime_coherence_protocol().name) +# This function was removed +# print("Running with protocol: " + get_runtime_coherence_protocol().name) print() simulator = Simulator( diff --git a/tests/gem5/kvm_switch_tests/test_kvm_cpu_switch.py b/tests/gem5/kvm_switch_tests/test_kvm_cpu_switch.py index 6cc53e6134..e8530c3d6c 100644 --- a/tests/gem5/kvm_switch_tests/test_kvm_cpu_switch.py +++ b/tests/gem5/kvm_switch_tests/test_kvm_cpu_switch.py @@ -48,16 +48,6 @@ def test_kvm_switch(cpu: str, num_cpus: int, mem_system: str, length: str): name = f"{cpu}-cpu_{str(num_cpus)}-cores_{mem_system}_kvm-switch-test" verifiers = [] - if mem_system == "mesi_two_level": - protocol_to_use = None - isa_to_use = constants.all_compiled_tag - elif mem_system == "mi_example": - protocol_to_use = "MI_example" - isa_to_use = constants.x86_tag - else: - protocol_to_use = None - isa_to_use = constants.all_compiled_tag - gem5_verify_config( name=name, verifiers=verifiers, @@ -81,9 +71,9 @@ def test_kvm_switch(cpu: str, num_cpus: int, mem_system: str, length: str): resource_path, "--kernel-args=''", ], - valid_isas=(isa_to_use,), + valid_isas=(constants.all_compiled_tag,), valid_hosts=(constants.host_x86_64_tag,), - protocol=protocol_to_use, + protocol=None, length=length, uses_kvm=True, ) diff --git a/tests/gem5/m5threads_test_atomic/test.py b/tests/gem5/m5threads_test_atomic/test.py index 0af973bd14..e2c63e0f59 100644 --- a/tests/gem5/m5threads_test_atomic/test.py +++ b/tests/gem5/m5threads_test_atomic/test.py @@ -62,7 +62,7 @@ for cpu in cpu_types: "--cmd", joinpath(base_path, binary), ], - valid_isas=(constants.sparc_tag,), + valid_isas=(constants.all_compiled_tag,), valid_hosts=constants.supported_hosts, length=constants.long_tag, ) diff --git a/tests/gem5/replacement_policies/test_replacement_policies.py b/tests/gem5/replacement_policies/test_replacement_policies.py index 0843ec2e68..c69ea9fe80 100644 --- a/tests/gem5/replacement_policies/test_replacement_policies.py +++ b/tests/gem5/replacement_policies/test_replacement_policies.py @@ -49,7 +49,7 @@ def test_replacement_policy(config_name: str, config_path: str) -> None: "run_replacement_policy.py", ), config_args=[config_name, config_path], - valid_isas=(constants.null_tag,), + valid_isas=(constants.all_compiled_tag,), valid_hosts=constants.supported_hosts, length=constants.long_tag, ) diff --git a/tests/gem5/stdlib/test_requires.py b/tests/gem5/stdlib/test_requires.py index 101b820896..0c40514b77 100644 --- a/tests/gem5/stdlib/test_requires.py +++ b/tests/gem5/stdlib/test_requires.py @@ -63,7 +63,7 @@ for isa in isa_map.keys(): "requires_check.py", ), config_args=["-i", isa], - valid_isas=(isa_map[isa],), + valid_isas=(constants.all_compiled_tag,), length=length_map[isa], ) diff --git a/tests/gem5/traffic_gen/test_memory_traffic_gen.py b/tests/gem5/traffic_gen/test_memory_traffic_gen.py index 235a9b6fda..a00b52ecdd 100644 --- a/tests/gem5/traffic_gen/test_memory_traffic_gen.py +++ b/tests/gem5/traffic_gen/test_memory_traffic_gen.py @@ -77,7 +77,7 @@ def test_memory( config_args=[generator, generator_cores, cache, module] + [memory] + list(args), - valid_isas=(constants.null_all_ruby,), + valid_isas=(constants.all_compiled_tag,), valid_hosts=constants.supported_hosts, length=constants.quick_tag, ) diff --git a/tests/gem5/x86_boot_tests/test_linux_boot.py b/tests/gem5/x86_boot_tests/test_linux_boot.py index fb16896bf8..4816457391 100644 --- a/tests/gem5/x86_boot_tests/test_linux_boot.py +++ b/tests/gem5/x86_boot_tests/test_linux_boot.py @@ -59,16 +59,6 @@ def test_boot( additional_config_args.append("--tick-exit") additional_config_args.append(str(to_tick)) - if mem_system == "mesi_two_level": - protocol_to_use = None - isa_to_use = constants.all_compiled_tag - elif mem_system == "mi_example": - protocol_to_use = "MI_example" - isa_to_use = constants.x86_tag - else: - protocol_to_use = None - isa_to_use = constants.all_compiled_tag - gem5_verify_config( name=name, verifiers=verifiers, @@ -96,9 +86,9 @@ def test_boot( resource_path, ] + additional_config_args, - valid_isas=(isa_to_use,), + valid_isas=(constants.all_compiled_tag,), valid_hosts=constants.supported_hosts, - protocol=protocol_to_use, + protocol=None, length=length, )