2001-10-03 19:14:21

by Paul Larson

[permalink] [raw]
Subject: ftruncate


One of the testcases we have in the Linux Test Project, ftruncate03,
does some negative testing for the ftruncate system call. It has
previously passed, and even passes on 2.4.11-pre1, but I noticed today
that it does NOT pass on 2.4.10-ac4. It looks like the problem is with
2.4.11-pre1 and the testcase though if my man pages are right. The test
is looking to get EACCESS back when the file is opened read only and
ftruncate is called on it, but the man page says it should actually
return EINVAL.

A fixed version of this testcase will be in our next release. I know
it's fairly trivial, but it would be nice to see this fix synced up with
Linus's tree.

Thanks,
Paul Larson


2001-10-04 21:30:04

by Alan

[permalink] [raw]
Subject: Re: ftruncate

> that it does NOT pass on 2.4.10-ac4. It looks like the problem is with
> 2.4.11-pre1 and the testcase though if my man pages are right. The test
> is looking to get EACCESS back when the file is opened read only and
> ftruncate is called on it, but the man page says it should actually
> return EINVAL.
>
> A fixed version of this testcase will be in our next release. I know
> it's fairly trivial, but it would be nice to see this fix synced up with
> Linus's tree.

There are about 10 standards violations in the Linus tree against file
truncation behaviour (things like ftruncate > 2Gb without 64bit etc).
Merging them with the current scale of the fs/block changes in the current
Linus tree and their rate of change isnt feasible