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