You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Suresh Thalamati (JIRA)" <de...@db.apache.org> on 2005/09/20 00:20:47 UTC

[jira] Created: (DERBY-577) Test harness should not change the user.dir property , it is meant for infomative purpose only.

Test  harness should not change the user.dir property , it is meant for infomative purpose only.  
--------------------------------------------------------------------------------------------------

         Key: DERBY-577
         URL: http://issues.apache.org/jira/browse/DERBY-577
     Project: Derby
        Type: Improvement
  Components: Test  
    Reporter: Suresh Thalamati
    Priority: Minor


If  the  user.dir property is changed ,  you wil  find IO calls are working on different directory than what is returned  by 
File.getAbsolutePath()   if the file handle is created with a relative path  because of JVM issue: 4117557 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4117557

I think  it  is  not good  idea for test harness to change  the user.dir property.    It makes hard to debug tests ,  because 
files  are not created  at  diferent location than  what is returned by getAbsolutePath().    Atleast,   I had  fun time figuring out this :-)

user.dir  is being  changed at the following code segment :
org.apache.derbyTesting.functionTests.harness. RunTest.java 
 testJvmProps.addElement("user.dir="+userDirName);








-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Commented: (DERBY-577) Test harness should not change the user.dir property , it is meant for infomative purpose only.

Posted by Suresh Thalamati <su...@gmail.com>.
Thanks for fixing this bug Myrna. It is not necessary to port this fix 
into 10.1 branch.

-suresh

Myrna van Lunteren wrote:
> Hi,
>  
> I don't think this is needed in 10.1, but Suresh logged this, Suresh, 
> what say you?
>  
> Myrna
> 
>  
> On 5/10/06, *Andrew McIntyre (JIRA)* <derby-dev@db.apache.org 
> <ma...@db.apache.org>> wrote:
> 
>        [
>     http://issues.apache.org/jira/browse/DERBY-577?page=comments#action_12378843
>     <http://issues.apache.org/jira/browse/DERBY-577?page=comments#action_12378843>
>     ]
> 
>     Andrew McIntyre commented on DERBY-577:
>     ---------------------------------------
> 
>     Committed to trunk with revision 405670. Do you need this in 10.1?
> 
>      > Test  harness should not change the user.dir property , it is
>     meant for infomative purpose only.
>      >
>     ------------------------------------------------------------------------------------------------
>      >
>      >          Key: DERBY-577
>      >          URL: http://issues.apache.org/jira/browse/DERBY-577
>      >      Project: Derby
>      >         Type: Improvement
> 
>      >   Components: Test
>      >     Versions: 10.2.0.0 <http://10.2.0.0>
>      >     Reporter: Suresh Thalamati
>      >     Assignee: Myrna van Lunteren
>      >     Priority: Minor
>      >  Attachments: DERBY-577_102_20060509.diff,
>     DERBY-577_102_20060509.stat
>      >
>      > If  the  user.dir property is changed ,  you wil  find IO calls
>     are working on different directory than what is returned  by
>      > File.getAbsolutePath()   if the file handle is created with a
>     relative path  because of JVM issue: 4117557
>     http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4117557
>     <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4117557>
>      > I think  it  is  not good  idea for test harness to change  the
>     user.dir property.    It makes hard to debug tests ,  because
>      > files  are not created  at  diferent location than  what is
>     returned by getAbsolutePath().    Atleast,   I had  fun time
>     figuring out this :-)
>      > user.dir  is being  changed at the following code segment :
>      > org.apache.derbyTesting.functionTests.harness. RunTest.java
>      >  testJvmProps.addElement("user.dir="+userDirName);
> 
>     --
>     This message is automatically generated by JIRA.
>     -
>     If you think it was sent incorrectly contact one of the administrators:
>       http://issues.apache.org/jira/secure/Administrators.jspa
>     -
>     For more information on JIRA, see:
>       http://www.atlassian.com/software/jira
> 
> 


Re: [jira] Commented: (DERBY-577) Test harness should not change the user.dir property , it is meant for infomative purpose only.

Posted by Myrna van Lunteren <m....@gmail.com>.
Hi,

I don't think this is needed in 10.1, but Suresh logged this, Suresh, what
say you?

Myrna


