On 10/21 11:28AM, Subrata Modak wrote:
> Hi Jin,
> 
> I do not find the problem getting solved even after post patching. See
> the output i got post patching:
> 
> 
> > ==============
> > After patching
> > ==============
> > [EMAIL PROTECTED] cvs_ltp]# ./runltp -d /home/ltp/cvs_ltp -s access04
> 
> <<<test_output>>>
> incrementing stop
> access04    1  BROK  :  tst_tmpdir():
> mkdtemp(/home/subratamodak/OFFICE_WORKS/LTP_PROJECT_CODE/LTP_TARS/SEPTEMBER_2008_RELEASE/ltp-full-20081020/cvs_ltp/ltp-kKMkw26235/accmCGlzP)
>  failed; errno = 13: Permission denied
> access04    0  WARN  :  tst_tmpdir(): No user cleanup function called
> before exiting
> 
> 
> > Running tests.......
> > <<<test_start>>>
> > tag=access04 stime=1224514707
> > cmdline="access04"
> > contacts=""
> > analysis=exit
> > initiation_status="ok"
> > <<<test_output>>>
> > incrementing stop
> > access04    1  PASS  :  Functionality of access(testdir/testfile, F_OK)
> > successful
> > <<<execution_status>>>
> > duration=0 termination_type=exited termination_id=0 corefile=no
> > cutime=0 cstime=0
> > <<<test_end>>>
> > INFO: pan reported all tests PASS
> > 
> > [EMAIL PROTECTED] cvs_ltp]# ./runltp -d ./tmp -s access04
> 
> For this:
> 
> Running tests.......
> access04    1  BROK  :  tst_tmpdir():
> mkdtemp(/home/subratamodak/OFFICE_WORKS/LTP_PROJECT_CODE/LTP_TARS/SEPTEMBER_2008_RELEASE/ltp-full-20081020/tmp/ltp-BRaBh26395/accQgs2qj)
>  failed; errno = 13: Permission denied
> access04    0  WARN  :  tst_tmpdir(): No user cleanup function called
> before exiting
> 
> 
> I find that a subdirectory cvs_ltp instead gets created at $LTPROOT
> instead of /home/ltp/cvs_ltp
> 
> Regards--
> Subrata
> 
> > 
> > Running tests.......
> > <<<test_start>>>
> > tag=access04 stime=1224514796
> > cmdline="access04"
> > contacts=""
> > analysis=exit
> > initiation_status="ok"
> > <<<test_output>>>
> > incrementing stop
> > access04    1  PASS  :  Functionality of access(testdir/testfile, F_OK)
> > successful
> > <<<execution_status>>>
> > duration=0 termination_type=exited termination_id=0 corefile=no
> > cutime=0 cstime=0
> > <<<test_end>>>
> > INFO: pan reported all tests PASS
> > 
> > Signed-off-by: Jin Bing Guo <[EMAIL PROTECTED]>
> > -----
> > 
> > Thanks,
> > -- Jin Bing Guo
> > -------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> > Build the coolest Linux based applications with Moblin SDK & win great 
> > prizes
> > Grand prize is a trip for two to an Open Source event anywhere in the world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > _______________________________________________ Ltp-list mailing list 
> > [email protected] 
> > https://lists.sourceforge.net/lists/listinfo/ltp-list


It's the file permission problem. Some cases such as access04 would
create temporary directory with user nobody. It needs execute 
permission of absolute path to create a directory. So it's reasonable
that use the /tmp as the temporary directory. At the same time, the 
parameter "-d TMPDIR" can be used to save configuration files such as
"alltests". See the new patch.

Signed-off-by: Jin Bing Guo <[EMAIL PROTECTED]>
-----

Thanks,
-- Jin Bing Guo
--- cvs_ltp.orig/runltp	2008-10-20 04:55:05.000000000 -0500
+++ cvs_ltp/runltp	2008-10-21 05:22:34.000000000 -0500
@@ -76,8 +76,6 @@ setup()
     }
     export LTPROOT=${PWD}
     export TMPBASE="/tmp"
-    # use mktemp to create "safe" temporary directories
-    export TMPTEMPLATE="${TMPBASE}/ltp-XXXXXXXXXX"
     export PATH="${PATH}:${LTPROOT}/testcases/bin"
 
     [ -d $LTPROOT/testcases/bin ] ||
@@ -214,8 +212,8 @@ main()
                 ALT_DIR_OUT=1 ;;
             esac ;;
                    
-        d)  # use mktemp to create "safe" temporary directories
-	    export TMPDIR="${OPTARG}" ;;
+        d)  # convert the user path to absolute path.
+            export TMPBASE=`cd \`dirname ${OPTARG}\`; pwd`/`basename ${OPTARG}` ;;
 
         D)  NUM_PROCS=1; NUM_FILES=1; NUM_BYTES=$((1024 * 1024 * 1024)); CLEAN_FLAG=0
             ARGUMENT_LIST=$OPTARG
@@ -447,12 +445,22 @@ main()
 
     # Added -m 777 for tests that call tst_tmpdir() and try to 
     #  write to it as user nobody
+    mkdir -m 777 -p $TMPBASE || \
+    {
+        echo "FATAL: Unable to make temporary directory $TMPBASE"
+        exit 1
+    }
+    # use mktemp to create "safe" temporary directories
+    export TMPTEMPLATE="${TMPBASE}/ltp-XXXXXXXXXX"
     TMP=`mktemp -d $TMPTEMPLATE` || \
     {
         echo "FATAL: Unable to make temporary directory: $TMP"
         exit 1
     }
     export TMP
+    # To be evoked by tst_tmpdir()
+    #  write to it as user nobody
+    export TMPDIR="/tmp" 
 
     chmod 777 $TMP || \
     {
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to