This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ][z/OS][libcxx]: fix libcxx test cases related to codecvt class UTF8
ClosedPublic

Authored by NancyWang2222 on Jul 16 2021, 7:28 AM.

Details

Summary

This PR to fix a few test cases related to class https://en.cppreference.com/w/cpp/locale/codecvt , as mentioned in document, class is converting UTF16 and UTF8 or UTF32 and UTF8, character type is deprecated in c++20 and it needs explicitly specify it is UTF8 string literal. Current test cases assume 1 byte character is ASCII or Unicode character which is not true on z/OS platform. UTF8/16/32 information can be found in https://naveenr.net/unicode-character-set-and-utf-8-utf-16-utf-32-encoding/ and EBCDIC and ASCII character value can be found in http://www.simotime.com/asc2ebc1.htm

Diff Detail

Event Timeline

NancyWang2222 requested review of this revision.Jul 16 2021, 7:28 AM
NancyWang2222 created this revision.

do we know why build are failing ?

Quuxplusone added inline comments.
libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_in.pass.cpp
34

do we know why builds are failing?

Same as in the other patch D106151: u8"some text" is a syntax error in C++03, so (only) the C++03 run is failing.

NancyWang2222 added inline comments.Jul 16 2021, 10:33 AM
libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_in.pass.cpp
34

OK. should we disable those test to avoid run with c++20 then ? I can modify test case to run only ASCII mode if we keep old form.

NancyWang2222 added inline comments.Jul 16 2021, 10:42 AM
libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_in.pass.cpp
34

OK. I can keep old form. just run ASCII mode on z/OS for both patch.

change test cases to be unsupported on z/OS

hi Arthur O'Dwyer , I have updated test, can you review it? Thanks

Quuxplusone added a subscriber: ldionne.

Same as D106151: if @ldionne approves the use of the regex (either here or there or both), then I'd think you can land both D106151 and D106153.

This revision is now accepted and ready to land.Jul 20 2021, 8:30 AM
ldionne accepted this revision.Jul 20 2021, 8:57 AM

LGTM, but please add a 1-2 line comment for each UNSUPPORTED explaining why it fails. You can copy/paste the comment, it's fine. Actually, it even helps cause you can then grep for:

// <the-comment>
// UNSUPPORTED: target={{.+}}-zos{{.*}}

and you'll find all tests that are marked as unsupported for the same reason.

Herald added a project: Restricted Project. · View Herald TranscriptJul 20 2021, 10:03 AM

LGTM, but please add a 1-2 line comment for each UNSUPPORTED explaining why it fails. You can copy/paste the comment, it's fine. Actually, it even helps cause you can then grep for:

// <the-comment>
// UNSUPPORTED: target={{.+}}-zos{{.*}}

and you'll find all tests that are marked as unsupported for the same reason.

@muiez

Please read the comments even when you get an approval. https://reviews.llvm.org/rG7704fedfff6ef5676adb6415f3be0ac927d1a746 didn't apply my requested change. I LGTM'd the patch because I trusted you'd apply the feedback and didn't want to block you until I could look at it again -- not because no changes were required.

LGTM, but please add a 1-2 line comment for each UNSUPPORTED explaining why it fails. You can copy/paste the comment, it's fine. Actually, it even helps cause you can then grep for:

// <the-comment>
// UNSUPPORTED: target={{.+}}-zos{{.*}}

and you'll find all tests that are marked as unsupported for the same reason.

@muiez

Please read the comments even when you get an approval. https://reviews.llvm.org/rG7704fedfff6ef5676adb6415f3be0ac927d1a746 didn't apply my requested change. I LGTM'd the patch because I trusted you'd apply the feedback and didn't want to block you until I could look at it again -- not because no changes were required.

hi nothing to do w3ith Muiez, I asked his help to commit it for me. I didnt notice your comments. I can add comment no problem