diff options
author | Lawrence D'Anna <lawrence_danna@apple.com> | 2019-10-28 21:59:04 -0700 |
---|---|---|
committer | Lawrence D'Anna <lawrence_danna@apple.com> | 2019-10-29 09:41:22 -0700 |
commit | 6a93a12a8dd98291225a282b5b8f3c97e68ebe49 (patch) | |
tree | 8c434bc0d961e94ad245051106c1205f69eeedbe /lldb/packages/Python/lldbsuite/test/python_api | |
parent | 5503455ccb3f5fcedced158332c016c8d3a7fa81 (diff) | |
download | bcm5719-llvm-6a93a12a8dd98291225a282b5b8f3c97e68ebe49.tar.gz bcm5719-llvm-6a93a12a8dd98291225a282b5b8f3c97e68ebe49.zip |
[LLDB][Python] fix another fflush issue on NetBSD
Summary:
Here's another instance where we were calling fflush on an input
stream, which is illegal on NetBSD.
Reviewers: labath, mgorny
Reviewed By: mgorny
Subscribers: krytarowski, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D69488
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py b/lldb/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py index 5a75187262a..f7f1ad08500 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py @@ -845,11 +845,16 @@ class FileHandleTestCase(lldbtest.TestBase): def i(sbf): for i in range(10): f = sbf.GetFile() + self.assertEqual(f.mode, "w") yield f sbf = lldb.SBFile.Create(f, borrow=True) yield sbf sbf.Write(str(i).encode('ascii') + b"\n") files = list(i(sbf)) + # delete them in reverse order, again because each is a borrow + # of the previous. + while files: + files.pop() with open(self.out_filename, 'r') as f: self.assertEqual(list(range(10)), list(map(int, f.read().strip().split()))) |