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.
This commit is contained in:
Erin Le
2024-11-04 15:06:59 -08:00
committed by Bobby R. Bruce
parent 2ee40f1c11
commit cffc2e6144
12 changed files with 29 additions and 59 deletions

View File

@@ -71,15 +71,6 @@ arm_boot_test"
else: else:
name += "_m5-exit" 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( gem5_verify_config(
name=name, name=name,
verifiers=verifiers, verifiers=verifiers,
@@ -96,7 +87,7 @@ arm_boot_test"
valid_isas=(constants.all_compiled_tag,), valid_isas=(constants.all_compiled_tag,),
valid_hosts=constants.supported_hosts, valid_hosts=constants.supported_hosts,
length=length, length=length,
protocol=protocol_to_use, protocol=None,
) )

View File

@@ -72,6 +72,6 @@ for isa in ("arm", "riscv", "x86"):
], ],
valid_isas=(constants.all_compiled_tag,), valid_isas=(constants.all_compiled_tag,),
valid_hosts=constants.supported_hosts, valid_hosts=constants.supported_hosts,
protocol="CHI", protocol=None,
length=constants.long_tag, length=constants.long_tag,
) )

View File

@@ -196,7 +196,7 @@ if False: # os.access("/dev/kvm", mode=os.R_OK | os.W_OK):
), ),
config_args=["--benchmark", "blackscholes", "--size", "simsmall"], config_args=["--benchmark", "blackscholes", "--size", "simsmall"],
valid_isas=(constants.all_compiled_tag,), valid_isas=(constants.all_compiled_tag,),
protocol="MESI_Two_Level", protocol=None,
valid_hosts=(constants.host_x86_64_tag,), valid_hosts=(constants.host_x86_64_tag,),
length=constants.long_tag, length=constants.long_tag,
uses_kvm=True, uses_kvm=True,
@@ -218,11 +218,12 @@ if os.access("/dev/kvm", mode=os.R_OK | os.W_OK):
), ),
config_args=[ config_args=[
"--benchmark", "--benchmark",
"npb-bt-a" "--ticks", "npb-bt-a",
"--ticks",
"5000000000", "5000000000",
], ],
valid_isas=(constants.all_compiled_tag,), valid_isas=(constants.all_compiled_tag,),
protocol="MESI_Two_Level", protocol=None,
valid_hosts=(constants.host_x86_64_tag,), valid_hosts=(constants.host_x86_64_tag,),
length=constants.long_tag, length=constants.long_tag,
uses_kvm=True, 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"], config_args=["--benchmark", "gapbs-bfs-test"],
valid_isas=(constants.all_compiled_tag,), valid_isas=(constants.all_compiled_tag,),
protocol="MESI_Two_Level", protocol=None,
valid_hosts=(constants.host_x86_64_tag,), valid_hosts=(constants.host_x86_64_tag,),
length=constants.long_tag, length=constants.long_tag,
uses_kvm=True, uses_kvm=True,

View File

@@ -56,7 +56,10 @@ from gem5.components.processors.simple_switchable_processor import (
) )
from gem5.isas import ISA from gem5.isas import ISA
from gem5.resources.resource import obtain_resource 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 from gem5.utils.requires import requires
parser = argparse.ArgumentParser( 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 # Begin running of the simulation. This will exit once the Linux system boot
# is complete. # is complete.
print("Running with ISA: " + processor.get_isa().name) 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() print()
# Disable the gdb ports. Required for forking. # Disable the gdb ports. Required for forking.

View File

@@ -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" name = f"{cpu}-cpu_{str(num_cpus)}-cores_{mem_system}_kvm-fork-run-test"
verifiers = [] 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( gem5_verify_config(
name=name, name=name,
verifiers=verifiers, verifiers=verifiers,
@@ -83,9 +73,9 @@ def test_kvm_fork_run(cpu: str, num_cpus: int, mem_system: str, length: str):
resource_path, resource_path,
"--kernel-args=''", "--kernel-args=''",
], ],
valid_isas=(isa_to_use,), valid_isas=(constants.all_compiled_tag,),
valid_hosts=(constants.host_x86_64_tag,), valid_hosts=(constants.host_x86_64_tag,),
protocol=protocol_to_use, protocol=None,
length=length, length=length,
uses_kvm=True, uses_kvm=True,
) )

