gem5-dev@gem5.org

The gem5 Developer List

View all threads

[S] Change in gem5/gem5[develop]: tests: Check if ARM/gem5.opt not built in test_hdf5.py

BB
Bobby Bruce (Gerrit)
Tue, Mar 28, 2023 6:46 AM

Bobby Bruce has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/69239?usp=email )

Change subject: tests: Check if ARM/gem5.opt not built in test_hdf5.py
......................................................................

tests: Check if ARM/gem5.opt not built in test_hdf5.py

This test was failing to load as ARM/gem5.opt is not built when this
test is pased during the Weekly tests. This bug is highlighed here:
https://gem5.atlassian.net/browse/GEM5-1073.

Comments have been added explaining this issue and the test not fails
more quitely. It, however, is not run.

Change-Id: I1f26f541a15438f6124a7541c01d44f70647762a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69239
Tested-by: kokoro noreply+kokoro@google.com
Reviewed-by: Jason Lowe-Power power.jg@gmail.com
Maintainer: Jason Lowe-Power power.jg@gmail.com

M tests/gem5/stats/test_hdf5.py
1 file changed, 12 insertions(+), 0 deletions(-)

Approvals:
Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass

diff --git a/tests/gem5/stats/test_hdf5.py b/tests/gem5/stats/test_hdf5.py
index 993534a..8775d22 100644
--- a/tests/gem5/stats/test_hdf5.py
+++ b/tests/gem5/stats/test_hdf5.py
@@ -39,6 +39,12 @@
It just runs an SE simulation with the hdf5 stats and checks that the
simulation succeeds and the stats file exists.
No specific checks on the stats are performed.
+
+Important Note: This test has a major design flaw, noted here:
+https://gem5.atlassian.net/browse/GEM5-1073.
+It will not run if the build/ARM/gem5.opt has not been built. As this is
not
+built prior to this test being processed during the Weekly run, this test
is
+not run.
"""
import re
import os
@@ -54,6 +60,12 @@
have_hdf5_file = os.path.join(
config.base_dir, "build",
constants.arm_tag, "config", "have_hdf5.hh"
)

  • if not os.path.exists(have_hdf5_file):
  •    # This will most likely happen if the file has yet to have been
    
  •    # compiled. It should be noted that this case is likely. This is  
    

not

  •    # a good test as checking if hdf5 is available requires compilation
    
  •    # which is not assumed to be true at this stage in the test.
    
  •    return False
    with open(have_hdf5_file) as f:
        content = f.read()
    

--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/69239?usp=email
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: I1f26f541a15438f6124a7541c01d44f70647762a
Gerrit-Change-Number: 69239
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby Bruce bbruce@ucdavis.edu
Gerrit-Reviewer: Bobby Bruce bbruce@ucdavis.edu
Gerrit-Reviewer: Jason Lowe-Power power.jg@gmail.com
Gerrit-Reviewer: kokoro noreply+kokoro@google.com
Gerrit-MessageType: merged

Bobby Bruce has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/69239?usp=email ) Change subject: tests: Check if ARM/gem5.opt not built in test_hdf5.py ...................................................................... tests: Check if ARM/gem5.opt not built in test_hdf5.py This test was failing to load as ARM/gem5.opt is not built when this test is pased during the Weekly tests. This bug is highlighed here: https://gem5.atlassian.net/browse/GEM5-1073. Comments have been added explaining this issue and the test not fails more quitely. It, however, is not run. Change-Id: I1f26f541a15438f6124a7541c01d44f70647762a Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69239 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> --- M tests/gem5/stats/test_hdf5.py 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/tests/gem5/stats/test_hdf5.py b/tests/gem5/stats/test_hdf5.py index 993534a..8775d22 100644 --- a/tests/gem5/stats/test_hdf5.py +++ b/tests/gem5/stats/test_hdf5.py @@ -39,6 +39,12 @@ It just runs an SE simulation with the hdf5 stats and checks that the simulation succeeds and the stats file exists. No specific checks on the stats are performed. + +**Important Note**: This test has a major design flaw, noted here: +https://gem5.atlassian.net/browse/GEM5-1073. +It will not run if the build/ARM/gem5.opt has not been built. As this is not +built prior to this test being processed during the Weekly run, this test is +not run. """ import re import os @@ -54,6 +60,12 @@ have_hdf5_file = os.path.join( config.base_dir, "build", constants.arm_tag, "config", "have_hdf5.hh" ) + if not os.path.exists(have_hdf5_file): + # This will most likely happen if the file has yet to have been + # compiled. It should be noted that this case is likely. This is not + # a good test as checking if hdf5 is available requires compilation + # which is not assumed to be true at this stage in the test. + return False with open(have_hdf5_file) as f: content = f.read() -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/69239?usp=email 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: I1f26f541a15438f6124a7541c01d44f70647762a Gerrit-Change-Number: 69239 Gerrit-PatchSet: 2 Gerrit-Owner: Bobby Bruce <bbruce@ucdavis.edu> Gerrit-Reviewer: Bobby Bruce <bbruce@ucdavis.edu> Gerrit-Reviewer: Jason Lowe-Power <power.jg@gmail.com> Gerrit-Reviewer: kokoro <noreply+kokoro@google.com> Gerrit-MessageType: merged