[DTrace-devel] [PATCH] test: replace gawk-specific function with more generic function

Kris Van Hees kris.van.hees at oracle.com
Thu May 25 03:31:05 UTC 2023


On Wed, May 24, 2023 at 07:30:23PM -0400, Eugene Loh via DTrace-devel wrote:
> Right.  I just think that can be specified in the commit msg.

Err.... I am confused... The commit msg says:

"The match(s, t, arr) form of the match function is specific to GAWK ..."

which is also what Nick says, and whi you (in reply to him) agree with.  So,
it *is* already there.

> On 5/24/23 13:43, Nick Alcock wrote:
> > On 22 May 2023, Eugene Loh via DTrace-devel outgrape:
> > 
> > > Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
> > > but what form of match() does one mean?  If it's the "third optional argument", perhaps one could say so explicitly.
> > It's... the form with three arguments. i.e., the match(s, t, arr) form
> > (taking an ARR).
> > 
> > > On 5/22/23 13:10, Kris Van Hees via DTrace-devel wrote:
> > > > The match(s, t, arr) form of the match function is specific to GAWK
> > > > and is thus best avoided in favour of the more generic split function
> > > > split(s, arr, t).
> > > > 
> > > > Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
> > > > ---
> > > >    runtest.sh | 2 +-
> > > >    1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/runtest.sh b/runtest.sh
> > > > index b1f1dced..eafb16d2 100755
> > > > --- a/runtest.sh
> > > > +++ b/runtest.sh
> > > > @@ -1548,7 +1548,7 @@ else
> > > >     }
> > > >    /: X?(FAIL|PASS|SKIP).*after ([0-9]*) reinvocations/
> > > >    {
> > > > -	match($0, /after ([0-9]*) reinvocations/, reinvokes);
> > > > +	split($0, reinvokes, /after ([0-9]*) reinvocations/);
> > > >    	count["REINVOKES"] += reinvokes[1];
> > > >    }
> > > >     END {
> > > _______________________________________________
> > > DTrace-devel mailing list
> > > DTrace-devel at oss.oracle.com
> > > https://oss.oracle.com/mailman/listinfo/dtrace-devel
> 
> _______________________________________________
> DTrace-devel mailing list
> DTrace-devel at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/dtrace-devel



More information about the DTrace-devel mailing list