Jeff,
Applied this patch too.
Regards & Thanks--
Subrata Modak,
====================================
====================================
Jeff Burke
<[EMAIL PROTECTED]
m> To
Sent by: [email protected]
ltp-list-bounces@ cc
lists.sourceforge
.net Subject
[LTP] Change to runltp. Make tmp
directory writable for user nobody
04/04/07 08:06 PM
Please respond to
[EMAIL PROTECTED]
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
--- ltp-full-20070228/runltp.orig
+++ ltp-full-20070228/runltp
@@ -32,7 +32,7 @@
#
# Oct 08 2003 - Modified - Manoj Iyer
# - fixed bug in creating results directory
-# - all checks should be enlclosed in " " to avoid bash
error
+# - all checks should be enlclosed in " " to avoid bash
error
# - exit with error if pan is not found in pan directory
@@ -65,8 +65,8 @@ setup()
version_of_ltp()
{
-head -n 1 $LTPROOT/ChangeLog
-exit 0
+ head -n 1 $LTPROOT/ChangeLog
+ exit 0
}
usage()
@@ -91,7 +91,7 @@ usage()
-p Human readable format logfiles.
-q Print less verbose output to screen.
-r LTPROOT Fully qualified path where testsuite is installed.
- -s PATTERN Only run test cases which match PATTERN.
+ -s PATTERN Only run test cases which match PATTERN.
-t DURATION Execute the testsuite for given duration. Examples:
-t 60s = 60 seconds
-t 45m = 45 minutes
@@ -107,7 +107,6 @@ usage()
exit 0
}
-
main()
{
local CMDFILE=""
@@ -156,7 +155,6 @@ main()
GENLOAD=1 ;;
l)
-
echo "INFO: creating $LTPROOT/results directory"
[ ! -d $LTPROOT/results ] && \
{
@@ -227,8 +225,10 @@ main()
exit 1
fi
fi
-
- mkdir -p $TMP || \
+
+ # Added -m 777 for tests that call tst_tmpdir() and try to
+ # write to it as user nobody
+ mkdir -m 777 -p $TMP || \
{
echo "FATAL: Unable to make temporary directory $TMP"
exit 1
@@ -352,8 +352,6 @@ main()
echo "WARNING: required users and groups not present"
echo "WARNING: some test cases may fail"
}
-
-
# display versions of installed software
[ -z "$QUIET_MODE" ] && \
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list