about summary refs log tree commit diff homepage
path: root/test/Runtime/POSIX/CanonicalizeFileName.c
blob: 7f238c413de5d8a25040c045ca15e268d7e9c665 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// REQUIRES: not-darwin
// RUN: %clang %s -Wall -emit-llvm -g %O0opt -c -o %t.bc
// RUN: rm -rf %t.klee-out
// RUN: %klee --output-dir=%t.klee-out --libc=uclibc --posix-runtime --exit-on-error %t.bc

#define _GNU_SOURCE
#include <limits.h>
#include <stdlib.h>
#include <unistd.h>

int main(int argc, char * argv[]) {
  char cwd[PATH_MAX] = {0};

  if (!getcwd(cwd, PATH_MAX)) exit(EXIT_FAILURE);
  if (!canonicalize_file_name(cwd)) exit(EXIT_FAILURE);
}