Skip to content
Snippets Groups Projects
Forked from drm / igt-gpu-tools
Source project has a limited visibility.
  • Petri Latvala's avatar
    3f863add
    runner: Ensure generated json is properly UTF8-encoded · 3f863add
    Petri Latvala authored
    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
    3f863add
    History
    runner: Ensure generated json is properly UTF8-encoded
    Petri Latvala authored
    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