Hello,
I've created a fix in LTP to runltp that allows -d option to work correctly.
LTP has an error where using the -d option in runltp to select an alternate
temporary directory causes some test cases to execute differently, and
sometime fail.
Test cases execute incorrectly because runltp does not correctly export the
TMPDIR environment variable when run with the -d option.
The TMPDIR environment variable is used by the tst_tmpdir() function.
Many of
the kernel/fs tests use this function to setup the temporary directory
and use
it as the current working directory for the test.
If the TMPDIR environment variable is not found, tst_tmpdir() defaults
to /tmp.
Since TMPDIR is currently not being exported when using the -d option, tests
will default to using /tmp as the scratch directory.
The attached patch makes running runltp with and without the -d option
consistent. It applies to the latest version in CVS.
Can someone either apply it, or add me to the project so I can apply it
myself?
Much Thanks,
James Puderer
Index: ltp/runltp
===================================================================
--- ltp.orig/runltp 2007-09-21 21:42:07.000000000 +0300
+++ ltp/runltp 2007-09-21 21:42:27.000000000 +0300
@@ -67,6 +67,7 @@
export LTPROOT=${PWD}
export TMPBASE="/tmp"
export TMP="${TMPBASE}/ltp-$$"
+ export TMPDIR="${TMP}"
export PATH="${PATH}:${LTPROOT}/testcases/bin"
[ -d $LTPROOT/testcases/bin ] ||
@@ -171,8 +172,8 @@
d) # append $$ to TMP, as it is recursively
# removed at end of script.
- TMPBASE=$OPTARG
- TMP="${TMPBASE}/ltp-$$"
+ export TMPBASE=$OPTARG
+ export TMP="${TMPBASE}/ltp-$$"
export TMPDIR="$TMP";;
e) # Print out the version of LTP
version_of_ltp
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list