[CRIU] [PATCH 1/2] zdtm: introduced a local version of O_LARGEFILE
Alexander Kartashov
alekskartashov at parallels.com
Wed Jan 30 01:32:01 EST 2013
On 01/30/2013 03:13 AM, Pavel Emelyanov wrote:
> In what header?
It's the header /usr/include/x86_64-linux-gnu/bits/fcntl.h in my distro.
> OK, so zdtm test opens file with O_LARGEFILE flag, doesn't it?
The test static/file_fown tests C/R of pipes. Descriptors of pipe ends
are created by the kernel without the flag O_LARGEFILE. crtools dumps
everything correctly.
When a pipe is restored one of its ends is reopened using the function
open() that adds the flag O_LARGEFILE specifically its kernel version.
So the test detects that file flags on a pipe descriptor changed during
the C/R cycle and reports a error.
To prevent this the test clear the flag O_LARGEFILE from the file flags
returned by the function fcntl(). The problem is that it uses explicit
value of the flag (0100000) that doesn't match
* The value declared in the x86-64 usespace headers --- it's declared
to be 0,
* The value used in the ARM kernel.
So the test succeeds on x86-64 and fails on ARM. That's why I decided
to add the kernel definition of the flag O_LARGEFILE to the zdtm headers.
--
Sincerely yours,
Alexander Kartashov
Intern
Core team
www.parallels.com
Skype: aleksandr.kartashov
Email: alekskartashov at parallels.com
More information about the CRIU
mailing list