[gem5-dev] Change in gem5/gem5[develop]: tests: Update RISCV boot tests to use Ubuntu resource
Bobby R. Bruce has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/52089 ) ( 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: tests: Update RISCV boot tests to use Ubuntu resource .. tests: Update RISCV boot tests to use Ubuntu resource This ubuntu disk image will execute an 'm5 exit' after boot and can therefore be used to execute "boot exit" tests as part of our long/nightly tests. These are included in this patch. Change-Id: Ia5bdb1bfc3d9100b2ea15e23bddb49f7c4faf32d Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52089 Tested-by: kokoro Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power --- M tests/gem5/riscv-boot-tests/test_linux_boot.py M tests/gem5/configs/riscv_boot_exit_run.py 2 files changed, 83 insertions(+), 22 deletions(-) Approvals: Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/tests/gem5/configs/riscv_boot_exit_run.py b/tests/gem5/configs/riscv_boot_exit_run.py index 93069f8..629a0d0 100644 --- a/tests/gem5/configs/riscv_boot_exit_run.py +++ b/tests/gem5/configs/riscv_boot_exit_run.py @@ -80,7 +80,7 @@ "-t", "--tick-exit", type=int, -required=True, +required=False, help="The tick to exit the simulation.", ) @@ -152,7 +152,7 @@ resource_directory=args.resource_directory, ), disk_image=Resource( -"riscv-disk-img", +"riscv-ubuntu-20.04-img", resource_directory=args.resource_directory, ), ) diff --git a/tests/gem5/riscv-boot-tests/test_linux_boot.py b/tests/gem5/riscv-boot-tests/test_linux_boot.py index 8cced2d..7c70d1d 100644 --- a/tests/gem5/riscv-boot-tests/test_linux_boot.py +++ b/tests/gem5/riscv-boot-tests/test_linux_boot.py @@ -26,6 +26,8 @@ import re +from typing import Optional + from testlib import * if config.bin_path: @@ -38,10 +40,11 @@ cpu: str, num_cpus: int, cache_type: str, -to_tick: int, length: str, +to_tick: Optional[int] = None, ): -name = "{}-cpu_{}-{}-cores_riscv-boot-test_to-tick".format( + +name = "{}-cpu_{}-{}-cores_riscv-boot-test".format( cpu, str(num_cpus), cache_type) verifiers = [] @@ -52,6 +55,21 @@ ) verifiers.append(verifier.MatchRegex(exit_regex)) +config_args=[ +"--cpu", +cpu, +"--num-cpus", +str(num_cpus), +"--mem-system", +cache_type, +"--resource-directory", +resource_path, +] + +if to_tick: +name += "_to-tick" +config_args += ["--tick-exit", str(to_tick)] + gem5_verify_config( name=name, verifiers=verifiers, @@ -63,18 +81,7 @@ "configs", "riscv_boot_exit_run.py", ), -config_args=[ -"--cpu", -cpu, -"--num-cpus", -str(num_cpus), -"--mem-system", -cache_type, -"--tick-exit", -str(to_tick), -"--resource-directory", -resource_path, -], +config_args=config_args, valid_isas=(constants.riscv_tag,), valid_hosts=constants.supported_hosts, length=length, @@ -87,46 +94,83 @@ cpu="atomic", num_cpus=1, cache_type="classic", -to_tick=100, # Simulates 1/100th of a second. length=constants.quick_tag, +to_tick=100, # Simulates 1/100th of a second. ) test_boot( cpu="timing", num_cpus=1, cache_type="classic", -to_tick=100, length=constants.quick_tag, +to_tick=100, ) test_boot( cpu="timing", num_cpus=1, cache_type="mi_example", -to_tick=100, length=constants.quick_tag, +to_tick=100, ) test_boot( cpu="o3", num_cpus=1, cache_type="classic", -to_tick=100, length=constants.quick_tag, +to_tick=100, ) test_boot( cpu="timing", num_cpus=4, cache_type="classic", -to_tick=100, length=constants.quick_tag, +to_tick=100, ) test_boot( cpu="timing", num_cpus=4, cache_type="mi_example", -to_tick=100, length=constants.quick_tag, +to_tick=100, +) + + The long (Nightly) tests + +test_boot( +cpu="atomic", +num_cpus=1, +cache_type="classic", +length=constants.long_tag, +) + +test_boot( +cpu="timing", +num_cpus=1, +cache_type="mi_example", +length=constants.long_tag, +) + +test_boot( +cpu="timing", +num_cpus=4, +cache_type="mi_example", +length=constants.long_tag, +) + +test_boot( +cpu="atomic", +num_cpus=4, +cache_type="classic", +length=constants.long_tag, +) + +test_boot( +cpu="o3",
[gem5-dev] Change in gem5/gem5[develop]: tests: Update RISCV boot tests to use Ubuntu resource
Bobby R. Bruce has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/52089 ) Change subject: tests: Update RISCV boot tests to use Ubuntu resource .. tests: Update RISCV boot tests to use Ubuntu resource This ubuntu disk image will execute an 'm5 exit' after boot and can therefore be used to execute "boot exit" tests as part of our long/nightly tests. These are included in this patch. Change-Id: Ia5bdb1bfc3d9100b2ea15e23bddb49f7c4faf32d --- M tests/gem5/riscv-boot-tests/test_linux_boot.py M tests/gem5/configs/riscv_boot_exit_run.py 2 files changed, 79 insertions(+), 22 deletions(-) diff --git a/tests/gem5/configs/riscv_boot_exit_run.py b/tests/gem5/configs/riscv_boot_exit_run.py index 57be8aa..5e7c15a 100644 --- a/tests/gem5/configs/riscv_boot_exit_run.py +++ b/tests/gem5/configs/riscv_boot_exit_run.py @@ -80,7 +80,7 @@ "-t", "--tick-exit", type=int, -required=True, +required=False, help="The tick to exit the simulation.", ) @@ -152,7 +152,7 @@ resource_directory=args.resource_directory, ), disk_image=Resource( -"riscv-disk-img", +"riscv-ubuntu-20.04-img", resource_directory=args.resource_directory, ), ) diff --git a/tests/gem5/riscv-boot-tests/test_linux_boot.py b/tests/gem5/riscv-boot-tests/test_linux_boot.py index 8cced2d..7c70d1d 100644 --- a/tests/gem5/riscv-boot-tests/test_linux_boot.py +++ b/tests/gem5/riscv-boot-tests/test_linux_boot.py @@ -26,6 +26,8 @@ import re +from typing import Optional + from testlib import * if config.bin_path: @@ -38,10 +40,11 @@ cpu: str, num_cpus: int, cache_type: str, -to_tick: int, length: str, +to_tick: Optional[int] = None, ): -name = "{}-cpu_{}-{}-cores_riscv-boot-test_to-tick".format( + +name = "{}-cpu_{}-{}-cores_riscv-boot-test".format( cpu, str(num_cpus), cache_type) verifiers = [] @@ -52,6 +55,21 @@ ) verifiers.append(verifier.MatchRegex(exit_regex)) +config_args=[ +"--cpu", +cpu, +"--num-cpus", +str(num_cpus), +"--mem-system", +cache_type, +"--resource-directory", +resource_path, +] + +if to_tick: +name += "_to-tick" +config_args += ["--tick-exit", str(to_tick)] + gem5_verify_config( name=name, verifiers=verifiers, @@ -63,18 +81,7 @@ "configs", "riscv_boot_exit_run.py", ), -config_args=[ -"--cpu", -cpu, -"--num-cpus", -str(num_cpus), -"--mem-system", -cache_type, -"--tick-exit", -str(to_tick), -"--resource-directory", -resource_path, -], +config_args=config_args, valid_isas=(constants.riscv_tag,), valid_hosts=constants.supported_hosts, length=length, @@ -87,46 +94,83 @@ cpu="atomic", num_cpus=1, cache_type="classic", -to_tick=100, # Simulates 1/100th of a second. length=constants.quick_tag, +to_tick=100, # Simulates 1/100th of a second. ) test_boot( cpu="timing", num_cpus=1, cache_type="classic", -to_tick=100, length=constants.quick_tag, +to_tick=100, ) test_boot( cpu="timing", num_cpus=1, cache_type="mi_example", -to_tick=100, length=constants.quick_tag, +to_tick=100, ) test_boot( cpu="o3", num_cpus=1, cache_type="classic", -to_tick=100, length=constants.quick_tag, +to_tick=100, ) test_boot( cpu="timing", num_cpus=4, cache_type="classic", -to_tick=100, length=constants.quick_tag, +to_tick=100, ) test_boot( cpu="timing", num_cpus=4, cache_type="mi_example", -to_tick=100, length=constants.quick_tag, +to_tick=100, +) + + The long (Nightly) tests + +test_boot( +cpu="atomic", +num_cpus=1, +cache_type="classic", +length=constants.long_tag, +) + +test_boot( +cpu="timing", +num_cpus=1, +cache_type="mi_example", +length=constants.long_tag, +) + +test_boot( +cpu="timing", +num_cpus=4, +cache_type="mi_example", +length=constants.long_tag, +) + +test_boot( +cpu="atomic", +num_cpus=4, +cache_type="classic", +length=constants.long_tag, +) + +test_boot( +cpu="o3", +num_cpus=8, +cache_type="mi_example", +length=constants.long_tag, ) -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52089 To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: Ia5bdb1bfc3d9100b2ea15e23bddb49f7c4faf32d