|
From: | Eric Blake |
Subject: | Re: debugging M4 on AIX 5.3 |
Date: | Wed, 25 Aug 2010 14:10:41 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.2 |
On 08/25/2010 01:03 PM, Ralf Wildenhues wrote:
This is the output from 'truss ./test-rmdir': [...] rmdir("test-rmdir.tdir/file/") Err#20 ENOTDIR rmdir("test-rmdir.tdir") Err#17 EEXIST rmdir("test-rmdir.tdir/file") Err#20 ENOTDIR unlink("test-rmdir.tdir/file") = 0 rmdir("test-rmdir.tdir/.//") Err#17 EEXIST [...] If I read Posix correctly, then EEXIST is not allowed for this condition; not sure whether gnulib should work around this though. Anyway the patch below lets the test pass. Is it acceptable for gnulib?
Neither is EBUSY. But at least it fails (even if errno is wrong), so your patch is perfectly acceptable given what we've done for other syscalls with botched errno values. Feel free to apply it.
I've confirmed that the fix is needed for test-unlinkat as well.
Fixing test-rmdir.h should cover both test-rmdir and test-unlinkat in one go.
ASSERT (func (BASE "dir/.//") == -1); - ASSERT (errno == EINVAL || errno == EBUSY); + ASSERT (errno == EINVAL || errno == EBUSY || errno == EEXIST); ASSERT (func (BASE "dir") == 0);
-- Eric Blake address@hidden +1-801-349-2682 Libvirt virtualization library http://libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |