tests: create memory backed file in ram to do the file tests
This can be done with fnctl, memfd_create or other libc syscalls
Is that really necessary?
Both the Filesystem Hierarchy Standard and POSIX mandate that /tmp exists. I think that on most Linux distributions, it is also a tmpfs mount where everything is kept in memory (or swap if needed). While I could not find any documentation stating that /tmp must be a tmpfs mount, I think it is rather safe to assume it is.
To be safer, we could use a dedicated temporary file crate (e.g. https://github.com/Stebalien/tempfile) which uses specific system calls internally to create temporary files.
Is that really necessary?
Not really, just a nice-to-have.
Both the Filesystem Hierarchy Standard and POSIX mandate that
/tmpexists. I think that on most Linux distributions, it is also atmpfsmount where everything is kept in memory (or swap if needed). While I could not find any documentation stating that/tmpmust be atmpfsmount, I think it is rather safe to assume it is.To be safer, we could use a dedicated temporary file crate (e.g. https://github.com/Stebalien/tempfile) which uses specific system calls internally to create temporary files.