On 03/27/2014 05:38 PM, chru...@suse.cz wrote:
> Hi!

Hi. Thank you for review.

>> -export TMPBASE="/tmp"
>
> You have removed the default value for TMPBASE so the default dir is now
> /ltpstress-$$ and not /tmp/ltpstress-$$.

Yes, it's a mistake. I will restore this line in V2.

>
>> -export TMP="${TMPBASE}/ltpstress-$$"
>>   export PATH=$LTPROOT/testcases/bin:$PATH
>>   memsize=0
>>   hours=24
>> @@ -57,7 +55,7 @@ usage()
>>   {
>>
>>      cat <<-END >&2
>> -    usage: ${0##*/} [ -d datafile ] [ -i # (in seconds) ] [ -I iofile ] [ 
>> -l logfile ] [ -m # (in Mb) ] [ -n ] [ -t duration ] [ [-S]|[-T] ]
>> +    usage: ${0##*/} [ -d datafile ] [ -i # (in seconds) ] [ -I iofile ] [ 
>> -l logfile ] [ -m # (in Mb) ] [ -n ] [ -t duration ] [ -x TMPDIR ] [ 
>> [-S]|[-T] ]
>>
>>       -d datafile     Data file for 'sar' or 'top' to log to. Default is 
>> "/tmp/ltpstress.data".
>>       -i # (in sec)   Interval that 'sar' or 'top' should take snapshots. 
>> Default is 10 seconds.
>> @@ -68,6 +66,7 @@ usage()
>>       -S              Use 'sar' to measure data.
>>       -T              Use LTP's modified 'top' tool to measure data.
>>       -t duration     Execute the testsuite for given duration in hours. 
>> Default is 24.
>> +    -x TMPDIR       Directory where temporary files will be created.
>
> It's shame that -d is allready taken and we are not compatible with
> runltp... but I guess we cannot do anything about it.
>
>>
>> -
>> -mkdir -p ${TMP}
>> -
>> -cd ${TMP}
>> -if [ $? -ne 0 ]; then
>> -  echo "could not cd ${TMP} ... exiting"
>> -  exit
>> -fi
>> -
>> -while getopts d:hi:I:l:STt:m:n\? arg
>> +while getopts d:hi:I:l:STt:m:nx:\? arg
>>   do  case $arg in
>>
>>      d)      datafile="$OPTARG";;
>> @@ -137,11 +127,30 @@ do  case $arg in
>>           t)      hours=$OPTARG
>>              duration=$(($hours * 60 * 60));;
>>
>> +    x)      export TMPBASE=$(readlink -f ${OPTARG});;
>
> Why readlink?

Actually, I made everything closer to ./runltp. And ./runltp makes the 
passed user path to be in the canonical form:

         d)  # convert the user path to absolute path.
             export TMPBASE=$(readlink -f ${OPTARG}) ;;

So I decided to do it the same way.


>
>
> The rest is fine.
>

------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to