[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / compiler-rt / test / sanitizer_common / TestCases / Linux / name_to_handle_at.cpp
blobe2377107205273fa2bf7c0e208337d85ea552ce0
1 // RUN: %clangxx -O0 %s -o %t && %run %t
2 // UNSUPPORTED: android
4 #include <assert.h>
5 #include <fcntl.h>
6 #include <stdlib.h>
7 #include <sys/stat.h>
8 #include <sys/types.h>
10 int main(int argc, char **argv) {
11 int mount_id;
12 struct file_handle *handle = reinterpret_cast<struct file_handle *>(
13 malloc(sizeof(*handle) + MAX_HANDLE_SZ));
15 handle->handle_bytes = MAX_HANDLE_SZ;
16 int res = name_to_handle_at(AT_FDCWD, "/dev/null", handle, &mount_id, 0);
17 assert(!res);
19 free(handle);
20 return 0;