JDK-6501010 : test/java/io/File/GetXSpace.java fails on Windows
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.io
  • Affected Version: 6
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2006-12-05
  • Updated: 2024-11-13
  • Resolved: 2020-07-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 16
16 b09Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
test/java/io/File/GetXSpace.java fails on Windows 2000

Here is the .jtr file:

#Test Results (version 2)
#Tue Dec 05 13:24:04 PST 2006
#checksum:2d7ac8087df8342a
#-----testdescription-----
$file=C:\\tbell\\SBW\\j2se\\test\\java\\io\\File\\GetXSpace.java
$root=C:\\tbell\\SBW\\j2se\\test
keywords=bug4057701 bug6286712 bug6364377 shell
run=USER_SPECIFIED build GetXSpace\r\nUSER_SPECIFIED shell GetXSpace.sh\r\n
source=GetXSpace.java
title=Basic functionality of File.get-X-Space methods.

#-----environment-----

#-----testresult-----
description=file:///C:/tbell/SBW/j2se/test/java/io/File/GetXSpace.java
end=Tue Dec 05 13:24:04 PST 2006
environment=regtest
execStatus=Failed. Execution failed: exit code 1
javatestOS=Windows 2000 5.0 (x86)
javatestVersion=2.1.6
script=com.sun.javatest.regtest.RegressionScript 
sections=script_messages build compile shell
start=Tue Dec 05 13:24:01 PST 2006
status=Failed. Execution failed: exit code 1
test=java/io/File/GetXSpace.java
work=C:\\tbell\\SBW\\j2se\\test\\java\\io\\File\\JTwork\\java\\io\\File

#section:script_messages
----------messages:(4/285)----------
JDK under test: (C:/tbell/b03PIT/control/build/windows-i586/j2sdk-image)
java version "1.7.0-tbell_2006_11_28.15.09.07"
Java(TM) SE Runtime Environment (build 1.7.0-tbell_2006_11_28.15.09.07-b332)
Java HotSpot(TM) Client VM (build 1.7.0-tbell_2006_11_28.15.09.07-b332, mixed mode)

#section:build
----------messages:(3/111)----------
command: build GetXSpace 
reason: User specified action: run build GetXSpace 
elapsed time (seconds): 1.579
result: Passed. Compilation successful

#section:compile
----------messages:(3/160)*----------
command: compile C:\\tbell\\SBW\\j2se\\test\\java\\io\\File\\GetXSpace.java 
reason: .class file out of date or does not exist
elapsed time (seconds): 1.579
----------System.out:(0/0)----------
----------System.err:(2/155)*----------
Note: C:\\tbell\\SBW\\j2se\\test\\java\\io\\File\\GetXSpace.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
result: Passed. Compilation successful

#section:shell
----------messages:(3/117)----------
command: shell GetXSpace.sh 
reason: User specified action: run shell GetXSpace.sh 
elapsed time (seconds): 1.734
----------System.out:(73/5103)----------
--- Testing df
SecurityManager = null
//?/Volume{8f51ef86-535b-11d9-96f5-806d6172696f}/:
  df   total= 137427943424 free =            0 usable = 108545937408
  getX total=            0 free =            0 usable =            0
//jdk.sfbay.sun.com/local-java:
  df   total=  48619323392 free =            0 usable =  31267487744
  getX total=  48619323392 free =  31267487744 usable =  31267487744
//jano.sfbay.sun.com/java-devtool:
  df   total=  21474836480 free =            0 usable =   4119330816
  getX total=  21474836480 free =   4119330816 usable =   4119330816
//vmsqe.sfbay.sun.com/export:
  df   total=   7855013888 free =            0 usable =    998637568
  getX total=   7855013888 free =    998637568 usable =    998637568

SecurityManager = GetXSpace$Allow
//?/Volume{8f51ef86-535b-11d9-96f5-806d6172696f}/:
  df   total= 137427943424 free =            0 usable = 108545937408
  getX total=            0 free =            0 usable =            0
//jdk.sfbay.sun.com/local-java:
  df   total=  48619323392 free =            0 usable =  31267487744
  getX total=  48619323392 free =  31267487744 usable =  31267487744
//jano.sfbay.sun.com/java-devtool:
  df   total=  21474836480 free =            0 usable =   4119330816
  getX total=  21474836480 free =   4119330816 usable =   4119330816
//vmsqe.sfbay.sun.com/export:
  df   total=   7855013888 free =            0 usable =    998637568
  getX total=   7855013888 free =    998637568 usable =    998637568

SecurityManager = GetXSpace$DenyFSA
//?/Volume{8f51ef86-535b-11d9-96f5-806d6172696f}/:
   getTotalSpace: "java.lang.SecurityException: sorry - getFileSystemAttributes" thrown as expected
    getFreeSpace: "java.lang.SecurityException: sorry - getFileSystemAttributes" thrown as expected
  getUsableSpace: "java.lang.SecurityException: sorry - getFileSystemAttributes" thrown as expected
//jdk.sfbay.sun.com/local-java:
   getTotalSpace: "java.lang.SecurityException: sorry - getFileSystemAttributes" thrown as expected
    getFreeSpace: "java.lang.SecurityException: sorry - getFileSystemAttributes" thrown as expected
  getUsableSpace: "java.lang.SecurityException: sorry - getFileSystemAttributes" thrown as expected
//jano.sfbay.sun.com/java-devtool:
   getTotalSpace: "java.lang.SecurityException: sorry - getFileSystemAttributes" thrown as expected
    getFreeSpace: "java.lang.SecurityException: sorry - getFileSystemAttributes" thrown as expected
  getUsableSpace: "java.lang.SecurityException: sorry - getFileSystemAttributes" thrown as expected
//vmsqe.sfbay.sun.com/export:
   getTotalSpace: "java.lang.SecurityException: sorry - getFileSystemAttributes" thrown as expected
    getFreeSpace: "java.lang.SecurityException: sorry - getFileSystemAttributes" thrown as expected
  getUsableSpace: "java.lang.SecurityException: sorry - getFileSystemAttributes" thrown as expected

SecurityManager = GetXSpace$DenyRead
//?/Volume{8f51ef86-535b-11d9-96f5-806d6172696f}/:
   getTotalSpace: "java.security.AccessControlException: access denied (java.lang.RuntimePermission getFileSystemAttributes)" thrown as expected
    getFreeSpace: "java.security.AccessControlException: access denied (java.lang.RuntimePermission getFileSystemAttributes)" thrown as expected
  getUsableSpace: "java.security.AccessControlException: access denied (java.lang.RuntimePermission getFileSystemAttributes)" thrown as expected
//jdk.sfbay.sun.com/local-java:
   getTotalSpace: "java.security.AccessControlException: access denied (java.lang.RuntimePermission getFileSystemAttributes)" thrown as expected
    getFreeSpace: "java.security.AccessControlException: access denied (java.lang.RuntimePermission getFileSystemAttributes)" thrown as expected
  getUsableSpace: "java.security.AccessControlException: access denied (java.lang.RuntimePermission getFileSystemAttributes)" thrown as expected
//jano.sfbay.sun.com/java-devtool:
   getTotalSpace: "java.security.AccessControlException: access denied (java.lang.RuntimePermission getFileSystemAttributes)" thrown as expected
    getFreeSpace: "java.security.AccessControlException: access denied (java.lang.RuntimePermission getFileSystemAttributes)" thrown as expected
  getUsableSpace: "java.security.AccessControlException: access denied (java.lang.RuntimePermission getFileSystemAttributes)" thrown as expected
//vmsqe.sfbay.sun.com/export:
   getTotalSpace: "java.security.AccessControlException: access denied (java.lang.RuntimePermission getFileSystemAttributes)" thrown as expected
    getFreeSpace: "java.security.AccessControlException: access denied (java.lang.RuntimePermission getFileSystemAttributes)" thrown as expected
  getUsableSpace: "java.security.AccessControlException: access denied (java.lang.RuntimePermission getFileSystemAttributes)" thrown as expected
FAILED
--- Testing c:/temp/tmp1_1780/foo
c:/temp/tmp1_1780/foo:
  df   total= 137427943424 free =            0 usable = 108545933312
  getX total= 137427943424 free = 108545933312 usable = 108545933312
all 4 tests passed
Passed

1 test(s) failed
----------System.err:(12/765)----------
FAILED: '//?/Volume{8f51ef86-535b-11d9-96f5-806d6172696f}/': 137427943424 != 0
FAILED: '//?/Volume{8f51ef86-535b-11d9-96f5-806d6172696f}/': 108545937408 ?? 0
FAILED: '//?/Volume{8f51ef86-535b-11d9-96f5-806d6172696f}/': 137427943424 != 0
FAILED: '//?/Volume{8f51ef86-535b-11d9-96f5-806d6172696f}/': 108545937408 ?? 0
Exception in thread "main" java.lang.RuntimeException: 104 tests: 4 failure(s), first
	at GetXSpace.main(GetXSpace.java:359)
