8019384: jps and jcmd tests fail when there is a process started with a .war file

Mandy Chung mandy.chung at oracle.com
Fri Jun 28 10:32:48 PDT 2013


The change looks fine with me.

Mandy

On 6/28/2013 8:35 AM, Alan Bateman 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