llvm-project/lldb
Lawrence D'Anna ab1cd65f19 update TestRunCommandInterpreterAPI to use SBFile
Summary:
If you look at what this test is doing, it's actually quite
mysterious why it works at all.   It sets the input file
inside a "with open".   As soon as the with block ends,
that file will be closed.   And yet somehow LLDB reads
commands from it anyway.    What's actually happening is that
the file descriptor gets dup'd when something inside LLDB
calls File::GetStream().   I think it's fair to say that
what this test is doing is illegal and it has no right
to expect it to work.

This patch updates the test with two cases.  One uses
the SBFile api, and actually transfers ownership of
the original file descriptor to the debugger.   The other
just uses the old FILE* API, but in a sane way.

I also set NO_DEBUG_INFO_TESTCASE, because this test doesn't
use any debug info and doesn't need to run three times.

Reviewers: JDevlieghere, jasonmolenda, labath

Reviewed By: labath

Subscribers: aprantl, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D68738

llvm-svn: 374424
2019-10-10 19:24:07 +00:00
..
cmake [CMake] Fix add_lldb_test_dependency 2019-10-09 20:36:29 +00:00
docs Expand on the qfProcessInfo documentation, add examples from 2019-10-04 21:01:52 +00:00
examples Revert [heap.py] Add missing declaration for malloc_get_all_zones 2019-08-22 21:01:45 +00:00
include/lldb update SBDebugger::SetInputFile() etc to work on native Files 2019-10-10 19:10:59 +00:00
packages/Python/lldbsuite update TestRunCommandInterpreterAPI to use SBFile 2019-10-10 19:24:07 +00:00
resources [CMake] Revised LLDB.framework builds 2019-01-04 12:46:50 +00:00
scripts update SBDebugger::SetInputFile() etc to work on native Files 2019-10-10 19:10:59 +00:00
source update SBDebugger::SetInputFile() etc to work on native Files 2019-10-10 19:10:59 +00:00
test [test] Use a different module cache for Shell and API tests. 2019-10-10 17:27:09 +00:00
third_party/Python/module Increase timeout in pexpect to lower chances of tests failing under ASAN. 2019-10-10 16:16:49 +00:00
tools Change debugserver to use the brk #0 for breakpoints. 2019-10-10 00:12:05 +00:00
unittests Fix the unwinding plan augmentation from x86 assembly 2019-10-10 13:23:09 +00:00
utils [utils] Update lldb-dotest for new test layout 2019-10-09 20:30:54 +00:00
.arcconfig
.clang-format
.gitignore Add .noindex to the gitignore 2019-04-05 17:57:42 +00:00
CMakeLists.txt [lldb] Put site-packages into a sub dir of CMAKE_CFG_INTDIR 2019-10-09 22:34:55 +00:00
CODE_OWNERS.txt [lldb][NFC] Cleanup mentions and code related to lldb-mi 2019-07-19 15:55:23 +00:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
use_lldb_suite_root.py