[PATCH v2 10/10] selftests/liveupdate: Add a test for preserving tmpfs files

sashiko-bot at kernel.org sashiko-bot at kernel.org
Fri Oct 23 15:51:41 PDT 2026


> Add luo_tmpfs, a kexec test for preserving tmpfs files and memfds, and
> for retrieving tmpfs files onto a tmpfs mount with struct
> liveupdate_shmem_retrieve_arg.
> 
> Stage 1 preserves the source files of each test case. Stage 2 runs
> each test case in its own directory, with its own tmpfs mounts, so that
> block usage can be checked exactly with statfs() and st_blocks. The test
> cases cover:
> 
>  - The restored file: contents, size, position, seals and holes, for
>    linked and unlinked source files.
> 
>  - Creating the file: it is created like with open(O_TMPFILE), with the
>    requested mode minus the umask, owned by the caller, and not linked
>    until userspace links it, unless it asked for O_EXCL. Also O_RDONLY
> [ ... ]
> tmpfs quotas are not tested, since the test runs as root, which is not
> subject to quota limits.
> 
> Assisted-by: LLM
> Signed-off-by: David Matlack <dmatlack at google.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261022225035.377445-1-dmatlack@google.com?part=10




More information about the kexec mailing list