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 <noreply+kok...@google.com>
Reviewed-by: Jason Lowe-Power <power...@gmail.com>
Maintainer: Jason Lowe-Power <power...@gmail.com>
---
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=10000000000,  # Simulates 1/100th of a second.
     length=constants.quick_tag,
+    to_tick=10000000000,  # Simulates 1/100th of a second.
 )

 test_boot(
     cpu="timing",
     num_cpus=1,
     cache_type="classic",
-    to_tick=10000000000,
     length=constants.quick_tag,
+    to_tick=10000000000,
 )

 test_boot(
     cpu="timing",
     num_cpus=1,
     cache_type="mi_example",
-    to_tick=10000000000,
     length=constants.quick_tag,
+    to_tick=10000000000,
 )

 test_boot(
     cpu="o3",
     num_cpus=1,
     cache_type="classic",
-    to_tick=10000000000,
     length=constants.quick_tag,
+    to_tick=10000000000,
 )

 test_boot(
     cpu="timing",
     num_cpus=4,
     cache_type="classic",
-    to_tick=10000000000,
     length=constants.quick_tag,
+    to_tick=10000000000,
 )

 test_boot(
     cpu="timing",
     num_cpus=4,
     cache_type="mi_example",
-    to_tick=10000000000,
     length=constants.quick_tag,
+    to_tick=10000000000,
+)
+
+#### 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
Gerrit-Change-Number: 52089
Gerrit-PatchSet: 13
Gerrit-Owner: Bobby R. Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Bobby R. Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to