diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-03-12 17:31:04 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-03-12 17:31:04 +0000 |
commit | 209e3a14867db64967a05e34bef97f15afdbebe7 (patch) | |
tree | 1b5743c3ee480229fb9709bc43143ff3be1ff3b1 /lldb | |
parent | 5650eb5b005fbb987c515c8354eac85130b393a4 (diff) | |
download | bcm5719-llvm-209e3a14867db64967a05e34bef97f15afdbebe7.tar.gz bcm5719-llvm-209e3a14867db64967a05e34bef97f15afdbebe7.zip |
[Reproducers] Add a test to ensure we can reuse the reproducer dir.
Yesterday I noticed a reproducer test failing after making a local
change. Removing the reproducer directory solved the issue. Add a test
case that detects this.
llvm-svn: 355941
Diffstat (limited to 'lldb')
-rw-r--r-- | lldb/lit/Reproducer/TestReuseDirectory.test | 10 | ||||
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lldb/lit/Reproducer/TestReuseDirectory.test b/lldb/lit/Reproducer/TestReuseDirectory.test new file mode 100644 index 00000000000..d4867365cf9 --- /dev/null +++ b/lldb/lit/Reproducer/TestReuseDirectory.test @@ -0,0 +1,10 @@ +# UNSUPPORTED: system-windows, system-freebsd + +# Test that we can capture twice to the same directory without breaking the +# reproducer functionality. + +# RUN: rm -rf %t.repro +# RUN: %clang %S/Inputs/simple.c -g -o %t.out +# RUN: %lldb -x -b -s %S/Inputs/GDBRemoteCapture.in --capture --capture-path %t.repro %t.out | FileCheck %S/TestGDBRemoteRepro.test --check-prefix CHECK --check-prefix CAPTURE +# RUN: %lldb -x -b -s %S/Inputs/GDBRemoteCapture.in --capture --capture-path %t.repro %t.out | FileCheck %S/TestGDBRemoteRepro.test --check-prefix CHECK --check-prefix CAPTURE +# RUN: %lldb --replay %t.repro | FileCheck %S/TestGDBRemoteRepro.test --check-prefix CHECK --check-prefix REPLAY diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index 1b9c5d610d5..6200486a67f 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -178,7 +178,7 @@ public: std::error_code EC; m_stream_up = llvm::make_unique<raw_fd_ostream>(history_file.GetPath(), EC, - sys::fs::OpenFlags::F_None); + sys::fs::OpenFlags::F_Text); return m_stream_up.get(); } |