[LTP] [PATCH STAGING v2 04/16] fchroot01: test fchroot() with a directory fd
Andrea Cervesato
andrea.cervesato@suse.com
Thu Aug 20 16:23:53 CEST 2026
Hi Cyril,
> > + * The syscall runs in a forked child so that the root of the parent
> > + * process, which the test framework needs for its cleanup, is left
> > + * untouched.
>
> I do not think that we need this. The process that runs the run()
> function is forked from the library process in order for the test to be
> isolated from the library.
>
> As long as we do not have a custom cleanup() function that needs to run
> outside of the jail we do not have to fork in the run().
the fork() ensures that if fchroot() passes (instead of failing) at the next
iterations we don't have a dirty environment. This is done for all tests,
so iterations always starts from scratch.
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
More information about the ltp
mailing list