[PATCH] D45348: Don't return error for settings set .experimental. settings that are absent

Pavel Labath via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 9 01:57:13 PDT 2018


On Fri, 6 Apr 2018 at 23:36, Jason Molenda <jmolenda at apple.com> wrote:

>
>
> > On Apr 6, 2018, at 2:07 AM, Pavel Labath via Phabricator <
> reviews at reviews.llvm.org> wrote:
> >
> > labath added inline comments.
> >
> >
> > ================
> > Comment at:
> packages/Python/lldbsuite/test/settings/TestSettings.py:544-545
> > +        # the actual name and via .experimental.
> > +        cmdinterp.HandleCommand("settings set target.arg0 first-value",
> result)
> > +        self.assertEqual(result.Succeeded(), True)
> > +        cmdinterp.HandleCommand("settings show target.arg0", result)
> > ----------------
> > Isn't this basically what `self.expect` would do (only with better
> logging and error messages)?
>
>
> Ah, I didn't see that self.expect would allow me to specify whether to
> expect an error return or not.  Yes I can write this in terms of
> self.expect more cleanly.
>
> BTW what does the documentation for self.expect in lldbtest.py mean when
> it refers to "golden input"?  It uses the phrase a few times and I can't
> figure out what it's talking about.  Maybe that term was in the
> documentation from long ago and not a recent addition.
>
>
>
Thanks.

I think the self.expect function predates me, but if I had to guess, I
think here the term "golden" just means the "expected" output. The term
"golden output" is mostly used when comparing large files (usually images)
in tests. I suppose, with some imagination, it could be used checking the
verbatim output of a command is exactly a given string, but when we start
doing substring and regex matches it really becomes inappropriate... Maybe
originally the expect function only supported verbatim matches and this is
a leftover of that?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180409/f9cf16d0/attachment.html>


More information about the llvm-commits mailing list