On 5/10/06, Andrew McIntyre (JIRA) <de...@db.apache.org> wrote:
>
>    [
> http://issues.apache.org/jira/browse/DERBY-577?page=comments#action_12378843]
>
> Andrew McIntyre commented on DERBY-577:
> ---------------------------------------
>
> Committed to trunk with revision 405670. Do you need this in 10.1?
>
> > Test  harness should not change the user.dir property , it is meant for
> infomative purpose only.
> >
> ------------------------------------------------------------------------------------------------
> >
> >          Key: DERBY-577
> >          URL: http://issues.apache.org/jira/browse/DERBY-577
> >      Project: Derby
> >         Type: Improvement
>
> >   Components: Test
> >     Versions: 10.2.0.0
> >     Reporter: Suresh Thalamati
> >     Assignee: Myrna van Lunteren
> >     Priority: Minor
> >  Attachments: DERBY-577_102_20060509.diff, DERBY-577_102_20060509.stat
> >
> > If  the  user.dir property is changed ,  you wil  find IO calls are
> working on different directory than what is returned  by
> > File.getAbsolutePath()   if the file handle is created with a relative
> path  because of JVM issue: 4117557
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4117557
> > I think  it  is  not good  idea for test harness to change  the user.dirproperty.    It makes hard to debug tests ,  because
> > files  are not created  at  diferent location than  what is returned by
> getAbsolutePath().    Atleast,   I had  fun time figuring out this :-)
> > user.dir  is being  changed at the following code segment :
> > org.apache.derbyTesting.functionTests.harness. RunTest.java
> >  testJvmProps.addElement("user.dir="+userDirName);
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
>   http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>   http://www.atlassian.com/software/jira
>
>

[jira] Updated: (DERBY-577) Test harness should not change the user.dir property , it is meant for infomative purpose only.

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-577?page=all ]

Myrna van Lunteren updated DERBY-577:
-------------------------------------

    Attachment: DERBY-577_102_20060509.stat
                DERBY-577_102_20060509.diff

Attached patch - DERBY-577_102_20060509.* - removes the testJvmProps.addElement("user.dir="+userDirName); line from RunTest, as well as some additional lines that set user.dir.
As a result of this change, 2 tests failed - store/Beetle6038.java and tools/dblook_test.java (and derbynet/dblook_test_net.java which extends the tools one). With the change, these tests would pass when run with RunTest, but fail in a suite. 
I found that instead of relying on getCanonicalPath() for these tests, I had to use a full path obtained by accessing derby.system.home - property - hence the changes to dblook_test.java and Beetle6038.java.

derbyall passes with this change except for:
 - wisconsin (looks like the known intermittent different optimizer choice)
- SuicideOfStreaming (known current failure)
- runtimeinfo (which fails intermittently in this 1 environment but passes elsewhere for me)


> Test  harness should not change the user.dir property , it is meant for infomative purpose only.
> ------------------------------------------------------------------------------------------------
>
>          Key: DERBY-577
>          URL: http://issues.apache.org/jira/browse/DERBY-577
>      Project: Derby
>         Type: Improvement

>   Components: Test
>     Reporter: Suresh Thalamati
>     Assignee: Myrna van Lunteren
>     Priority: Minor
>  Attachments: DERBY-577_102_20060509.diff, DERBY-577_102_20060509.stat
>
> If  the  user.dir property is changed ,  you wil  find IO calls are working on different directory than what is returned  by 
> File.getAbsolutePath()   if the file handle is created with a relative path  because of JVM issue: 4117557 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4117557
> I think  it  is  not good  idea for test harness to change  the user.dir property.    It makes hard to debug tests ,  because 
> files  are not created  at  diferent location than  what is returned by getAbsolutePath().    Atleast,   I had  fun time figuring out this :-)
> user.dir  is being  changed at the following code segment :
> org.apache.derbyTesting.functionTests.harness. RunTest.java 
>  testJvmProps.addElement("user.dir="+userDirName);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-577) Test harness should not change the user.dir property , it is meant for infomative purpose only.

Posted by "Thomas Lecavelier (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-577?page=comments#action_12329982 ] 

Thomas Lecavelier commented on DERBY-577:
-----------------------------------------

Hi Suresh,

