> Hi! >> +/* >> + * EROFS need superuser privilege (mount and umount a readonly file system), >> + * but the other error values tests need a normal user. >> + * So we first call setup1() with superuser privilege to test EROFS, and >> then >> + * use setup() to call setuid()to change the real user id to perform >> + * other tests. >> + */ > Ah, this adds unexpected complexity and does not work test looping :(. > > I've looked closely on the test code and the problem is that acces uses > real user id so we have to drop the rights to check the access call but > we need to be able to unmount the fs at the end of the test, which is > privileged operation. > > Only solution that I have currenlty in mind is to run the test from > within the child process that drops the rights so that the parent > can perform the cleanup at the end, but again this adds unnecessary > complexity. > > Was this problem the original reason why you added the new testcase for > the EROFS part? If so, you should have spoken as I did not foresee that > we will hit this problem. Yes, it's the reason, But i really forgot to mention it before:) > > So we should either proceed with the previous version (EROFS in separate > test) or move the code to child processes. The first solution seems > better to me, what do you think? Ok, I will adopt the first solution.
Thanks, Xiaoguang Wang > ------------------------------------------------------------------------------ November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
