bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fchownat test on AIX 7.1BETA


From: Rainer Tammer
Subject: Re: fchownat test on AIX 7.1BETA
Date: Sat, 31 Jul 2010 13:26:39 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6

Hello Bruno,

Bruno Haible wrote:
> Hello Rainer,
>
> Rainer Tammer wrote:
>   
>>>   test-chown.h:88: assertion failed
>>>   FAIL: test-fchownat
>>>       
>> test_chown(func = 0x20000d50, print = 1), line 88 in "test-chown.h"
>> main(), line 70 in "test-fchownat.c"
>>     
> Can you please try and show the output of this test program? It's a candidate
> for an autoconf test.
>
> ===============================================================================
> #define _GNU_SOURCE 1
> #define _ALL_SOURCE 1
> #include <unistd.h>
> #include <fcntl.h>
> #include <errno.h>
> #include <stdio.h>
>
> int main ()
> {
>   int fd;
>   int err;
>   int ret;
>
>   /* Ensure a clean working area.  */
>   unlink ("conftestdir/file");
>   rmdir ("conftestdir");
>
>   /* Create a directory.  */
>   if (mkdir ("conftestdir", 0700) < 0)
>     return 1;
>   /* Create a regular file.  */
>   fd = open ("conftestdir/file", O_CREAT | O_EXCL | O_WRONLY, 0600);
>   if (fd < 0)
>     return 2;
>   if (close (fd) < 0)
>     return 3;
>   /* Test whether a trailing "/" is treated like "/.".  */
>   ret = fchownat (AT_FDCWD, "conftestdir/file/", -1, -1, 0);
>   err = errno;
>   fprintf (stderr, "ret = %d\n", ret);
>   if (ret < 0)
>     {
>       fprintf (stderr, "errno = %d\n", err);
>       errno = err;
>       perror ("");
>     }
>
>   return 0;
> }
> ===============================================================================
>
>   

# ./testme
ret = 0


> Bruno
>
>
>   

bye
  Rainer



reply via email to

[Prev in Thread] Current Thread [Next in Thread]