OSDN Git Service
(root)
/
android-x86
/
system-extras.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01ba2e6
)
simpleperf: fix cmd_debug_unwind tests.
author
Yabin Cui
<yabinc@google.com>
Wed, 14 Feb 2018 23:28:59 +0000
(15:28 -0800)
committer
Yabin Cui
<yabinc@google.com>
Wed, 14 Feb 2018 23:28:59 +0000
(15:28 -0800)
Without flushing stdout, the tests may fail when
running `adb shell simpleperf_unit_test`.
Bug: none
Test: run `adb shell simpleperf_unit_test`.
Change-Id: I8bcf739e7672e8affc71df0a3f11264c0bd7f745
simpleperf/cmd_debug_unwind_test.cpp
patch
|
blob
|
history
diff --git
a/simpleperf/cmd_debug_unwind_test.cpp
b/simpleperf/cmd_debug_unwind_test.cpp
index
8bf93d3
..
153adb7
100644
(file)
--- a/
simpleperf/cmd_debug_unwind_test.cpp
+++ b/
simpleperf/cmd_debug_unwind_test.cpp
@@
-45,6
+45,7
@@
class CaptureStdout {
}
bool Start() {
+ fflush(stdout);
old_stdout_ = dup(STDOUT_FILENO);
if (old_stdout_ == -1) {
return false;
@@
-58,6
+59,7
@@
class CaptureStdout {
}
std::string Finish() {
+ fflush(stdout);
started_ = false;
dup2(old_stdout_, STDOUT_FILENO);
close(old_stdout_);