Bug 204493 - test262-runner should dump YAML with correct encoding
Summary: test262-runner should dump YAML with correct encoding
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ross Kirsling
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-11-21 23:47 PST by Ross Kirsling
Modified: 2019-11-30 20:21 PST (History)
7 users (show)

See Also:


Attachments
Patch (182.73 KB, patch)
2019-11-22 14:11 PST, Ross Kirsling
no flags Details | Formatted Diff | Diff
Patch (181.87 KB, patch)
2019-11-23 15:51 PST, Ross Kirsling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Kirsling 2019-11-21 23:47:44 PST
It's pretty annoying that Test262's expectations.yaml is filled with lines like this:
> 'Test262Error: Expected SameValue(«», «a») to be true'

This text garbling does not happen in the terminal output.

The issue seems to be that we are encoding to (and decoding) UTF8 an extra time when dumping to (and loading from) file.

Indeed, if we remove the `binmode $OUT, ':utf8';` lines in this file, the problem goes away:
https://github.com/WebKit/webkit/blob/master/Tools/Scripts/test262/local/lib/perl5/YAML.pm

But I'm not sure that we want to fix that library directly? And I have no idea how this can be fixed from Runner.pm itself.
Comment 1 Ross Kirsling 2019-11-22 14:11:50 PST
Created attachment 384193 [details]
Patch
Comment 2 Ross Kirsling 2019-11-22 14:19:23 PST
This is actually pretty hilarious because the Formatted Diff screen seems to perform *yet another* layer of encoding.

You can confirm the actual output by viewing the patch directly or visiting the old Diff screen.
Comment 3 Ross Kirsling 2019-11-23 15:51:31 PST
Created attachment 384246 [details]
Patch
Comment 4 Ross Kirsling 2019-11-26 10:14:10 PST
Ping?
Comment 5 WebKit Commit Bot 2019-11-30 20:20:45 PST
Comment on attachment 384246 [details]
Patch

Clearing flags on attachment: 384246

Committed r252964: <https://trac.webkit.org/changeset/252964>
Comment 6 WebKit Commit Bot 2019-11-30 20:20:47 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2019-11-30 20:21:18 PST
<rdar://problem/57542192>