]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/asan/TestCases/Posix/glob.cc
1 // FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=316
4 // RUN: %clangxx_asan -O0 %s -o %t && %run %t %p 2>&1 | FileCheck %s
5 // RUN: %clangxx_asan -O3 %s -o %t && %run %t %p 2>&1 | FileCheck %s
6 // XFAIL: arm-linux-gnueabi
16 int main(int argc
, char *argv
[]) {
17 std::string path
= argv
[1];
18 std::string pattern
= path
+ "/glob_test_root/*a";
19 printf("pattern: %s\n", pattern
.c_str());
22 int res
= glob(pattern
.c_str(), 0, 0, &globbuf
);
24 printf("%d %s\n", errno
, strerror(errno
));
26 assert(globbuf
.gl_pathc
== 2);
27 printf("%zu\n", strlen(globbuf
.gl_pathv
[0]));
28 printf("%zu\n", strlen(globbuf
.gl_pathv
[1]));