View File

@@ -46,7 +46,10 @@ from gem5.components.processors.simple_switchable_processor import (
) )
from gem5.isas import ISA from gem5.isas import ISA
from gem5.resources.resource import obtain_resource 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.exit_event import ExitEvent
from gem5.simulate.simulator import Simulator from gem5.simulate.simulator import Simulator
from gem5.utils.requires import requires 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 # Begin running of the simulation. This will exit once the Linux system boot
# is complete. # is complete.
print("Running with ISA: " + processor.get_isa().name) 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() print()
simulator = Simulator( simulator = Simulator(

View File

@@ -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" name = f"{cpu}-cpu_{str(num_cpus)}-cores_{mem_system}_kvm-switch-test"
verifiers = [] 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( gem5_verify_config(
name=name, name=name,
verifiers=verifiers, verifiers=verifiers,
@@ -81,9 +71,9 @@ def test_kvm_switch(cpu: str, num_cpus: int, mem_system: str, length: str):
resource_path, resource_path,
"--kernel-args=''", "--kernel-args=''",
], ],
valid_isas=(isa_to_use,), valid_isas=(constants.all_compiled_tag,),
valid_hosts=(constants.host_x86_64_tag,), valid_hosts=(constants.host_x86_64_tag,),
protocol=protocol_to_use, protocol=None,
length=length, length=length,
uses_kvm=True, uses_kvm=True,
) )

View File

@@ -62,7 +62,7 @@ for cpu in cpu_types:
"--cmd", "--cmd",
joinpath(base_path, binary), joinpath(base_path, binary),
], ],
valid_isas=(constants.sparc_tag,), valid_isas=(constants.all_compiled_tag,),
valid_hosts=constants.supported_hosts, valid_hosts=constants.supported_hosts,
length=constants.long_tag, length=constants.long_tag,
) )

View File

@@ -49,7 +49,7 @@ def test_replacement_policy(config_name: str, config_path: str) -> None:
"run_replacement_policy.py", "run_replacement_policy.py",
), ),
config_args=[config_name, config_path], config_args=[config_name, config_path],
valid_isas=(constants.null_tag,), valid_isas=(constants.all_compiled_tag,),
valid_hosts=constants.supported_hosts, valid_hosts=constants.supported_hosts,
length=constants.long_tag, length=constants.long_tag,
) )

View File

@@ -63,7 +63,7 @@ for isa in isa_map.keys():
"requires_check.py", "requires_check.py",
), ),
config_args=["-i", isa], config_args=["-i", isa],
valid_isas=(isa_map[isa],), valid_isas=(constants.all_compiled_tag,),
length=length_map[isa], length=length_map[isa],
) )

View File

@@ -77,7 +77,7 @@ def test_memory(
config_args=[generator, generator_cores, cache, module] config_args=[generator, generator_cores, cache, module]
+ [memory] + [memory]
+ list(args), + list(args),
valid_isas=(constants.null_all_ruby,), valid_isas=(constants.all_compiled_tag,),
valid_hosts=constants.supported_hosts, valid_hosts=constants.supported_hosts,
length=constants.quick_tag, length=constants.quick_tag,
) )

View File

@@ -59,16 +59,6 @@ def test_boot(
additional_config_args.append("--tick-exit") additional_config_args.append("--tick-exit")
additional_config_args.append(str(to_tick)) 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( gem5_verify_config(
name=name, name=name,
verifiers=verifiers, verifiers=verifiers,
@@ -96,9 +86,9 @@ def test_boot(
resource_path, resource_path,
] ]
+ additional_config_args, + additional_config_args,
valid_isas=(isa_to_use,), valid_isas=(constants.all_compiled_tag,),
valid_hosts=constants.supported_hosts, valid_hosts=constants.supported_hosts,
protocol=protocol_to_use, protocol=None,
length=length, length=length,
) )