diff options
Diffstat (limited to 'test/sanitizer_common/TestCases/Posix/getusershell.cc')
-rw-r--r-- | test/sanitizer_common/TestCases/Posix/getusershell.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/sanitizer_common/TestCases/Posix/getusershell.cc b/test/sanitizer_common/TestCases/Posix/getusershell.cc new file mode 100644 index 000000000..c00d75f11 --- /dev/null +++ b/test/sanitizer_common/TestCases/Posix/getusershell.cc @@ -0,0 +1,23 @@ +// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s + +// UNSUPPORTED: android + +#include <assert.h> +#include <errno.h> +#include <stdio.h> +#include <unistd.h> + +int main(void) { + printf("getusershell\n"); + + setusershell(); + char *fentry = getusershell(); + + printf("First entry: '%s'\n", fentry); + + endusershell(); + + return 0; + // CHECK: getusershell + // CHECK: First entry: '{{.*}}' +} |