This is an archive of the discontinued LLVM Phabricator instance.

Add test for functions with extended characters.
AbandonedPublic

Authored by nealsid on Jun 16 2021, 8:17 PM.

Details

Reviewers
teemperor
Group Reviewers
Restricted Project
Summary

This small patch adds a test for functions & lldb commands with unicode characters in them.

Diff Detail

Event Timeline

nealsid requested review of this revision.Jun 16 2021, 8:17 PM
nealsid created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJun 16 2021, 8:17 PM
nealsid updated this revision to Diff 352612.Jun 16 2021, 8:18 PM

Add newline.

teemperor requested changes to this revision.Jun 17 2021, 1:52 AM
teemperor added a subscriber: teemperor.

Thanks for writing tests, it's really appreciated! FWIW, I think that you can just check in new tests without having to go through a full review (unless you do want feedback for it).

Having said that, would it be possible to maybe just extend the TestUnicodeSymbols.py test for the breakpoint part? You could just try setting a breakpoint and see if it gets resolved, this way the test doesn't have to start a new process (which is really expensive). There is also already a test for unicode variables (TestUnicodeInVariable.py)so this is redundant IIUC.

This revision now requires changes to proceed.Jun 17 2021, 1:52 AM

Ah, my grep/find skills clearly failed me :)

Yeah, those tests are exactly the same scenarios. However, if I understand correctly, don't they use the API? I wanted to add some coverage for the shell because I'm making changes to the Editline wrapper, and the existing tests don't appear to cover user input from the command line. But maybe I'm missing how those two tie together. Thanks.

It's quite common to use the lldbtest.TestBase.runCmd or lldbtest.TestBase.expect to test command line commands in the API tests. The latter has expect-like results checking which makes writing these checks easy. Even if you are testing a command-line command, driving to the point where you want to do the check is often easier with the API & the lldbutil helpers, so it's okay to intersperse these among the API uses.

Ah, my grep/find skills clearly failed me :)

Yeah, those tests are exactly the same scenarios. However, if I understand correctly, don't they use the API? I wanted to add some coverage for the shell because I'm making changes to the Editline wrapper, and the existing tests don't appear to cover user input from the command line. But maybe I'm missing how those two tie together. Thanks.

There is also test/API/iohandler/unicode/TestUnicode.py which is starting a terminal and enters some unicode stuff :)

Thanks to both of you for this! I’m traveling for a few days but will be able to take a look towards the end of the week.

Agreed, it looks like there's plenty of test coverage for this scenario, so I'll revert this patch - sorry about that. I'm working on removing the wchar/char preprocessor logic in Editline.cpp so I'll verify the existing coverage before sending that for review. Thanks.

nealsid abandoned this revision.Jun 27 2021, 9:28 PM

Not needed with existing test coverage.