[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[LTP] sighold02 failed



Hi all,

I downloaded ltp-20010122.tar.gz and run runalltests.sh.
But testcase "unlink08" does not work fine when running by root.

[RESULTS]
$ ./unlink08
unlink08    1  PASS  :  unlink(<unwritable directory>) Failed, errno=13
unlink08    2  PASS  :  unlink(<unsearchable directory>) Failed, errno=13
unlink08    3  PASS  :  unlink(<directory>) Failed, errno=21
$ su  
Password: 
# ./unlink08
unlink08    1  PASS  :  unlink(<unwritable directory>) returned 0
unlink08    2  PASS  :  unlink(<unsearchable directory>) returned 0
unlink08    3  FAIL  :  unlink(<directory>) Failed, errno=21


I'd like to know why checking euid(at line:268) and
clear exp_ret(at line:274)?
The following is the code fragment of unlink08.c

250 /***************************************************************
251  * setup() - performs all ONE TIME setup for this test.
252  ***************************************************************/
253 void
254 setup()
255 {
256     int ind;
257     int postest = 0;
258
259     /* capture signals */
260     tst_sig(NOFORK, DEF_HANDLER, cleanup);
261
262     /* make a temp directory and cd to it */
263     tst_tmpdir();
264
265     /* Pause if that option was specified */
266     TEST_PAUSE;
267
268     if ( geteuid() == 0 ) {
269         postest++;
270     }
271
272     for (ind=0; Test_cases[ind].desc != NULL; ind++ ) {
273         if ( postest )
274             Test_cases[ind].exp_ret=0;  /* set as a pos test */
275         Test_cases[ind].setupfunc(0);
276     }
277
278 }       /* End setup() */


regards,
Fumio Nakayama
QA Supervisor, Turbolinux Japan K.K.
Fumio.Nakayama@turbolinux.co.jp