[llvm-bugs] [Bug 40702] New: lit on Windows crashes when launched from bash implementation using Python3

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Feb 12 05:18:03 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=40702

            Bug ID: 40702
           Summary: lit on Windows crashes when launched from bash
                    implementation using Python3
           Product: Test Suite
           Version: trunk
          Hardware: PC
                OS: other
            Status: NEW
          Severity: normal
          Priority: P
         Component: lit
          Assignee: unassignedbugs at nondot.org
          Reporter: lvs at ispras.ru
                CC: daniel at zuster.org, llvm-bugs at lists.llvm.org

Created attachment 21471
  --> https://bugs.llvm.org/attachment.cgi?id=21471&action=edit
possible fix

Currently, when using Windows with a bash implementation, for example MSYS2,
test scripts are opened with the 'byte' flag to avoid Python adding \r\n line
endings. This works in Python 2.7, but in Python 3 it results in an error like
this:

Traceback (most recent call last):
  File "/home/lvs/safecompiler/lit/lit/run.py", line 202, in _execute_test_impl
    result = test.config.test_format.execute(test, lit_config)
  File "/home/lvs/safecompiler/lit/lit/formats/shtest.py", line 25, in execute
    self.execute_external)
  File "/home/lvs/safecompiler/lit/lit/TestRunner.py", line 1576, in
executeShTest
    res = _runShTest(test, litConfig, useExternalSh, script, tmpBase)
  File "/home/lvs/safecompiler/lit/lit/TestRunner.py", line 1522, in _runShTest
    res = executeScript(test, litConfig, tmpBase, script, execdir)
  File "/home/lvs/safecompiler/lit/lit/TestRunner.py", line 1102, in
executeScript
    f.write('{ ' + '; } &&\n{ '.join(commands) + '; }')

Attached is a possible patch for this bug.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190212/42034b18/attachment.html>


More information about the llvm-bugs mailing list