Caused by: java.lang.RuntimeException: '//?/Volume{8f51ef86-535b-11d9-96f5-806d6172696f}/': 137427943424 != 0
	at GetXSpace.setFirst(GetXSpace.java:75)
	at GetXSpace.fail(GetXSpace.java:60)
	at GetXSpace.compare(GetXSpace.java:200)
	at GetXSpace.testDF(GetXSpace.java:343)
	at GetXSpace.main(GetXSpace.java:355)
result: Failed. Execution failed: exit code 1


test result: Failed. Execution failed: exit code 1

Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/83aeb4b1079b User: iignatyev Date: 2020-07-31 02:46:01 +0000
31-07-2020

the test needs to be updated to recognize cygwin's df output: http://cr.openjdk.java.net/~iignatyev/6501010/webrev.00/
20-07-2020

the test has required fixing to at least pass parsing of df output, w/ http://cr.openjdk.java.net/~iignatyev/8249700/webrev.00/, the test still fails 100% reproducible, but w/ completely another failure mode: #section:shell ----------messages:(3/116)---------- command: shell GetXSpace.sh reason: User specified action: run shell GetXSpace.sh elapsed time (seconds): 1.037 ----------System.out:(35/1548)---------- --- Testing df C:/cygwin 267892732 108277812 159614920 41% / SecurityManager = null /: df total= 274322157568 free = 0 usable = 163445678080 getX total= 0 free = 0 usable = 0 SecurityManager = GetXSpace$Allow /: df total= 274322157568 free = 0 usable = 163445678080 getX total= 0 free = 0 usable = 0 SecurityManager = GetXSpace$DenyFSA /: getTotalSpace: "java.lang.SecurityException: sorry - getFileSystemAttributes" thrown as expected getFreeSpace: "java.lang.SecurityException: sorry - getFileSystemAttributes" thrown as expected getUsableSpace: "java.lang.SecurityException: sorry - getFileSystemAttributes" thrown as expected SecurityManager = GetXSpace$DenyRead /: getTotalSpace: "java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "getFileSystemAttributes")" thrown as expected getFreeSpace: "java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "getFileSystemAttributes")" thrown as expected getUsableSpace: "java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "getFileSystemAttributes")" thrown as expected FAILED --- Testing /tmp/tmp1_13344/foo C:/cygwin 267892732 108277812 159614920 41% / /tmp/tmp1_13344/foo: df total= 274322157568 free = 0 usable = 163445678080 getX total= 0 free = 0 usable = 0 FAILED 2 test(s) failed ----------System.err:(22/1039)---------- FAILED: '/': 274322157568 != 0 FAILED: '/': 163445678080 ?? 0 FAILED: '/': 274322157568 != 0 FAILED: '/': 163445678080 ?? 0 Exception in thread "main" java.lang.RuntimeException: 26 tests: 4 failure(s), first at GetXSpace.main(GetXSpace.java:370) Caused by: java.lang.RuntimeException: '/': 274322157568 != 0 at GetXSpace.setFirst(GetXSpace.java:88) at GetXSpace.fail(GetXSpace.java:73) at GetXSpace.compare(GetXSpace.java:211) at GetXSpace.testDF(GetXSpace.java:354) at GetXSpace.main(GetXSpace.java:366) FAILED: '/tmp/tmp1_13344/foo': 274322157568 != 0 FAILED: '/tmp/tmp1_13344/foo': 163445678080 ?? 0 Exception in thread "main" java.lang.RuntimeException: 4 tests: 2 failure(s), first at GetXSpace.main(GetXSpace.java:370) Caused by: java.lang.RuntimeException: '/tmp/tmp1_13344/foo': 274322157568 != 0 at GetXSpace.setFirst(GetXSpace.java:88) at GetXSpace.fail(GetXSpace.java:73) at GetXSpace.compare(GetXSpace.java:211) at GetXSpace.testFile(GetXSpace.java:324) at GetXSpace.main(GetXSpace.java:364)
19-07-2020

This test is not on the problem list and no recent occurrences have been reported. Is it still relevant?
01-11-2019

This test has been excluded for some time (needs to be re-written)
10-04-2013

EVALUATION Additional information provided by the submitter: > What machine is this and what version of MKS is it using? This was doright.sfbay, running Windows 2000 and MKS 9.0p3. See below for the output of 'mksinfo'. The test depends on the format of "ps". It appears that this has changed. The test needs to be modified to handle the new format.
06-12-2006