[LTP] [PATCH STAGING v2 04/16] fchroot01: test fchroot() with a directory fd
Cyril Hrubis
chrubis@suse.cz
Thu Aug 20 16:58:11 CEST 2026
Hi!
> > > + * 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.
Ah, right, that makes sense with -i 10. But then all the comments about
library cleanup are wrong.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list