bug-gnulib
[Top][All Lists]
Advanced

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

Re: linkat test on AIX 7.1BETA


From: Rainer Tammer
Subject: Re: linkat test on AIX 7.1BETA
Date: Sat, 31 Jul 2010 13:24:42 +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,
>
>   
>>>   test-link.h:117: assertion failed
>>>   FAIL: test-linkat
>>>       
>> test_link(func = 0x200009a0, print = 1), line 117 in "test-link.h"
>> main(), line 89 in "test-linkat.c"
>> ...
>> There is a second trap:
>>
>> ASSERT (func (BASE "a", BASE "c/") == -1);
>>
>> I have checked the return of func(), its 0.
>>     
> Can you please show the output of this test program? If it's as expected,
> I'll turn it into 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 ("conftesta");
>   unlink ("conftestb");
>   unlink ("conftestc");
>   unlink ("conftestd");
>
>   /* Create a regular file.  */
>   fd = open ("conftesta", O_CREAT | O_EXCL | O_WRONLY, 0600);
>   if (fd < 0)
>     return 1;
>   if (write (fd, "hello", 5) < 5)
>     return 2;
>   if (close (fd) < 0)
>     return 3;
>   /* Test whether hard links are supported on the current device.  */
>   if (linkat (AT_FDCWD, "conftesta", AT_FDCWD, "conftestb", 
> AT_SYMLINK_FOLLOW) < 0)
>     return 0;
>   /* Test whether a trailing "/" is treated like "/.".  */
>   ret = linkat (AT_FDCWD, "conftesta/", AT_FDCWD, "conftestc", 
> AT_SYMLINK_FOLLOW);
>   err = errno;
>   fprintf (stderr, "ret = %d\n", ret);
>   if (ret < 0)
>     {
>       fprintf (stderr, "errno = %d\n", err);
>       errno = err;
>       perror ("");
>     }
>   ret = linkat (AT_FDCWD, "conftesta", AT_FDCWD, "conftestd/", 
> AT_SYMLINK_FOLLOW);
>   err = errno;
>   fprintf (stderr, "ret = %d\n", ret);
>   if (ret < 0)
>     {
>       fprintf (stderr, "errno = %d\n", err);
>       errno = err;
>       perror ("");
>     }
>
>   return 0;
> }
> ===============================================================================
>
> Bruno
>
>
>   

AIX 7BETA:
# ./testme
ret = 0
ret = 0


Bye
  Rainer

P.S.: I just tried to regenerate the gnulib test from the current git.
But I got an error at the end:

gperf -m 10 ./iconv_open-aix.gperf > ./iconv_open-aix.h-t
/bin/sh: gperf:  not found.
make: *** [iconv_open-aix.h] Error 127

So I have to get a working gperf ...

Could you please create a new gnulib test for me ?
I really would like to use the new base.



reply via email to

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