I follow the references about userDirName, it appears it's build from System.getProperties() and I see nowhere "userDirName" is modified. If you see an occurence, could you specify where, please?

Anyway, it seems user.dir is only use to create a tree of nested directories in order to perform tests. Maybe it could be remove safely from the jvm argLine used for the tests.

> Test  harness should not change the user.dir property , it is meant for infomative purpose only.
> ------------------------------------------------------------------------------------------------
>
>          Key: DERBY-577
>          URL: http://issues.apache.org/jira/browse/DERBY-577
>      Project: Derby
>         Type: Improvement
>   Components: Test
>     Reporter: Suresh Thalamati
>     Priority: Minor

>
> If  the  user.dir property is changed ,  you wil  find IO calls are working on different directory than what is returned  by 
> File.getAbsolutePath()   if the file handle is created with a relative path  because of JVM issue: 4117557 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4117557
> I think  it  is  not good  idea for test harness to change  the user.dir property.    It makes hard to debug tests ,  because 
> files  are not created  at  diferent location than  what is returned by getAbsolutePath().    Atleast,   I had  fun time figuring out this :-)
> user.dir  is being  changed at the following code segment :
> org.apache.derbyTesting.functionTests.harness. RunTest.java 
>  testJvmProps.addElement("user.dir="+userDirName);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DERBY-577) Test harness should not change the user.dir property , it is meant for infomative purpose only.

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-577?page=all ]
     
Myrna van Lunteren resolved DERBY-577:
--------------------------------------

    Fix Version: 10.2.0.0
     Resolution: Fixed
     Derby Info:   (was: [Patch Available])

Suresh indicated on the list that it
"[...] is not necessary to port this fix into 10.1 branch."

> Test  harness should not change the user.dir property , it is meant for infomative purpose only.
> ------------------------------------------------------------------------------------------------
>
>          Key: DERBY-577
>          URL: http://issues.apache.org/jira/browse/DERBY-577
>      Project: Derby
>         Type: Improvement

>   Components: Test
>     Versions: 10.2.0.0
>     Reporter: Suresh Thalamati
>     Assignee: Myrna van Lunteren
>     Priority: Minor
>      Fix For: 10.2.0.0
>  Attachments: DERBY-577_102_20060509.diff, DERBY-577_102_20060509.stat
>
> If  the  user.dir property is changed ,  you wil  find IO calls are working on different directory than what is returned  by 
> File.getAbsolutePath()   if the file handle is created with a relative path  because of JVM issue: 4117557 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4117557
> I think  it  is  not good  idea for test harness to change  the user.dir property.    It makes hard to debug tests ,  because 
> files  are not created  at  diferent location than  what is returned by getAbsolutePath().    Atleast,   I had  fun time figuring out this :-)
> user.dir  is being  changed at the following code segment :
> org.apache.derbyTesting.functionTests.harness. RunTest.java 
>  testJvmProps.addElement("user.dir="+userDirName);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-577) Test harness should not change the user.dir property , it is meant for infomative purpose only.

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-577?page=all ]

Myrna van Lunteren updated DERBY-577:
-------------------------------------

       Version: 10.2.0.0
    Derby Info: [Patch Available]

> Test  harness should not change the user.dir property , it is meant for infomative purpose only.
> ------------------------------------------------------------------------------------------------
>
>          Key: DERBY-577
>          URL: http://issues.apache.org/jira/browse/DERBY-577
>      Project: Derby
>         Type: Improvement

>   Components: Test
>     Versions: 10.2.0.0
>     Reporter: Suresh Thalamati
>     Assignee: Myrna van Lunteren
>     Priority: Minor
>  Attachments: DERBY-577_102_20060509.diff, DERBY-577_102_20060509.stat
>
> If  the  user.dir property is changed ,  you wil  find IO calls are working on different directory than what is returned  by 
> File.getAbsolutePath()   if the file handle is created with a relative path  because of JVM issue: 4117557 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4117557
> I think  it  is  not good  idea for test harness to change  the user.dir property.    It makes hard to debug tests ,  because 
> files  are not created  at  diferent location than  what is returned by getAbsolutePath().    Atleast,   I had  fun time figuring out this :-)
> user.dir  is being  changed at the following code segment :
> org.apache.derbyTesting.functionTests.harness. RunTest.java 
>  testJvmProps.addElement("user.dir="+userDirName);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (DERBY-577) Test harness should not change the user.dir property , it is meant for infomative purpose only.

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-577?page=all ]
     
