[Lldb-commits] [PATCH] test: ignore IOError in Base.deletePexpectChild and clean TestMySyntax test

Ilia K ki.stfu at gmail.com
Tue Dec 16 08:02:38 PST 2014


Hello,

>RE: IOError may happen when child already exited but dotest has missed
this and tries to exit using 'child.sendline("quit")'
Actually it's OSError (not IOError):

======================================================================
ERROR: test_lldbmi_tokens (TestMiSyntax.MiSyntaxTestCase)
   Test that 'lldb-mi --interpreter' echos command tokens.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/IliaK/p/llvm_delphi/tools/lldb/test/lldbtest.py", line 1770,
in tearDown
    Base.tearDown(self)
  File "/Users/IliaK/p/llvm_delphi/tools/lldb/test/lldbtest.py", line 1092,
in tearDown
    self.deletePexpectChild()
  File "/Users/IliaK/p/llvm_delphi/tools/lldb/test/lldbtest.py", line 1074,
in deletePexpectChild
    self.child.sendline('settings set interpreter.prompt-on-quit false')
  File "/Users/IliaK/p/llvm_delphi/tools/lldb/test/pexpect-2.4/pexpect.py",
line 966, in sendline
    n = self.send(s)
  File "/Users/IliaK/p/llvm_delphi/tools/lldb/test/pexpect-2.4/pexpect.py",
line 958, in send
    c = os.write(self.child_fd, s)
OSError: [Errno 5] Input/output error
Config=x86_64-clang

Therefore I updated lldbtest_ignore_ioerror_on_theardown.patch file.
Btw, may be better to filter only IO errors from OSError class? It'll look
like:

{code}
try:
    ...
except (ValueError, pexpect.ExceptionPexpect):
    # child is already terminated
    pass
except OSError, e:
    if e.errno != errno.EIO:
        # unexpected exception
        raise
    # child is already terminated
    pass
finally:
    ...
{code}

Thanks,
Ilia


On Tue, Dec 16, 2014 at 4:42 PM, Ilia K <ki.stfu at gmail.com> wrote:
>
> Hello,
>
> I found the following:
> IOError may happen when child already exited but dotest has missed this
> and tries to exit using 'child.sendline("quit")'
>
> Also, I clean syntax test. -exec-run no hangs more and 'quit' isn't needed
> at exit.
>
> Thanks,
> Ilia
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20141216/bfad6084/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lldbtest_ignore_ioerror_on_theardown.v2.patch
Type: application/octet-stream
Size: 588 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20141216/bfad6084/attachment.obj>


More information about the lldb-commits mailing list