gramine
gramine copied to clipboard
[LibOS] Add `O_APPEND` emulation for single process
Description of the changes
This PR adds O_APPEND emulation, but only within a single process.
Note that Gramine doesn't support multi-process operations on the same file anyhow, in particular, the file position is not synchronized among multiple processes. This PR doesn't change this limitation of Gramine, thus O_APPEND writes don't work correctly (may overwrite file contents).
Note that Linux has a bug in pwrite(). Gramine emulates this bug in the same way.
Fixes #1921.
See also:
- https://github.com/gramineproject/gramine/issues/584
- https://github.com/gramineproject/gramine/issues/1152
How to test this PR?
A new FS test is added. One LTP test is uncommented.
Jenkins, test this please (Jenkins was dead when this PR was created)