~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to gnulib-tests/test-symlinkat.c

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-11-28 03:03:42 UTC
  • mfrom: (8.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20121128030342-21zanj8354gas5gr
Tags: 8.20-3ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Make 'uname -i -p' return the real processor/hardware, instead of
    unknown.
  - Build-depend on gettext:any instead of on gettext, so that apt-get can
    properly resolve build-dependencies on the tool when cross-building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- buffer-read-only: t -*- vi: set ro: */
2
 
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3
1
/* Tests of symlinkat.
4
 
   Copyright (C) 2009-2011 Free Software Foundation, Inc.
 
2
   Copyright (C) 2009-2012 Free Software Foundation, Inc.
5
3
 
6
4
   This program is free software: you can redistribute it and/or modify
7
5
   it under the terms of the GNU General Public License as published by
60
58
  /* Remove any leftovers from a previous partial run.  */
61
59
  ignore_value (system ("rm -rf " BASE "*"));
62
60
 
 
61
  /* Test behaviour for invalid file descriptors.  */
 
62
  {
 
63
    errno = 0;
 
64
    ASSERT (symlinkat ("foo", -1, "bar") == -1);
 
65
    ASSERT (errno == EBADF
 
66
            || errno == ENOSYS /* seen on mingw */
 
67
           );
 
68
  }
 
69
  {
 
70
    errno = 0;
 
71
    ASSERT (symlinkat ("foo", 99, "bar") == -1);
 
72
    ASSERT (errno == EBADF
 
73
            || errno == ENOSYS /* seen on mingw */
 
74
           );
 
75
  }
 
76
 
63
77
  /* Perform same checks as counterpart functions.  */
64
78
  result = test_symlink (do_symlink, false);
65
79
  dfd = openat (AT_FDCWD, ".", O_RDONLY);