This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH 2/2] [TAKE 3] Testcase For str_replace()
- From: Varun Chandramohan <varunc at linux dot vnet dot ibm dot com>
- To: "Frank Ch. Eigler" <fche at redhat dot com>
- Cc: systemtap at sourceware dot org, Josh Stone <jistone at redhat dot com>
- Date: Fri, 19 Jun 2009 10:03:29 +0530
- Subject: Re: [PATCH 2/2] [TAKE 3] Testcase For str_replace()
- References: <20090618153001.b71522ac.varunc@linux.vnet.ibm.com> <y0mljnp1t3f.fsf@fche.csb>
On Thursday 18 Jun 2009 8:34:20 pm Frank Ch. Eigler wrote:
> Varun Chandramohan <varunc@linux.vnet.ibm.com> writes:
> > This patch adds the test case needed for this function. [...]
> > +spawn stap -DMAXERRORS=2 $srcdir/$subdir/$test.stp
> > +expect {
> > + -timeout 15
> > + -re {ERROR: Invalid Search String} { incr ko; exp_continue }
> > + -re {WARNING: Number of errors} { incr ko ; exp_continue }
> > + -re {Result = hello pointer tap} { incr ok ; exp_continue }
> > + -re {Result = pointer system tap} { incr ok ; exp_continue }
> > + -re {Result = hello system pointer} { incr ok ; exp_continue }
> > [...]
>
> One nit: your search strings are not regular expressions, so you
> wouldn't normally use "-re" there.
>
> However, I've had cases where I had to use -re anyway, forcing precise
> line-begin/end matches, so that multiple output lines in expect's
> input buffer aren't matched (=> consumed) by just a single regexp
> line. This is what all those wacky regexps are for. Maybe you need
> these too.
>
> e.g., systemtap.base/skipped.exp:
>
> -re {^WARNING: Number of errors: 0, skipped probes: [0-9]+\r\n} { incr
> ok; exp_continue }
>
>
> - FChE
With the function now not returning errors, we dont this right? I can probably
use the test case i have sent with TAKE 2?
--
Regards,
Varun Chandramohan