[lldb] Fix a bug in the decorator matching logic.
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 13 Apr 2022 22:02:39 +0000 (15:02 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 13 Apr 2022 22:07:33 +0000 (15:07 -0700)
commit343f3de559c636dcec941613dca91e4fff6547a3
tree7bc59f989030918c00be42021c253401b09c3efa
parentbf38bdf7b3c8c8d84425188fc6d0db20adea39ad
[lldb] Fix a bug in the decorator matching logic.

This changes the decorator helper `_match_decorator_property` to
consider `None` as the actual value as not a match. Using `None` for the
pattern continues to be considered a match.

I discovered the issue because marking a test as NO_DEBUG_INFO_TESTCASE
will cause the call to `self.getDebugInfo()` to return `None` and
incorrectly skip or XFAIL the corresponding test.

I used the above scenario to create a test for the decorators.

Differential revision: https://reviews.llvm.org/D123401
lldb/packages/Python/lldbsuite/test/decorators.py
lldb/test/API/test_utils/TestDecorators.py [new file with mode: 0644]