Skip to content
Snippets Groups Projects
Commit 3f863add authored by Petri Latvala's avatar Petri Latvala
Browse files

runner: Ensure generated json is properly UTF8-encoded

Sometimes tests output garbage (e.g. due to extreme occurrences of
drm/igt-gpu-tools#55

) but we
need to present the garbage as results.

We already ignore any test output after the first \0, and for the rest
of the bytes that are not directly UTF-8 as-is, we can quite easily
represent them with two-byte UTF-8 encoding.

libjson-c already expects the string you feed it through
json_object_new_string* functions to be UTF-8.

v2: Rebase, adjust for dynamic subtest parsing

Signed-off-by: default avatarPetri Latvala <petri.latvala@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> #v1
parent 2671f7a4
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment