Re: [PATCH STAGING v2 04/16] fchroot01: test fchroot() with a directory fd
Cyril Hrubis <[email protected]>
| Newsgroups | gmane.linux.ltp |
|---|---|
| Message-ID | <[email protected]> |
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 [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp