Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4345216

src/Permissions/enableResolveObjectTest FAILS on Solaris

XMLWordPrintable

    • beta
    • sparc
    • solaris_7
    • Not verified

      Problem Description
      ===================

      (This is very likely a test bug)

      Synopsis: src/Permissions/enableResolveObjectTest FAILS on Solaris

      unexpected Exception e java.io.FileNotFoundException: t.tmp (No such file or directory)
      unexpected Exception e java.io.StreamCorruptedException: InputStream does not contain a serialized object

      *NOTE*

      This test PASSES on win32 but FAILS on Solaris



      enableResolveObjectTest FAILING in two cases:
      --------------------------------------------

      Case 1: unexpected Exception e java.io.FileNotFoundException: t.tmp (No such file or directory)

      Line 55 in enableResolveObjectTest.java is looking for a file named t.tmp:
      FileInputStream istream = new FileInputStream("t.tmp");
      but throws a java.io.FileNotFoundException since the "t.tmp" doesn't exist

      Case 2: unexpected Exception e java.io.StreamCorruptedException: InputStream does not contain a serialized object

      NOTE: java.io.StreamCorruptedException results when tester tries to "fudge" the test by creating a file named "t.tmp"
      containing bogus data.

      enableResolveObjectTest expects to find a serialized object in testStream from MyObjectInputStream but the serialized object
      never seems to be getting stored there in the first place??

      Here is the code block from enableResolveObjectTest.java:

      void run() throws Exception {
          46 /*
          47 ByteArrayOutputStream outStream = new ByteArrayOutputStream();
          48 ObjectOutputStream aStream = new ObjectOutputStream(outStream);
          49
          50 aStream.writeInt(12345);
          51 aStream.writeObject("Today");
          52
          53 StringBufferInputStream inStream = new StringBufferInputStream(outStream.toString());
          54 */
          55 FileInputStream istream = new FileInputStream("t.tmp");
          56 MyObjectInputStream testStream = new MyObjectInputStream(istream);
          57 testStream.ResolveObjects();
          58 }


      Test Platform
      =============

      SunOS rstones 5.7 Generic_106541-11 sun4u sparc SUNW,Ultra-5_10System = SunOS
      Node = rstones
      Release = 5.7
      KernelID = Generic_106541-11
      Machine = sun4u

      Test JDK
      ========

      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-b18)
      Java HotSpot(TM) Client VM (build 1.3.0-b18, mixed mode)


      To reproduce the problem
      ========================

      1) Install Solaris JDK 1.3_b18 on your Solaris 2.7 machine
      2) Run the java.security Permissions tests
      3) Check test result for Test Name = enableResolveObjectTest:

      Expected result: (as seen on win32)

      Test Name = enableResolveObjectTest
      Test Args = void Expected Result = true
      Test Result = PASS: passed the test as expected

      Actual Result: (as seen on Solaris)

      Test Name = enableResolveObjectTest
      Test Args = void Expected Result = true
      Test Result = FAIL : unexpected Exception e java.io.StreamCorruptedException: InputStream does not contain a serialized object

      java.io.StreamCorruptedException: InputStream does not contain a serialized object
              at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:849)
              at java.io.ObjectInputStream.<init>(ObjectInputStream.java:168)
              at MyObjectInputStream.<init>(MyObjectInputStream.java:34)
              at enableResolveObjectTest.run(enableResolveObjectTest.java:56)
              at SecurityTest.verify(SecurityTest.java:76)
              at enableResolveObjectTest.main(enableResolveObjectTest.java:71)





      william.ihle@eng 2000-06-14

            skesunw Stuart Ke (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: