[Piglit] use JSON to report between tests and the python framework

Dylan Baker baker.dylan.c at gmail.com
Thu Jun 19 18:15:39 PDT 2014


bump

On Wednesday, June 11, 2014 04:32:30 PM Dylan Baker wrote:
> This series replaces the use of eval() in
> exectest.PiglitTest.interpret_restul() with json.loads(). This has a
> couple of advantages. First, eval compiles code on the fly, and is known
> to be slow. It's better not to use eval whenever possible for that
> reason alone. But the more serious problem is that eval() allows for
> arbitrary code execution.
> 
> Fortunately for us python dicts (which is what we use eval() on) looks a
> lot like JSON, and we already ahve a fast JSON library available.
> 
> Patch 1 replaces eval() with json
> Patch 2 makes subtest reporting simpler, by leveraging JSON
> Patch 3 removes some extra whitespce in our output, I'm kinda iffy on
> whether this patch is worth it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140619/0d4dc95f/attachment.sig>


More information about the Piglit mailing list