<div dir="ltr">Hmm, ok.  I'll loop back around to this when I get some cycles.  Still working on Python 3 stuff so I don't think this will fall off my radar</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Nov 9, 2015 at 12:56 PM Todd Fiala <<a href="mailto:todd.fiala@gmail.com">todd.fiala@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The reason you probably want this unbuffered is for cases where you crash.  When a dotest.py process crashes, the buffered content won't necessarily get flushed.  So the session file may or may not contain the last thing that happened in that case.<div><br></div><div>I think we want it unbuffered where we can.</div><div><br></div><div>-Todd</div></div><div class="gmail_extra"></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 6, 2015 at 5:08 PM, Zachary Turner via lldb-commits <span dir="ltr"><<a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: zturner<br>
Date: Fri Nov  6 19:08:15 2015<br>
New Revision: 252381<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=252381&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=252381&view=rev</a><br>
Log:<br>
Python 3 - Don't use unbuffered I/O in text mode.<br>
<br>
This is unsupported in Python 3.  This could also have been fixed<br>
by using "wb" instead of "w", but it doesn't seem like writing the<br>
session log absolutely *needs* to be unbuffered.<br>
<br>
Modified:<br>
    lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py<br>
<br>
Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=252381&r1=252380&r2=252381&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=252381&r1=252380&r2=252381&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)<br>
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Fri Nov  6 19:08:15 2015<br>
@@ -1413,8 +1413,8 @@ class Base(unittest2.TestCase):<br>
         self.log_basename = self.getLogBasenameForCurrentTest()<br>
<br>
         session_file = "{}.log".format(self.log_basename)<br>
-        unbuffered = 0 # 0 is the constant for unbuffered<br>
-        self.session = open(session_file, "w", unbuffered)<br>
+        # Python 3 doesn't support unbuffered I/O in text mode.  Open buffered.<br>
+        self.session = open(session_file, "w")<br>
<br>
         # Optimistically set __errored__, __failed__, __expected__ to False<br>
         # initially.  If the test errored/failed, the session info<br>
<br>
<br>
_______________________________________________<br>
lldb-commits mailing list<br>
<a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits</a><br>
</blockquote></div><br><br clear="all"><div><br></div></div><div class="gmail_extra">-- <br><div><div dir="ltr">-Todd</div></div>
</div></blockquote></div>