From bcfa988a671b68959be04de832263be006209ea6 Mon Sep 17 00:00:00 2001 From: Erin Le Date: Thu, 14 Nov 2024 14:20:32 -0800 Subject: [PATCH] tests, scons: Fix Testlib test failures This commit changes the fs/linux/arm and learning_gem5 tests as they were previously failing with the Ruby change. The fs/linux/arm long tests require the addition of a new gem5 build, ARM_X86, which builds the ARM and X86 ISAs with the MESI_Two_Level cache hierarchy. --- build_opts/ARM_X86 | 6 ++++++ configs/learning_gem5/part3/test_caches.py | 2 +- ext/testlib/configuration.py | 3 +++ tests/gem5/fs/linux/arm/test.py | 2 +- tests/gem5/learning_gem5/part3_test.py | 2 -- 5 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 build_opts/ARM_X86 diff --git a/build_opts/ARM_X86 b/build_opts/ARM_X86 new file mode 100644 index 0000000000..9f622c6211 --- /dev/null +++ b/build_opts/ARM_X86 @@ -0,0 +1,6 @@ +BUILD_ISA=y +USE_ARM_ISA=y +USE_X86_ISA=y +RUBY=y +PROTOCOL="MESI_Two_Level" +RUBY_PROTOCOL_MESI_Two_Level=y diff --git a/configs/learning_gem5/part3/test_caches.py b/configs/learning_gem5/part3/test_caches.py index c987551377..32df2ba236 100644 --- a/configs/learning_gem5/part3/test_caches.py +++ b/configs/learning_gem5/part3/test_caches.py @@ -47,7 +47,7 @@ from m5.util import fatal class TestCacheSystem(RubySystem): def __init__(self): - if buildEnv["PROTOCOL"] != "MSI": + if not "RUBY_PROTOCOL_MSI" in buildEnv: fatal("This system assumes MSI from learning gem5!") super().__init__() diff --git a/ext/testlib/configuration.py b/ext/testlib/configuration.py index 92a9df85f0..ed0f6550d4 100644 --- a/ext/testlib/configuration.py +++ b/ext/testlib/configuration.py @@ -255,6 +255,9 @@ def define_constants(constants): constants.all_compiled_tag = "ALL" constants.null_all_ruby = "NULL_All_Ruby" + # Need this build in order to run the fs/linux/arm testlib tests. + constants.arm_x86_tag = "ARM_X86" + constants.variant_tag_type = "variant" constants.opt_tag = "opt" constants.debug_tag = "debug" diff --git a/tests/gem5/fs/linux/arm/test.py b/tests/gem5/fs/linux/arm/test.py index 6cceea0e37..067ab6e055 100644 --- a/tests/gem5/fs/linux/arm/test.py +++ b/tests/gem5/fs/linux/arm/test.py @@ -169,7 +169,7 @@ for name in arm_fs_long_tests: verifiers=verifier_list(name), # TODO: Add basic stat verifiers config=joinpath(filepath, "run.py"), config_args=args, - valid_isas=(constants.all_compiled_tag,), + valid_isas=(constants.arm_x86_tag,), length=constants.long_tag, fixtures=(arm_fs_binaries,), uses_kvm=name in arm_fs_kvm_tests, diff --git a/tests/gem5/learning_gem5/part3_test.py b/tests/gem5/learning_gem5/part3_test.py index 668f57dc25..48863ad97f 100644 --- a/tests/gem5/learning_gem5/part3_test.py +++ b/tests/gem5/learning_gem5/part3_test.py @@ -38,7 +38,6 @@ gem5_verify_config( verifiers=(verifier.MatchStdoutNoPerf(joinpath(ref_path, "threads")),), config=joinpath(config_path, "simple_ruby.py"), config_args=[], - protocol="MSI", # Currently only x86 has the threads test valid_isas=(constants.all_compiled_tag,), # dynamically linked @@ -51,7 +50,6 @@ gem5_verify_config( verifiers=(verifier.MatchStdout(joinpath(ref_path, "test")),), config=joinpath(config_path, "ruby_test.py"), config_args=[], - protocol="MSI", # Currently only x86 has the threads test valid_isas=(constants.all_compiled_tag,), length=constants.long_tag,