linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* HFS+ Bug which causes coreutils "make test" to fail
@ 2004-11-17 22:05 Martin Schaffner
  2004-11-18  3:52 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Schaffner @ 2004-11-17 22:05 UTC (permalink / raw)
  To: linux-kernel

I'm installing my system using an HFS+ partition as root.
When I installed the GNU coreutils, I noticed that some test fail, even 
though they succeed on other fs such as ext2.
I've tracked down one failure to the following:

mkdir a; chmod 1777 a; touch a/b; su otheruser -c "rm -rf a"

gives differing results. On ext2:

rm: cannot remove 'a': Permission denied

On HFS+:

rm: reading directory 'a/b': Not a directory
rm: cannot remove directory 'a': Directory not empty


The other failure related to the fact that all pipe files are suffixed 
by "|", and all links by "@" when doing "ls -1F" on HFS+

--
Martin


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: HFS+ Bug which causes coreutils "make test" to fail
  2004-11-17 22:05 HFS+ Bug which causes coreutils "make test" to fail Martin Schaffner
@ 2004-11-18  3:52 ` Andrew Morton
  2004-11-19 17:43   ` Martin Schaffner
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2004-11-18  3:52 UTC (permalink / raw)
  To: Martin Schaffner; +Cc: linux-kernel, Roman Zippel

Martin Schaffner <schaffner@gmx.li> wrote:
>
> I'm installing my system using an HFS+ partition as root.
> When I installed the GNU coreutils, I noticed that some test fail, even 
> though they succeed on other fs such as ext2.
> I've tracked down one failure to the following:
> 
> mkdir a; chmod 1777 a; touch a/b; su otheruser -c "rm -rf a"
> 
> gives differing results. On ext2:
> 
> rm: cannot remove 'a': Permission denied
> 
> On HFS+:
> 
> rm: reading directory 'a/b': Not a directory
> rm: cannot remove directory 'a': Directory not empty
> 
> 
> The other failure related to the fact that all pipe files are suffixed 
> by "|", and all links by "@" when doing "ls -1F" on HFS+
> 

What is the kernel version?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: HFS+ Bug which causes coreutils "make test" to fail
  2004-11-18  3:52 ` Andrew Morton
@ 2004-11-19 17:43   ` Martin Schaffner
  2004-11-19 20:14     ` Roman Zippel
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Schaffner @ 2004-11-19 17:43 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel


On 18.11.2004, at 04:52, Andrew Morton wrote:

> Martin Schaffner <schaffner@gmx.li> wrote:
>>
>> I'm installing my system using an HFS+ partition as root.
>> When I installed the GNU coreutils, I noticed that some test fail, 
>> even
>> though they succeed on other fs such as ext2.
>> I've tracked down one failure to the following:
>>
>> mkdir a; chmod 1777 a; touch a/b; su otheruser -c "rm -rf a"
>>
>> gives differing results. On ext2:
>>
>> rm: cannot remove 'a': Permission denied
>>
>> On HFS+:
>>
>> rm: reading directory 'a/b': Not a directory
>> rm: cannot remove directory 'a': Directory not empty
>>
>>
>> The other failure related to the fact that all pipe files are suffixed
>> by "|", and all links by "@" when doing "ls -1F" on HFS+
>>
>
> What is the kernel version?

Sorry for forgetting to write this; it was linux-2.6.8.1.

Today, I retested with linux-2.6.10-rc2, and found  out that both 
failures happen with this version, too.

Here's part of the log from the second failure:
make[3]: Entering directory `/native/coreutils-5.2.1/tests/ls'
make  check-TESTS
make[3]: Entering directory `/native/coreutils-5.2.1/tests/ls'
PASS: inode
PASS: dangle
out2 exp2 differ: char 21, line 3
3c3
< fifo
---
 > fifo|
5,7c5,7
< slink-dangle
< slink-dir
< slink-reg
---
 > slink-dangle@
 > slink-dir@
 > slink-reg@
FAIL: file-type
PASS: recursive
PASS: dired
...
1 of 12 tests failed


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: HFS+ Bug which causes coreutils "make test" to fail
  2004-11-19 17:43   ` Martin Schaffner
@ 2004-11-19 20:14     ` Roman Zippel
  0 siblings, 0 replies; 4+ messages in thread
From: Roman Zippel @ 2004-11-19 20:14 UTC (permalink / raw)
  To: Martin Schaffner; +Cc: Andrew Morton, linux-kernel

Hi,

On Fri, 19 Nov 2004, Martin Schaffner wrote:

> > > mkdir a; chmod 1777 a; touch a/b; su otheruser -c "rm -rf a"

The problem is that rm does a chdir into a/b after unlink fails and tries 
to treat it like a directory. It's rather unclear why rm does that.
HFS allows to chdir into a file right now, because it doesn't has enough 
information to distinguish it from a lookup (for the resource fork).
OTOH it's easily fixable within rm, lstat clearly says it's a regular 
file, so rm has no reason to treat it like a dir.

> > > The other failure related to the fact that all pipe files are suffixed
> > > by "|", and all links by "@" when doing "ls -1F" on HFS+

I don't see what HFS should do different here, ext2 does the same. Can you 
send me the strace output to demonstrate the difference?

bye, Roman

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-11-19 20:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-17 22:05 HFS+ Bug which causes coreutils "make test" to fail Martin Schaffner
2004-11-18  3:52 ` Andrew Morton
2004-11-19 17:43   ` Martin Schaffner
2004-11-19 20:14     ` Roman Zippel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).