I have a system on which ftruncate02 is failing because the test suite =
assumes that a truncate whose length is larger than the original file =
will increase the size of the file. However, according to the man page =
on my linux system, the behavior in this case is unspecified:
Truncate causes the file named by path or referenced by fd to =
be truncated to at
most length bytes in size. If the file previously was larger =
than this size, the
extra data is lost. If the file previously was shorter, it is =
the file is left unchanged or is extended. In the latter case =
the extended part
reads as zero bytes. With ftruncate, the file must be open for =
Would appear to me that the test should not be testing this case, since =
the action has no expected result.
From: Paul Larson <plars@au...> - 2002-05-30 19:58:41
Robbie beat me to it, never trust the man pages, always check the sus.
What architecture and kernel version is this failing on and what is the
exact nature of the failure? Is ftruncate just leaving it as a smaller
size, or is it actually returning an error?