[all-commits] [llvm/llvm-project] ff94f6: [lldb] [testsuite] Fix false failures on "\n" rege...
Jan Kratochvil via All-commits
all-commits at lists.llvm.org
Sun Sep 12 22:38:11 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ff94f6024082ecd6b8a236b0953d3ce2d240cc64
https://github.com/llvm/llvm-project/commit/ff94f6024082ecd6b8a236b0953d3ce2d240cc64
Author: Jan Kratochvil <jan.kratochvil at redhat.com>
Date: 2021-09-13 (Mon, 13 Sep 2021)
Changed paths:
M lldb/packages/Python/lldbsuite/test/tools/lldb-server/lldbgdbserverutils.py
Log Message:
-----------
[lldb] [testsuite] Fix false failures on "\n" regex match
Regex is matching a binary so it needs `re.DOTALL`.
vFile:fstat packet data ATTACHMENT is not hex-encoded but it is only
escaped.
It is difficult to reproduce, it came from buildbot:
https://lab.llvm.org/staging/#/builders/16/builds/10597
******************** TEST 'lldb-api :: tools/lldb-server/TestGdbRemotePlatformFile.py' FAILED ********************
FAIL: test_platform_file_fstat_llgs (TestGdbRemotePlatformFile.TestGdbRemotePlatformFile)
----------------------------------------------------------------------
Traceback (most recent call last):
File "lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py", line 52, in test_method
return attrvalue(self)
File "lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py", line 259, in test_platform_file_fstat
context = self.expect_gdbremote_sequence()
File "lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py", line 621, in expect_gdbremote_sequence
return expect_lldb_gdbserver_replay(
File "lldb/packages/Python/lldbsuite/test/tools/lldb-server/lldbgdbserverutils.py", line 198, in expect_lldb_gdbserver_replay
context = sequence_entry.assert_match(
File "lldb/packages/Python/lldbsuite/test/tools/lldb-server/lldbgdbserverutils.py", line 479, in assert_match
return self._assert_regex_match(asserter, actual_packet, context)
File "lldb/packages/Python/lldbsuite/test/tools/lldb-server/lldbgdbserverutils.py", line 446, in _assert_regex_match
asserter.fail(
AssertionError: regex '^\$F([0-9a-fA-F]+);(.*)#[0-9a-fA-F]{2}$' failed to match against content '$F40;^@^@^@ ^@
^C<8d>^@^@<81><80>^@^@^@^A^@^@^CX^@^@^CX^@^@^@^@^@^@^@^@^@^@^@^W^@^@^@^@^@^@^P^@^@^@^@^@^@^@^@
a=XXa=XXa=XX#6b'
More information about the All-commits
mailing list