diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-30 10:55:45 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-30 10:55:45 +0300 |
| commit | 271cda4e5b478a9f51ac98544e34de768a7e69ae (patch) | |
| tree | 448e920cbfc2501d4a68efc871477a7e9959247a /integrationtests | |
| parent | ee3a7106a724dc193589ab652ef21503ba291562 (diff) | |
creat: keep pathname on failed creat; lock in fd->path mapping
creat(pathname, mode) is equivalent to open(pathname,
O_CREAT|O_WRONLY|O_TRUNC, mode): on success it returns a new fd, on
failure -1. handlePathExit already special-cased creat to register the
returned fd->path mapping in fdState (matching handleOpenExit for
open/openat/openat2), but on failure (ret<0) it left ep.File unset,
silently dropping the path. handleOpenExit keeps the path via
NewPathname for failed opens so error scenarios stay observable; align
the creat branch with that behavior.
Strengthen CreatEventTest to assert the returned fd is registered with
the correct path and synthesized open flags, and add a negative
FailedCreatEventTest covering the ret<0 path (no fd registered, path
retained).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'integrationtests')
0 files changed, 0 insertions, 0 deletions
