United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7083664 TEST_BUG: test hard code of using c:/temp but this dir might not exist
JDK-7083664 : TEST_BUG: test hard code of using c:/temp but this dir might not exist

Details
Type:
Bug
Submit Date:
2011-08-26
Status:
Closed
Updated Date:
2012-10-26
Project Name:
JDK
Resolved Date:
2012-09-04
Component:
security-libs
OS:
windows
Sub-Component:
java.security
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
6,7,8
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:

Sub Tasks

Description
sun/security/tools/jarsigner/diffend.sh

hard code of c:/temp

  Windows_* )
    NULL=NUL
    PS=";"
    FS="\\"
    CP="cp -f"
    TMP="c:/temp"
    ;;

c:/temp might not exist and test will just fail on such machine with no clear message for test requires c:/temp must exist

#section:shell
----------messages:(3/127)----------
command: shell diffend.sh []
reason: Assumed action based on file name: run shell diffend.sh 
elapsed time (seconds): 1.211
----------System.out:(1/49)----------
jarsigner: unable to open jar file: diffend.jar
----------System.err:(3/139)----------
rm: cannot unlink entry "diffend.jar": The system cannot find the file specified. 

zip error: Out of memory (allocating temp filename)
result: Failed. Execution failed: exit code 1


test result: Failed. Execution failed: exit code 1

                                    

Comments
WORK AROUND

Create c:/temp on test machine if it dose not exist
                                     
2011-08-26
SUGGESTED FIX

Check whether c:/temp exist, if not, exit test with error message

Or 

        if [ -n "$TMPDIR" ]; then
            TMP="$TMPDIR"
        elif [ -d "$SystemDrive/Temp" ]; then
            TMP="$SystemDrive/Temp"
        elif [ -d "C:/Temp" ]; then
            TMP="C:/Temp"
        else
            TMP="/tmp"
        fi
                                     
2011-08-26
EVALUATION

remove all TMP settings in security tests:

http://hg.openjdk.java.net/jdk8/tl/jdk/rev/f5120b47f93d
                                     
2011-08-31



Hardware and Software, Engineered to Work Together