summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2014-07-15 08:46:51 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2014-07-15 08:46:51 +0000
commit727c7eee0581e70f1245002ea199f773b1e4dede (patch)
tree50196c19f6847136abd7ab7212a90c04b0e1c880
parentf3d3ffdce51a40fabb996d5e58f45ba6f5a3e7f5 (diff)
downloadcompiler-rt-727c7eee0581e70f1245002ea199f773b1e4dede.tar.gz
[sanitizer] De-flake one test.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213054 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/sanitizer_common/TestCases/Linux/getpass.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/sanitizer_common/TestCases/Linux/getpass.cc b/test/sanitizer_common/TestCases/Linux/getpass.cc
index 717f77502..c9a2276cc 100644
--- a/test/sanitizer_common/TestCases/Linux/getpass.cc
+++ b/test/sanitizer_common/TestCases/Linux/getpass.cc
@@ -19,8 +19,7 @@ main (int argc, char** argv)
int res = read(master, buf, sizeof(buf));
write(1, buf, res);
write(master, "password\n", 9);
- res = read(master, buf, sizeof(buf));
- write(1, buf, res);
+ while ((res = read(master, buf, sizeof(buf))) > 0) write(1, buf, res);
} else {
char *s = getpass("prompt");
assert(strcmp(s, "password") == 0);