On 06/20/2011 04:13 PM, Eric Blake wrote: > On 06/19/2011 08:48 AM, Bruno Haible wrote: >>> IRIX 6.5: >>> >>> test-linkat.c:234: assertion failed >>> ksh[10]: 1760562 Abort(coredump) >>> FAIL: test-linkat >> >> It fails here: >> >> /* AT_SYMLINK_FOLLOW only follows first argument, not second. */ >> errno = 0; >> ASSERT (linkat (dfd, BASE "link1", dfd, BASE "link4", 0) == -1); <======= >> ASSERT (errno == EEXIST); > > Thanks for the report. I'll have to take a closer look into this, the > next time I log into an IRIX machine (hopefully later this week).
The bug is in IRIX link(2): $ mkdir d $ ln -s d 1 $ ln -s nowhere 4 $ link 1 4 $ All other platforms (correctly) reject this with EEXIST, since 4 exists (even though it is a broken symlink); but IRIX proceeds to create 'nowhere' as a hardlink to '1' (that is, two names for the same symlink pointing to 'd'). Or, put another way, IRIX dereferences a dangling target symlink during the link(2) call, where all other implementations do not. POSIX requires failure: [EEXIST] The path2 argument resolves to an existing directory entry or refers to a symbolic link. Looks like test-link needs to be beefed up to catch this, and fixing rpl_link should in turn fix the linkat tests. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature