From 61074f30cf744f26a8269a28aba9adb08fda1664 Mon Sep 17 00:00:00 2001 From: "michael.dong@rackspace.com" Date: Fri, 8 Apr 2016 17:02:25 -0500 Subject: [PATCH] Long fuzz strings now truncated in output Change-Id: Ib6f0951ef8f9eecb07c01540146f28641bdf4d4d --- syntribos/tests/fuzz/base_fuzz.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/syntribos/tests/fuzz/base_fuzz.py b/syntribos/tests/fuzz/base_fuzz.py index ce54ebdd..48dea328 100644 --- a/syntribos/tests/fuzz/base_fuzz.py +++ b/syntribos/tests/fuzz/base_fuzz.py @@ -250,9 +250,14 @@ class ImpactedParameter(object): self.name = name def as_dict(self): + trunc_string = self.fuzz_string + if len(self.fuzz_string) >= 512: + trunc_string = "{0}...({1} chars)...{2}".format( + self.fuzz_string[:256], len(self.fuzz_string), + self.fuzz_string[-256:]) return { "method": self.method, "location": self.location, "name": self.name, - "value": self.fuzz_string + "value": trunc_string }