From: Jeff B. <jb...@re...> - 2007-04-04 14:36:39
|
Folks, Short version - Changed the way runltp makes the temp directory that is uses for running test. Plus some spacing, indent changes. This is a patch that was tested and applied against the 20070228 version of ltp-full. Long version - This was the error scenario I hit. When running ltp in the following manor: ./runltp -p -d /mnt/testarea -l /mnt/testarea/syscalls.log -o /mnt/testarea/syscalls.run.log -f syscalls The below list of tests would fail, all in the same way. With a errno = 13: Permission denied. What all these tests have in common is that in the setup function of the test it will switch to user nobody before calling the tmp_tstdir function (as it should). When runltp is started, it cases the args when it sees -d It does the following. d) # append $$ to TMP, as it is recursively # removed at end of script. TMPBASE=$OPTARG TMP="${TMPBASE}/ltp-$$" export TMPDIR="$TMP";; So in my case the directory at this point is /mnt/testarea/ltp-pid. Further down in runltp it makes the directory /mnt/testarea/ltp-pid as user root. mkdir -p $TMP || \ { echo "FATAL: Unable to make temporary directory $TMP" exit 1 } So in test cases that changes userid, user nobody does not have the correct permission to make additional directories under /mnt/testarea/ltp-pid/foo List of failing tests *************************************************** syscalls Failed: ----------------------------------------- Testcase Result Exit Value access02 FAIL 6 access04 FAIL 6 access05 FAIL 6 chmod03 FAIL 6 chmod04 FAIL 6 chown04 FAIL 6 chroot01 FAIL 6 creat01 FAIL 6 creat06 FAIL 6 execve03 FAIL 6 fchmod03 FAIL 6 fchmod04 FAIL 6 fchmod06 FAIL 6 fchown03 FAIL 6 fchown04 FAIL 6 fstat02 FAIL 6 fstat04 FAIL 6 fstat05 FAIL 6 lchown02 FAIL 6 lstat02 FAIL 6 lstat03 FAIL 6 mkdir05 FAIL 6 mknod07 FAIL 6 msgctl04 FAIL 6 msgget04 FAIL 6 msgrcv02 FAIL 6 msgsnd02 FAIL 6 nftw01 FAIL 6 nftw6401 FAIL 6 open08 FAIL 6 readlink01 FAIL 6 readlink03 FAIL 6 semctl02 FAIL 6 semget02 FAIL 6 semop02 FAIL 6 shmat02 FAIL 6 shmctl02 FAIL 6 shmget04 FAIL 6 stat01 FAIL 6 stat02 FAIL 6 stat03 FAIL 6 swapon02 FAIL 6 symlink03 FAIL 6 truncate03 FAIL 6 truncate04 FAIL 6 utime02 FAIL 6 utime05 FAIL 6 *************************************************** Actual failure from log *************************************************** <<<test_start>>> tag=access02 stime=1174956163 cmdline="access02" contacts="" analysis=exit initiation_status="ok" <<<test_output>>> access02 1 BROK : tst_tmpdir(): mkdtemp(/mnt/testarea/ltp-14648/accDIFHsE) failed; errno = 13: Permission denied access02 2 BROK : Remaining cases broken access02 3 BROK : Remaining cases broken access02 4 BROK : Remaining cases broken access02 0 WARN : tst_tmpdir(): No user cleanup function called before exiting <<<execution_status>>> duration=0 termination_type=exited termination_id=6 corefile=no cutime=0 cstime=0 <<<test_end>>> *************************************************** Thanks, Jef |