[Piglit] [PATCH] results.py: Do not allow path separators in test names

Dylan Baker baker.dylan.c at gmail.com
Mon Sep 1 01:32:06 PDT 2014


> > +    @property
> > +    def name(self):
> > +        return self.__name
> > +
> > +    @name.setter
> > +    def name(self, name):
> > +        """ Set the name of the test run
> > +
> > +        We don't allow path seperators in the name, they are silently
> > replaced
> > +        with underscores.
> > +
> > +        """
> > +        replace = ['/', '\\']
> > +
> > +        for r in replace:
> > +            name = name.replace(r, '_')
> > +
> > +        self.__name = name
> > +
> >
> 
> Personally, I'd rather we mangle things when we turn them into file names
> rather than mangling the original.  This way the original string still
> shows up in table headers etc.  That said, this also accomplishes the
> objective of not crashing in stupid places.
> --Jason

I'm working on a v2. I'll make that change.

[snip]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140901/d9b062f2/attachment.sig>


More information about the Piglit mailing list