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

« back to all changes in this revision

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

  • Committer: Colin Watson
  • Date: 2013-10-30 15:48:33 UTC
  • mfrom: (8.3.5 sid)
  • Revision ID: cjwatson@canonical.com-20131030154833-xdt6e1yfffqom1c4
merge from Debian 8.21-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Test changing the protections of a file relative to an open directory.
2
 
   Copyright (C) 2011-2012 Free Software Foundation, Inc.
 
2
   Copyright (C) 2011-2013 Free Software Foundation, Inc.
3
3
 
4
4
   This program is free software: you can redistribute it and/or modify
5
5
   it under the terms of the GNU General Public License as published by
22
22
SIGNATURE_CHECK (fchmodat, int, (int, const char *, mode_t, int));
23
23
 
24
24
#include <errno.h>
 
25
#include <unistd.h>
25
26
 
26
27
#include "macros.h"
27
28
 
35
36
    ASSERT (errno == EBADF);
36
37
  }
37
38
  {
 
39
    close (99);
38
40
    errno = 0;
39
41
    ASSERT (fchmodat (99, "foo", 0600, 0) == -1);
40
42
    ASSERT (errno == EBADF);