[DTrace-devel] [PATCH] Fix path of basename in test

Kris Van Hees kris.van.hees at oracle.com
Wed May 20 13:22:22 PDT 2020


On Wed, May 20, 2020 at 01:16:05PM -0700, Eugene Loh wrote:
> On 05/18/2020 10:44 AM, Kris Van Hees wrote:
> 
> > This test was using /bin/basename which works on some distributions
> > (where /bin is usually a symbolic link to /usr/bin).  Other distros
> > do not have /bin and require an explicit /usr/bin/basename.
> >
> > Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
> > ---
> >   test/unittest/scripting/tst.D_MACRO_UNUSED.overflow.sh | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/test/unittest/scripting/tst.D_MACRO_UNUSED.overflow.sh b/test/unittest/scripting/tst.D_MACRO_UNUSED.overflow.sh
> > index 2590c3a1..8e35e9de 100755
> > --- a/test/unittest/scripting/tst.D_MACRO_UNUSED.overflow.sh
> > +++ b/test/unittest/scripting/tst.D_MACRO_UNUSED.overflow.sh
> > @@ -20,7 +20,7 @@ if [ $# != 1 ]; then
> >   fi
> >   
> >   dtrace=$1
> > -bname=`/bin/basename $0`
> > +bname=`/usr/bin/basename $0`
> >   dfilename=$tmpdir/$bname.$$.d
> >   errorfile=$tmpdir/$bname.$$.err
> 
> Sounds good.
> 
> But I'm curious about all those other /bin paths in the test suite. I 
> assume that whatever turned up this test (presumably, running the test 
> suite on a distro in question) would have identified any other similar 
> instance?  Or, is a high incidence of "@@xfail: dtv2" masking other such 
> problems?

I am certain there are more issues like this.  We fix them as we encounter
them, since the main focus is currently on functionality rather than improving
the testsuite as a whole.



More information about the DTrace-devel mailing list