diff options
author | David Sommerseth <davids@redhat.com> | 2014-01-22 20:01:26 +0100 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2014-01-22 20:01:26 +0100 |
commit | 6c79497f5f06b61977fef3a951c35f0ba6548752 (patch) | |
tree | 706ecc7473a9f4092a1ce6827ae2a8d1c85be4bf | |
parent | f4ba909ba4bb3842017438d9f3eaa3a93ded3d83 (diff) | |
download | rteval-work/v2.0.tar.gz rteval-work/v2.0.tar.xz rteval-work/v2.0.zip |
Add some input data validation when parsing the output histogram from cyclictestwork/v2.0
Backport of commit e0ca74e9c9f7f83a9db08d062b5ca8bdf05ff748 from v1.3x
Signed-off-by: Clark Williams <clark.williams@gmail.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
-rw-r--r-- | rteval/modules/measurement/cyclictest.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rteval/modules/measurement/cyclictest.py b/rteval/modules/measurement/cyclictest.py index 77acd22..a15f6e7 100644 --- a/rteval/modules/measurement/cyclictest.py +++ b/rteval/modules/measurement/cyclictest.py @@ -299,7 +299,15 @@ class Cyclictest(rtevalModulePrototype): self.__breaktraceval = int(line.split(':')[1]) continue + # Skipping blank lines + if len(line) == 0: + continue + vals = line.split() + if len(vals) == 0: + # If we don't have any values, don't try parsing + continue + index = int(vals[0]) for i in range(0, len(self.__cyclicdata)-1): if str(i) not in self.__cyclicdata: continue |