diff options
Diffstat (limited to 'lib/msan/lit_tests/Linux/tcgetattr.cc')
-rw-r--r-- | lib/msan/lit_tests/Linux/tcgetattr.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/msan/lit_tests/Linux/tcgetattr.cc b/lib/msan/lit_tests/Linux/tcgetattr.cc new file mode 100644 index 000000000000..e6e101db884f --- /dev/null +++ b/lib/msan/lit_tests/Linux/tcgetattr.cc @@ -0,0 +1,21 @@ +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t %p + +#include <assert.h> +#include <glob.h> +#include <stdio.h> +#include <stdlib.h> +#include <termios.h> +#include <unistd.h> + +int main(int argc, char *argv[]) { + int fd = getpt(); + assert(fd >= 0); + + struct termios t; + int res = tcgetattr(fd, &t); + assert(!res); + + if (t.c_iflag == 0) + exit(0); + return 0; +} |