summaryrefslogtreecommitdiff
path: root/lib/msan/lit_tests/Linux/tcgetattr.cc
blob: e6e101db884f5cb1d72eb875afe67b10de400f27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;
}