You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Ivan Popov (JIRA)" <ji...@apache.org> on 2007/06/15 15:38:26 UTC

[jira] Created: (HARMONY-4190) [jdktools][samsa][eut] Harmony JDK java wrapper strips quotes for JVM properties and program arguments

[jdktools][samsa][eut] Harmony JDK java wrapper strips quotes for JVM properties and program arguments
------------------------------------------------------------------------------------------------------

                 Key: HARMONY-4190
                 URL: https://issues.apache.org/jira/browse/HARMONY-4190
             Project: Harmony
          Issue Type: Bug
          Components: JDK
         Environment: Windows/x86, harmony-jdk-r547543
            Reporter: Ivan Popov
         Attachments: check_quotes_jdk.zip

In addition to an issue with Harmony JRE launcher (HARMONY-4189), Harmony JDK java wrapper strips quotes from both JVM properties and program arguments specified in command line. This is reproduced only on Windows. On Linux JDK java wrapper works similarly to JRE java launcher. 

I'm attaching archive with simple tests and scripts, which launches tests with different quotation. Here is results on Windows, which demonstrates the difference with RI:

$ sh check_props.sh

Testing quotes for JVM properties
====== Checking JDK\jre/bin/java ======
*** SUN JRE output:
foo
foo
"foo"
'foo'
*** Harmony JRE output:
foo
foo
foo
foo
====== Checking JDK/bin/java ======
*** SUN JDK output:
foo
foo
"foo"
'foo'
*** Harmony JDK output:
foo
foo
foo
foo
============ Done ============
Testing quotes for empty JVM properties
====== Checking JDK/jre/bin/java ======
*** SUN JRE output:


""
''
*** Harmony JRE output:




====== Checking JDK/bin/java ======
*** SUN JDK output:


""
''
*** Harmony JDK output:




============ Done ============

$ sh check_args.sh
Testing quotes for program arguments
====== Checking JDK/jre/bin/java ======
*** SUN JRE output:
foo
foo
"foo"
'foo'
*** Harmony JRE output:
foo
foo
"foo"
'foo'
====== Checking JDK/bin/java ======
*** SUN JDK output:
foo
foo
"foo"
'foo'
*** Harmony JDK output:
foo
foo
foo
'foo'
============ Done ============
Testing quotes for empty program arguments
====== Checking JDK/jre/bin/java ======
*** SUN JRE output:


""
''
*** Harmony JRE output:


""
''
====== Checking JDK/bin/java ======
*** SUN JDK output:


""
''
*** Harmony JDK output:

''
============ Done ============

This difference causes 13 EUT tests failures (org.eclipse.jdt.debug.tests.core.ArgumentTests) mentioned in HARMONY-4186.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4190) [jdktools][samsa][eut] Harmony JDK java wrapper strips quotes for JVM properties and program arguments

Posted by "Ivan Popov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Popov updated HARMONY-4190:
--------------------------------

    Attachment: jdktools_samsa.patch

Attached patch "jdktools_samsa.patch" solves this problem with quoted arguments in jdk/bin/java wrapper on Windows. It still uses CreateProcess() with single command line, but now it quotes each argument and escapes existing double quote chars with '\'. Thus, all quotes and arguments with spaces are safely passed to JRE launcher.

With this patch both jdk/bin/java wrapper and jdk/jre/bin/java launcher behaves similarly. This behaviour corresponds to RI in handling quoted program arguments, but still differ from RI in handling quoted value of JVM properties due to HARMONY-4189.

This patch also includes fix for HARMONY-4253 (supporting -J options in tools wrappers).


> [jdktools][samsa][eut] Harmony JDK java wrapper strips quotes for JVM properties and program arguments
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4190
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4190
>             Project: Harmony
>          Issue Type: Bug
>          Components: JDK
>         Environment: Windows/x86, harmony-jdk-r547543
>            Reporter: Ivan Popov
>         Attachments: check_quotes_jdk.zip, jdktools_samsa.patch
>
>
> In addition to an issue with Harmony JRE launcher (HARMONY-4189), Harmony JDK java wrapper strips quotes from both JVM properties and program arguments specified in command line. This is reproduced only on Windows. On Linux JDK java wrapper works similarly to JRE java launcher. 
> I'm attaching archive with simple tests and scripts, which launches tests with different quotation. Here is results on Windows, which demonstrates the difference with RI:
> $ sh check_props.sh
> Testing quotes for JVM properties
> ====== Checking JDK\jre/bin/java ======
> *** SUN JRE output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JRE output:
> foo
> foo
> foo
> foo
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JDK output:
> foo
> foo
> foo
> foo
> ============ Done ============
> Testing quotes for empty JVM properties
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> ""
> ''
> *** Harmony JRE output:
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> ""
> ''
> *** Harmony JDK output:
> ============ Done ============
> $ sh check_args.sh
> Testing quotes for program arguments
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JRE output:
> foo
> foo
> "foo"
> 'foo'
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JDK output:
> foo
> foo
> foo
> 'foo'
> ============ Done ============
> Testing quotes for empty program arguments
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> ""
> ''
> *** Harmony JRE output:
> ""
> ''
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> ""
> ''
> *** Harmony JDK output:
> ''
> ============ Done ============
> This difference causes 13 EUT tests failures (org.eclipse.jdt.debug.tests.core.ArgumentTests) mentioned in HARMONY-4186.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-4190) [jdktools][samsa][eut] Harmony JDK java wrapper strips quotes for JVM properties and program arguments

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gregory Shimansky resolved HARMONY-4190.
----------------------------------------

    Resolution: Fixed

I've committed the patch at 549519. I have a question about it however. Should cmd_line be freed in the parent process after an attempt to create the child process?

> [jdktools][samsa][eut] Harmony JDK java wrapper strips quotes for JVM properties and program arguments
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4190
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4190
>             Project: Harmony
>          Issue Type: Bug
>          Components: JDK
>         Environment: Windows/x86, harmony-jdk-r547543
>            Reporter: Ivan Popov
>            Assignee: Gregory Shimansky
>         Attachments: check_quotes_jdk.zip, jdktools_samsa.patch
>
>
> In addition to an issue with Harmony JRE launcher (HARMONY-4189), Harmony JDK java wrapper strips quotes from both JVM properties and program arguments specified in command line. This is reproduced only on Windows. On Linux JDK java wrapper works similarly to JRE java launcher. 
> I'm attaching archive with simple tests and scripts, which launches tests with different quotation. Here is results on Windows, which demonstrates the difference with RI:
> $ sh check_props.sh
> Testing quotes for JVM properties
> ====== Checking JDK\jre/bin/java ======
> *** SUN JRE output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JRE output:
> foo
> foo
> foo
> foo
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JDK output:
> foo
> foo
> foo
> foo
> ============ Done ============
> Testing quotes for empty JVM properties
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> ""
> ''
> *** Harmony JRE output:
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> ""
> ''
> *** Harmony JDK output:
> ============ Done ============
> $ sh check_args.sh
> Testing quotes for program arguments
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JRE output:
> foo
> foo
> "foo"
> 'foo'
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JDK output:
> foo
> foo
> foo
> 'foo'
> ============ Done ============
> Testing quotes for empty program arguments
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> ""
> ''
> *** Harmony JRE output:
> ""
> ''
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> ""
> ''
> *** Harmony JDK output:
> ''
> ============ Done ============
> This difference causes 13 EUT tests failures (org.eclipse.jdt.debug.tests.core.ArgumentTests) mentioned in HARMONY-4186.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-4190) [jdktools][samsa][eut] Harmony JDK java wrapper strips quotes for JVM properties and program arguments

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gregory Shimansky reassigned HARMONY-4190:
------------------------------------------

    Assignee: Gregory Shimansky

> [jdktools][samsa][eut] Harmony JDK java wrapper strips quotes for JVM properties and program arguments
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4190
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4190
>             Project: Harmony
>          Issue Type: Bug
>          Components: JDK
>         Environment: Windows/x86, harmony-jdk-r547543
>            Reporter: Ivan Popov
>            Assignee: Gregory Shimansky
>         Attachments: check_quotes_jdk.zip, jdktools_samsa.patch
>
>
> In addition to an issue with Harmony JRE launcher (HARMONY-4189), Harmony JDK java wrapper strips quotes from both JVM properties and program arguments specified in command line. This is reproduced only on Windows. On Linux JDK java wrapper works similarly to JRE java launcher. 
> I'm attaching archive with simple tests and scripts, which launches tests with different quotation. Here is results on Windows, which demonstrates the difference with RI:
> $ sh check_props.sh
> Testing quotes for JVM properties
> ====== Checking JDK\jre/bin/java ======
> *** SUN JRE output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JRE output:
> foo
> foo
> foo
> foo
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JDK output:
> foo
> foo
> foo
> foo
> ============ Done ============
> Testing quotes for empty JVM properties
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> ""
> ''
> *** Harmony JRE output:
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> ""
> ''
> *** Harmony JDK output:
> ============ Done ============
> $ sh check_args.sh
> Testing quotes for program arguments
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JRE output:
> foo
> foo
> "foo"
> 'foo'
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JDK output:
> foo
> foo
> foo
> 'foo'
> ============ Done ============
> Testing quotes for empty program arguments
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> ""
> ''
> *** Harmony JRE output:
> ""
> ''
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> ""
> ''
> *** Harmony JDK output:
> ''
> ============ Done ============
> This difference causes 13 EUT tests failures (org.eclipse.jdt.debug.tests.core.ArgumentTests) mentioned in HARMONY-4186.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-4190) [jdktools][samsa][eut] Harmony JDK java wrapper strips quotes for JVM properties and program arguments

Posted by "Ivan Popov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Popov closed HARMONY-4190.
-------------------------------


For me samsa wrapper is working well now. However, I noticed rare intermittent failures of launching jdktools in CC/CI runs, but this may be addressed in a separate issue. So, I'm closing this issue

> [jdktools][samsa][eut] Harmony JDK java wrapper strips quotes for JVM properties and program arguments
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4190
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4190
>             Project: Harmony
>          Issue Type: Bug
>          Components: JDK
>         Environment: Windows/x86, harmony-jdk-r547543
>            Reporter: Ivan Popov
>            Assignee: Gregory Shimansky
>         Attachments: check_quotes_jdk.zip, free_cmd_line.patch, jdktools_samsa.patch
>
>
> In addition to an issue with Harmony JRE launcher (HARMONY-4189), Harmony JDK java wrapper strips quotes from both JVM properties and program arguments specified in command line. This is reproduced only on Windows. On Linux JDK java wrapper works similarly to JRE java launcher. 
> I'm attaching archive with simple tests and scripts, which launches tests with different quotation. Here is results on Windows, which demonstrates the difference with RI:
> $ sh check_props.sh
> Testing quotes for JVM properties
> ====== Checking JDK\jre/bin/java ======
> *** SUN JRE output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JRE output:
> foo
> foo
> foo
> foo
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JDK output:
> foo
> foo
> foo
> foo
> ============ Done ============
> Testing quotes for empty JVM properties
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> ""
> ''
> *** Harmony JRE output:
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> ""
> ''
> *** Harmony JDK output:
> ============ Done ============
> $ sh check_args.sh
> Testing quotes for program arguments
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JRE output:
> foo
> foo
> "foo"
> 'foo'
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JDK output:
> foo
> foo
> foo
> 'foo'
> ============ Done ============
> Testing quotes for empty program arguments
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> ""
> ''
> *** Harmony JRE output:
> ""
> ''
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> ""
> ''
> *** Harmony JDK output:
> ''
> ============ Done ============
> This difference causes 13 EUT tests failures (org.eclipse.jdt.debug.tests.core.ArgumentTests) mentioned in HARMONY-4186.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4190) [jdktools][samsa][eut] Harmony JDK java wrapper strips quotes for JVM properties and program arguments

Posted by "Ivan Popov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Popov updated HARMONY-4190:
--------------------------------

    Patch Info: [Patch Available]

> [jdktools][samsa][eut] Harmony JDK java wrapper strips quotes for JVM properties and program arguments
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4190
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4190
>             Project: Harmony
>          Issue Type: Bug
>          Components: JDK
>         Environment: Windows/x86, harmony-jdk-r547543
>            Reporter: Ivan Popov
>         Attachments: check_quotes_jdk.zip, jdktools_samsa.patch
>
>
> In addition to an issue with Harmony JRE launcher (HARMONY-4189), Harmony JDK java wrapper strips quotes from both JVM properties and program arguments specified in command line. This is reproduced only on Windows. On Linux JDK java wrapper works similarly to JRE java launcher. 
> I'm attaching archive with simple tests and scripts, which launches tests with different quotation. Here is results on Windows, which demonstrates the difference with RI:
> $ sh check_props.sh
> Testing quotes for JVM properties
> ====== Checking JDK\jre/bin/java ======
> *** SUN JRE output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JRE output:
> foo
> foo
> foo
> foo
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JDK output:
> foo
> foo
> foo
> foo
> ============ Done ============
> Testing quotes for empty JVM properties
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> ""
> ''
> *** Harmony JRE output:
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> ""
> ''
> *** Harmony JDK output:
> ============ Done ============
> $ sh check_args.sh
> Testing quotes for program arguments
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JRE output:
> foo
> foo
> "foo"
> 'foo'
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JDK output:
> foo
> foo
> foo
> 'foo'
> ============ Done ============
> Testing quotes for empty program arguments
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> ""
> ''
> *** Harmony JRE output:
> ""
> ''
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> ""
> ''
> *** Harmony JDK output:
> ''
> ============ Done ============
> This difference causes 13 EUT tests failures (org.eclipse.jdt.debug.tests.core.ArgumentTests) mentioned in HARMONY-4186.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-4190) [jdktools][samsa][eut] Harmony JDK java wrapper strips quotes for JVM properties and program arguments

Posted by "Ivan Popov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506889 ] 

Ivan Popov commented on HARMONY-4190:
-------------------------------------

The root cause of this problem is that samsa wrapper uses CreateProcess() from Win32 API to launch child java process. This function requires merging all arguments into single command line and this results in missed quotes. The problem gets worse if one uses quoted arguments or system properties with spaces, samsa wrapper handles them incorrectly.

The simplest solution would be to use _execv() or _spawnv() functions instead of CreateProcess(), they use array of arguments instead of single command line, and thus they should not eat quotes or break arguments with spaces. I tried this approach, but it did not help. Functions _execv() and _spawnl(_P_OVERLAY) return to command prompt immediately after launching child process, this is not acceptable. Function _spawnl(_P_WAIT) works much better and behaves like CreateProcess(), but it still eats quotes from arguments passed in the arguments array.

It seems the solution would be to use CreateProcess() or _spawnl(_P_WAIT), but detect and escape quotes in arguments. I'll try this approach.


> [jdktools][samsa][eut] Harmony JDK java wrapper strips quotes for JVM properties and program arguments
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4190
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4190
>             Project: Harmony
>          Issue Type: Bug
>          Components: JDK
>         Environment: Windows/x86, harmony-jdk-r547543
>            Reporter: Ivan Popov
>         Attachments: check_quotes_jdk.zip
>
>
> In addition to an issue with Harmony JRE launcher (HARMONY-4189), Harmony JDK java wrapper strips quotes from both JVM properties and program arguments specified in command line. This is reproduced only on Windows. On Linux JDK java wrapper works similarly to JRE java launcher. 
> I'm attaching archive with simple tests and scripts, which launches tests with different quotation. Here is results on Windows, which demonstrates the difference with RI:
> $ sh check_props.sh
> Testing quotes for JVM properties
> ====== Checking JDK\jre/bin/java ======
> *** SUN JRE output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JRE output:
> foo
> foo
> foo
> foo
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JDK output:
> foo
> foo
> foo
> foo
> ============ Done ============
> Testing quotes for empty JVM properties
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> ""
> ''
> *** Harmony JRE output:
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> ""
> ''
> *** Harmony JDK output:
> ============ Done ============
> $ sh check_args.sh
> Testing quotes for program arguments
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JRE output:
> foo
> foo
> "foo"
> 'foo'
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JDK output:
> foo
> foo
> foo
> 'foo'
> ============ Done ============
> Testing quotes for empty program arguments
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> ""
> ''
> *** Harmony JRE output:
> ""
> ''
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> ""
> ''
> *** Harmony JDK output:
> ''
> ============ Done ============
> This difference causes 13 EUT tests failures (org.eclipse.jdt.debug.tests.core.ArgumentTests) mentioned in HARMONY-4186.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4190) [jdktools][samsa][eut] Harmony JDK java wrapper strips quotes for JVM properties and program arguments

Posted by "Ivan Popov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Popov updated HARMONY-4190:
--------------------------------

    Attachment: check_quotes_jdk.zip

> [jdktools][samsa][eut] Harmony JDK java wrapper strips quotes for JVM properties and program arguments
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4190
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4190
>             Project: Harmony
>          Issue Type: Bug
>          Components: JDK
>         Environment: Windows/x86, harmony-jdk-r547543
>            Reporter: Ivan Popov
>         Attachments: check_quotes_jdk.zip
>
>
> In addition to an issue with Harmony JRE launcher (HARMONY-4189), Harmony JDK java wrapper strips quotes from both JVM properties and program arguments specified in command line. This is reproduced only on Windows. On Linux JDK java wrapper works similarly to JRE java launcher. 
> I'm attaching archive with simple tests and scripts, which launches tests with different quotation. Here is results on Windows, which demonstrates the difference with RI:
> $ sh check_props.sh
> Testing quotes for JVM properties
> ====== Checking JDK\jre/bin/java ======
> *** SUN JRE output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JRE output:
> foo
> foo
> foo
> foo
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JDK output:
> foo
> foo
> foo
> foo
> ============ Done ============
> Testing quotes for empty JVM properties
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> ""
> ''
> *** Harmony JRE output:
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> ""
> ''
> *** Harmony JDK output:
> ============ Done ============
> $ sh check_args.sh
> Testing quotes for program arguments
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JRE output:
> foo
> foo
> "foo"
> 'foo'
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JDK output:
> foo
> foo
> foo
> 'foo'
> ============ Done ============
> Testing quotes for empty program arguments
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> ""
> ''
> *** Harmony JRE output:
> ""
> ''
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> ""
> ''
> *** Harmony JDK output:
> ''
> ============ Done ============
> This difference causes 13 EUT tests failures (org.eclipse.jdt.debug.tests.core.ArgumentTests) mentioned in HARMONY-4186.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4190) [jdktools][samsa][eut] Harmony JDK java wrapper strips quotes for JVM properties and program arguments

Posted by "Ivan Popov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Popov updated HARMONY-4190:
--------------------------------

    Attachment: free_cmd_line.patch

Gregory, you are right, it should be freed. I'm attaching additional patch, please apply it.
Thank you for this notice.


> [jdktools][samsa][eut] Harmony JDK java wrapper strips quotes for JVM properties and program arguments
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4190
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4190
>             Project: Harmony
>          Issue Type: Bug
>          Components: JDK
>         Environment: Windows/x86, harmony-jdk-r547543
>            Reporter: Ivan Popov
>            Assignee: Gregory Shimansky
>         Attachments: check_quotes_jdk.zip, free_cmd_line.patch, jdktools_samsa.patch
>
>
> In addition to an issue with Harmony JRE launcher (HARMONY-4189), Harmony JDK java wrapper strips quotes from both JVM properties and program arguments specified in command line. This is reproduced only on Windows. On Linux JDK java wrapper works similarly to JRE java launcher. 
> I'm attaching archive with simple tests and scripts, which launches tests with different quotation. Here is results on Windows, which demonstrates the difference with RI:
> $ sh check_props.sh
> Testing quotes for JVM properties
> ====== Checking JDK\jre/bin/java ======
> *** SUN JRE output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JRE output:
> foo
> foo
> foo
> foo
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JDK output:
> foo
> foo
> foo
> foo
> ============ Done ============
> Testing quotes for empty JVM properties
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> ""
> ''
> *** Harmony JRE output:
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> ""
> ''
> *** Harmony JDK output:
> ============ Done ============
> $ sh check_args.sh
> Testing quotes for program arguments
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JRE output:
> foo
> foo
> "foo"
> 'foo'
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JDK output:
> foo
> foo
> foo
> 'foo'
> ============ Done ============
> Testing quotes for empty program arguments
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> ""
> ''
> *** Harmony JRE output:
> ""
> ''
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> ""
> ''
> *** Harmony JDK output:
> ''
> ============ Done ============
> This difference causes 13 EUT tests failures (org.eclipse.jdt.debug.tests.core.ArgumentTests) mentioned in HARMONY-4186.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-4190) [jdktools][samsa][eut] Harmony JDK java wrapper strips quotes for JVM properties and program arguments

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506947 ] 

Gregory Shimansky commented on HARMONY-4190:
--------------------------------------------

Additional patch applied at 549526.

> [jdktools][samsa][eut] Harmony JDK java wrapper strips quotes for JVM properties and program arguments
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4190
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4190
>             Project: Harmony
>          Issue Type: Bug
>          Components: JDK
>         Environment: Windows/x86, harmony-jdk-r547543
>            Reporter: Ivan Popov
>            Assignee: Gregory Shimansky
>         Attachments: check_quotes_jdk.zip, free_cmd_line.patch, jdktools_samsa.patch
>
>
> In addition to an issue with Harmony JRE launcher (HARMONY-4189), Harmony JDK java wrapper strips quotes from both JVM properties and program arguments specified in command line. This is reproduced only on Windows. On Linux JDK java wrapper works similarly to JRE java launcher. 
> I'm attaching archive with simple tests and scripts, which launches tests with different quotation. Here is results on Windows, which demonstrates the difference with RI:
> $ sh check_props.sh
> Testing quotes for JVM properties
> ====== Checking JDK\jre/bin/java ======
> *** SUN JRE output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JRE output:
> foo
> foo
> foo
> foo
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JDK output:
> foo
> foo
> foo
> foo
> ============ Done ============
> Testing quotes for empty JVM properties
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> ""
> ''
> *** Harmony JRE output:
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> ""
> ''
> *** Harmony JDK output:
> ============ Done ============
> $ sh check_args.sh
> Testing quotes for program arguments
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JRE output:
> foo
> foo
> "foo"
> 'foo'
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> foo
> foo
> "foo"
> 'foo'
> *** Harmony JDK output:
> foo
> foo
> foo
> 'foo'
> ============ Done ============
> Testing quotes for empty program arguments
> ====== Checking JDK/jre/bin/java ======
> *** SUN JRE output:
> ""
> ''
> *** Harmony JRE output:
> ""
> ''
> ====== Checking JDK/bin/java ======
> *** SUN JDK output:
> ""
> ''
> *** Harmony JDK output:
> ''
> ============ Done ============
> This difference causes 13 EUT tests failures (org.eclipse.jdt.debug.tests.core.ArgumentTests) mentioned in HARMONY-4186.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.