From 63f358baad966a58bd453bd23f5fbcfa899df4c2 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Tue, 18 Feb 2014 21:33:10 +0000 Subject: [PATCH] Eliminate kernel warning when running tests on FreeBSD pexpect had a hack to work around some old buggy platforms, and as a result of the hack running the tests on FreeBSD produced a stream of kernel warnings in the system log: Feb 5 17:19:11 feynman kernel: WARNING pid 11323 (python2.7): ioctl sign-extension ioctl ffffffff80087467 The hack has now been removed upstream, so remove it here too. llvm.org/pr18749 llvm-svn: 201603 --- lldb/test/pexpect-2.4/pexpect.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/lldb/test/pexpect-2.4/pexpect.py b/lldb/test/pexpect-2.4/pexpect.py index 2ecdabd3c6f0..0bb0a84c1415 100644 --- a/lldb/test/pexpect-2.4/pexpect.py +++ b/lldb/test/pexpect-2.4/pexpect.py @@ -1437,17 +1437,11 @@ class spawn (object): applications like vi or curses -- applications that respond to the SIGWINCH signal. """ - # Check for buggy platforms. Some Python versions on some platforms - # (notably OSF1 Alpha and RedHat 7.1) truncate the value for - # termios.TIOCSWINSZ. It is not clear why this happens. - # These platforms don't seem to handle the signed int very well; - # yet other platforms like OpenBSD have a large negative value for - # TIOCSWINSZ and they don't have a truncate problem. - # Newer versions of Linux have totally different values for TIOCSWINSZ. - # Note that this fix is a hack. + # Some very old platforms have a bug that causes the value for + # termios.TIOCSWINSZ to be truncated. There was a hack here to work + # around this, but it caused problems with newer platforms so has been + # removed. For details see https://github.com/pexpect/pexpect/issues/39 TIOCSWINSZ = getattr(termios, 'TIOCSWINSZ', -2146929561) - if TIOCSWINSZ == 2148037735L: # L is not required in Python >= 2.2. - TIOCSWINSZ = -2146929561 # Same bits, but with sign. # Note, assume ws_xpixel and ws_ypixel are zero. s = struct.pack('HHHH', r, c, 0, 0) fcntl.ioctl(self.fileno(), TIOCSWINSZ, s)