Myrna van Lunteren closed DERBY-577:
------------------------------------


> Test  harness should not change the user.dir property , it is meant for infomative purpose only.
> ------------------------------------------------------------------------------------------------
>
>          Key: DERBY-577
>          URL: http://issues.apache.org/jira/browse/DERBY-577
>      Project: Derby
>         Type: Improvement

>   Components: Test
>     Versions: 10.2.0.0
>     Reporter: Suresh Thalamati
>     Assignee: Myrna van Lunteren
>     Priority: Minor
>      Fix For: 10.2.0.0
>  Attachments: DERBY-577_102_20060509.diff, DERBY-577_102_20060509.stat
>
> If  the  user.dir property is changed ,  you wil  find IO calls are working on different directory than what is returned  by 
> File.getAbsolutePath()   if the file handle is created with a relative path  because of JVM issue: 4117557 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4117557
> I think  it  is  not good  idea for test harness to change  the user.dir property.    It makes hard to debug tests ,  because 
> files  are not created  at  diferent location than  what is returned by getAbsolutePath().    Atleast,   I had  fun time figuring out this :-)
> user.dir  is being  changed at the following code segment :
> org.apache.derbyTesting.functionTests.harness. RunTest.java 
>  testJvmProps.addElement("user.dir="+userDirName);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-577) Test harness should not change the user.dir property , it is meant for infomative purpose only.

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-577?page=comments#action_12378843 ] 

Andrew McIntyre commented on DERBY-577:
---------------------------------------

Committed to trunk with revision 405670. Do you need this in 10.1?

> Test  harness should not change the user.dir property , it is meant for infomative purpose only.
> ------------------------------------------------------------------------------------------------
>
>          Key: DERBY-577
>          URL: http://issues.apache.org/jira/browse/DERBY-577
>      Project: Derby
>         Type: Improvement

>   Components: Test
>     Versions: 10.2.0.0
>     Reporter: Suresh Thalamati
>     Assignee: Myrna van Lunteren
>     Priority: Minor
>  Attachments: DERBY-577_102_20060509.diff, DERBY-577_102_20060509.stat
>
> If  the  user.dir property is changed ,  you wil  find IO calls are working on different directory than what is returned  by 
> File.getAbsolutePath()   if the file handle is created with a relative path  because of JVM issue: 4117557 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4117557
> I think  it  is  not good  idea for test harness to change  the user.dir property.    It makes hard to debug tests ,  because 
> files  are not created  at  diferent location than  what is returned by getAbsolutePath().    Atleast,   I had  fun time figuring out this :-)
> user.dir  is being  changed at the following code segment :
> org.apache.derbyTesting.functionTests.harness. RunTest.java 
>  testJvmProps.addElement("user.dir="+userDirName);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (DERBY-577) Test harness should not change the user.dir property , it is meant for infomative purpose only.

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-577?page=all ]

Myrna van Lunteren reassigned DERBY-577:
----------------------------------------

    Assign To: Myrna van Lunteren

> Test  harness should not change the user.dir property , it is meant for infomative purpose only.
> ------------------------------------------------------------------------------------------------
>
>          Key: DERBY-577
>          URL: http://issues.apache.org/jira/browse/DERBY-577
>      Project: Derby
>         Type: Improvement

>   Components: Test
>     Reporter: Suresh Thalamati
>     Assignee: Myrna van Lunteren
>     Priority: Minor

>
> If  the  user.dir property is changed ,  you wil  find IO calls are working on different directory than what is returned  by 
> File.getAbsolutePath()   if the file handle is created with a relative path  because of JVM issue: 4117557 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4117557
> I think  it  is  not good  idea for test harness to change  the user.dir property.    It makes hard to debug tests ,  because 
> files  are not created  at  diferent location than  what is returned by getAbsolutePath().    Atleast,   I had  fun time figuring out this :-)
> user.dir  is being  changed at the following code segment :
> org.apache.derbyTesting.functionTests.harness. RunTest.java 
>  testJvmProps.addElement("user.dir="+userDirName);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira