8019384: jps and jcmd tests fail when there is a process started with a .war file
Staffan Larsen
staffan.larsen at oracle.com
Fri Jun 28 10:26:33 PDT 2013
Looks good. I was going to suggest an even more liberal expression, but let's update as we find other cases.
/Staffan
On 28 jun 2013, at 17:35, Alan Bateman <Alan.Bateman at oracle.com> wrote:
>
> One jcmd and two jps tests fail if there is another VM on the system running a .war file, something that can easily happen when the tests are run via a CI system. Thanks to Staffan Larsen for diagnosing this one. So I'd like to change the awk scripts used by these tests so that they tolerate war files. The proposed patch is attached.
>
> Thanks,
>
> -Alan
>
>
>
> diff --git a/test/sun/tools/jcmd/jcmd_Output1.awk b/test/sun/tools/jcmd/jcmd_Output1.awk
> --- a/test/sun/tools/jcmd/jcmd_Output1.awk
> +++ b/test/sun/tools/jcmd/jcmd_Output1.awk
> @@ -8,10 +8,10 @@
> current=1;
> }
>
> -# or match on a path name to a jar file followed by arbitraty arguments
> +# or match on a path name to a jar or war file followed by arbitraty arguments
> # - note, jar files ending with ".jar" is only a convention, not a requirement.
> #Theoretically, any valid file name could occur here.
> -/^[0-9]+ .*\.jar($| .*$)/ {
> +/^[0-9]+ .*\.(jar|war)($| .*$)/ {
> current=1;
> }
>
> diff --git a/test/sun/tools/jps/jps-l_Output1.awk b/test/sun/tools/jps/jps-l_Output1.awk
> --- a/test/sun/tools/jps/jps-l_Output1.awk
> +++ b/test/sun/tools/jps/jps-l_Output1.awk
> @@ -8,10 +8,10 @@
> matched++;
> }
>
> -# or match on a jar file name - note, jar files ending with
> +# or match on a jar or war file name - note, jar files ending with
> # ".jar" is only a convention , not a requirement. Theoretically,
> # any valid file name could occur here.
> -/^[0-9]+ .*\.jar$/ {
> +/^[0-9]+ .*\.(jar|war)$/ {
> matched++;
> }
>
> diff --git a/test/sun/tools/jps/jps_Output1.awk b/test/sun/tools/jps/jps_Output1.awk
> --- a/test/sun/tools/jps/jps_Output1.awk
> +++ b/test/sun/tools/jps/jps_Output1.awk
> @@ -8,10 +8,10 @@
> matched++;
> }
>
> -# or match on a path name to a jar file - note, jar files ending with
> +# or match on a path name to a jar or war file - note, jar files ending with
> # ".jar" is only a convention, not a requirement. Theoretically,
> # any valid file name could occur here.
> -/^[0-9]+ .*\.jar$/ {
> +/^[0-9]+ .*\.(jar|war)$/ {
> matched++;
> }
>
>
More information about the serviceability-dev
mailing list