[DTrace-devel] [PATCH] The fbtprovider/tst.return0.d test should not use ioctl

Kris Van Hees kris.van.hees at oracle.com
Tue Jun 22 18:53:48 PDT 2021


On Tue, Jun 22, 2021 at 01:06:37PM -0400, Eugene Loh wrote:
> Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
> But is there a wider problem here we want to address?  In the -Z patch, 
> triggers were introduced for a number of tests that were waiting on 
> ioctl.  Maybe that's fine?

That is fine, overall, but yes - we ought to audit tests that are depending on
implicit trigger conditions like legacy DTrace using ioctls frequently where
that is no longer the case now.  Changing the probe it fires on to something
more explicit is certainly a good option.  I didn't do that here because the
test wants an FBT probe that is known to frequently have a 0 return value.

> On 6/22/21 1:26 AM, Kris Van Hees wrote:
> > This test was triggering on ioctl because that was the system call used
> > by DTrace to read trace data.  It was therefore guaranteed to be called
> > frequently.
> >
> > With the new implementation ioctl is no longer used.  Instead, we can
> > trigger on the poll system call.
> >
> > Signed-off-by: Kris Van Hees<kris.van.hees at oracle.com>
> > ---
> >   test/unittest/fbtprovider/tst.return0.d | 4 +---
> >   1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/test/unittest/fbtprovider/tst.return0.d b/test/unittest/fbtprovider/tst.return0.d
> > index bcfde573..7d1c7491 100644
> > --- a/test/unittest/fbtprovider/tst.return0.d
> > +++ b/test/unittest/fbtprovider/tst.return0.d
> > @@ -11,14 +11,12 @@
> >    * SECTION: FBT Provider/Probe arguments
> >    */
> >   
> > -/* @@xfail: dtv2 */
> >   /* @@runtest-opts: -Z */
> >   
> >   #pragma D option quiet
> >   #pragma D option statusrate=10ms
> >   
> > -fbt::SyS_ioctl:return,
> > -fbt::__x64_sys_ioctl:return
> > +fbt::do_sys_poll:return
> >   /arg1 == 0/
> >   {
> >   	printf("%s %x returned 0", probefunc, arg0);
> > -- 2.31.1
> 
> _______________________________________________
> 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