[asan] Revert r201402, r201404.
[blocksruntime.git] / lib / msan / lit_tests / readdir64.cc
blob0ec106c741f518678ccbc91d13966da735ff8b8c
1 // RUN: %clangxx_msan -m64 -O0 %s -o %t && %t
2 // RUN: %clangxx_msan -m64 -O1 %s -o %t && %t
3 // RUN: %clangxx_msan -m64 -O2 %s -o %t && %t
4 // RUN: %clangxx_msan -m64 -O3 %s -o %t && %t
6 // RUN: %clangxx_msan -m64 -O0 -D_FILE_OFFSET_BITS=64 %s -o %t && %t
7 // RUN: %clangxx_msan -m64 -O1 -D_FILE_OFFSET_BITS=64 %s -o %t && %t
8 // RUN: %clangxx_msan -m64 -O2 -D_FILE_OFFSET_BITS=64 %s -o %t && %t
9 // RUN: %clangxx_msan -m64 -O3 -D_FILE_OFFSET_BITS=64 %s -o %t && %t
11 // Test that readdir64 is intercepted as well as readdir.
13 #include <sys/types.h>
14 #include <dirent.h>
15 #include <stdlib.h>
18 int main(void) {
19 DIR *dir = opendir(".");
20 struct dirent *d = readdir(dir);
21 if (d->d_name[0]) {
22 closedir(dir);
23 exit(0);
25 closedir(dir);
26 return 0;