Bobby Bruce has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/56829 )

 (

3 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
 )Change subject: tests: Add 'kvm' tag to tests
......................................................................

tests: Add 'kvm' tag to tests

Some of our tests require KVM. Tagging these tests as such allow us to
filter them in or out during testing.

Change-Id: I3f188d3e268409535043cc32b64d99e4657638cd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/56829
Reviewed-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M ext/testlib/configuration.py
M tests/gem5/fs/linux/arm/test.py
M tests/gem5/gem5_library_example_tests/test_gem5_library_examples.py
M tests/gem5/kvm-fork-tests/test_kvm_fork_run.py
M tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py
M tests/gem5/parsec-benchmarks/test_parsec.py
M tests/gem5/suite.py
7 files changed, 38 insertions(+), 3 deletions(-)

Approvals:
  Giacomo Travaglini: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/ext/testlib/configuration.py b/ext/testlib/configuration.py
index 95800de..c61a809 100644
--- a/ext/testlib/configuration.py
+++ b/ext/testlib/configuration.py
@@ -254,6 +254,8 @@
     constants.host_x86_64_tag = 'x86_64'
     constants.host_arm_tag = 'aarch64'

+    constants.kvm_tag = 'kvm'
+
     constants.supported_tags = {
         constants.isa_tag_type : (
             constants.x86_tag,
diff --git a/tests/gem5/fs/linux/arm/test.py b/tests/gem5/fs/linux/arm/test.py
index 5b64c80..6184a75 100644
--- a/tests/gem5/fs/linux/arm/test.py
+++ b/tests/gem5/fs/linux/arm/test.py
@@ -135,7 +135,8 @@
         valid_isas=(constants.arm_tag,),
         length=constants.quick_tag,
         valid_hosts=valid_hosts,
-        fixtures=(arm_fs_binaries,)
+        fixtures=(arm_fs_binaries,),
+        uses_kvm= name in arm_fs_kvm_tests,
     )

 for name in arm_fs_long_tests:
@@ -151,5 +152,6 @@
         config_args=args,
         valid_isas=(constants.arm_tag,),
         length=constants.long_tag,
-        fixtures=(arm_fs_binaries,)
+        fixtures=(arm_fs_binaries,),
+        uses_kvm= name in arm_fs_kvm_tests,
     )
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 6f3300d..f05bb6d 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
@@ -70,6 +70,7 @@
         valid_isas=(constants.x86_tag,),
         valid_hosts=constants.supported_hosts,
         length=constants.long_tag,
+        uses_kvm=True,
     )

 gem5_verify_config(
@@ -108,6 +109,7 @@
         protocol="MESI_Two_Level",
         valid_hosts=constants.supported_hosts,
         length=constants.long_tag,
+        uses_kvm=True,
     )

 if os.access("/dev/kvm", mode=os.R_OK | os.W_OK):
@@ -135,6 +137,7 @@
         protocol="MESI_Two_Level",
         valid_hosts=constants.supported_hosts,
         length=constants.long_tag,
+        uses_kvm=True,
     )

 if os.access("/dev/kvm", mode=os.R_OK | os.W_OK):
@@ -156,6 +159,7 @@
         protocol="MESI_Two_Level",
         valid_hosts=constants.supported_hosts,
         length=constants.long_tag,
+        uses_kvm=True,
     )

 gem5_verify_config(
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 e3a6e64..ddb91c1 100644
--- a/tests/gem5/kvm-fork-tests/test_kvm_fork_run.py
+++ b/tests/gem5/kvm-fork-tests/test_kvm_fork_run.py
@@ -89,6 +89,7 @@
         valid_hosts=constants.supported_hosts,
         protocol=protocol_to_use,
         length=length,
+        uses_kvm=True,
     )


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 62ae30c..ffddaa0 100644
--- a/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py
+++ b/tests/gem5/kvm-switch-tests/test_kvm_cpu_switch.py
@@ -87,6 +87,7 @@
         valid_hosts=constants.supported_hosts,
         protocol=protocol_to_use,
         length=length,
+        uses_kvm=True,
     )


diff --git a/tests/gem5/parsec-benchmarks/test_parsec.py b/tests/gem5/parsec-benchmarks/test_parsec.py
index 4e10e6e..b659046 100644
--- a/tests/gem5/parsec-benchmarks/test_parsec.py
+++ b/tests/gem5/parsec-benchmarks/test_parsec.py
@@ -88,6 +88,7 @@
         valid_isas=(constants.x86_tag,),
         valid_hosts=constants.supported_hosts,
         length=length,
+        uses_kvm=True,
     )


diff --git a/tests/gem5/suite.py b/tests/gem5/suite.py
index cef3e7d..354c8ef 100644
--- a/tests/gem5/suite.py
+++ b/tests/gem5/suite.py
@@ -59,7 +59,9 @@
                        valid_variants=constants.supported_variants,
                        length=constants.supported_lengths[0],
                        valid_hosts=constants.supported_hosts,
-                       protocol=None):
+                       protocol=None,
+                       uses_kvm=False,
+                    ):
     '''
     Helper class to generate common gem5 tests using verifiers.

@@ -84,6 +86,9 @@

     :param valid_variants: An iterable with the variant levels that
         this test can be ran for. (E.g. opt, debug)
+
+    :param uses_kvm: States if this verifier uses KVM. If so, the "kvm" tag
+        will be included.
     '''
     fixtures = list(fixtures)
     testsuites = []
@@ -123,6 +128,9 @@
                 # Add the isa and variant to tags list.
                 tags = [isa, opt, length, host]

+                if uses_kvm:
+                    tags.append(constants.kvm_tag)
+
                 # Create the gem5 target for the specific architecture and
                 # variant.
                 _fixtures = copy.copy(fixtures)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/56829
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: I3f188d3e268409535043cc32b64d99e4657638cd
Gerrit-Change-Number: 56829
Gerrit-PatchSet: 5
Gerrit-Owner: Bobby Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Bobby Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Hoa Nguyen <hoangu...@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