Skip to contentSkip to conversation

ftruncate

DISCUSSION Paul Larson 2 participants 2 messages Oct 3, 2001 – Oct 4, 2001

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 9 lines

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