[LTP] [PATCH 4/5] syscalls/chmod05: Use new ltp library

Cyril Hrubis chrubis@suse.cz
Tue Nov 6 17:01:19 CET 2018


Hi!
> > -void cleanup(void)
> > -{
> > -	if (setegid(0) == -1)
> > -		tst_resm(TWARN | TERRNO, "setegid(0) failed");
> > -	if (seteuid(0) == -1)
> > -		tst_resm(TWARN | TERRNO, "seteuid(0) failed");
> > -
> 
> It looks like I need to do this in some cleanup function for the new test.
> Otherwise the library cleanup won't be able to delete the tmpdir. Let me
> rework this..

Actually the temporary directory cleanup in the new library is executed
from the parent process, the actuall test is executed from a forked
child so it shouldn't matter what euid and egid the child process ends
up with.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list