All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Richard Purdie" <richard.purdie@linuxfoundation.org>
To: Quentin Schulz <quentin.schulz@streamunlimited.com>
Cc: Michael Opdenacker <michael.opdenacker@bootlin.com>,
	 docs@lists.yoctoproject.org, Quentin Schulz <foss@0leil.net>
Subject: Re: [docs] [PATCH v3] test-manual: add initial reproducible builds documentation
Date: Thu, 10 Jun 2021 10:14:11 +0100	[thread overview]
Message-ID: <25943cb95fd97a83144e00e7a30917d609b184b2.camel@linuxfoundation.org> (raw)
In-Reply-To: <20210610085412.nepf2mxa2mco5z6a@qschulz>

On Thu, 2021-06-10 at 10:54 +0200, Quentin Schulz wrote:
> Hi Richard,
> 
> On Wed, Jun 09, 2021 at 05:30:56PM +0100, Richard Purdie wrote:
> > On Wed, 2021-06-09 at 17:55 +0200, Quentin Schulz wrote:
> > > On Wed, Jun 09, 2021 at 04:47:28PM +0200, Michael Opdenacker wrote:
> > > 
> > > > +
> > > > +You could subclass the test and change ``targets`` to a different target.
> > > > +
> > > > +You may also change ``sstate_targets`` which would allow you to "pre-cache" some
> > > > +set of recipes before the test, meaning they are excluded from reproducibility
> > > > +testing. As a practical example, you could set ``sstate_targets`` to
> > > > +``core-image-sato``, then setting ``targets`` to ``core-image-sato-sdk`` would
> > > > +run reproducibility tests only on the targets belonging only to ``core-image-sato-sdk``.
> > > > -- 
> > > 
> > > I'm not sure this section has its place in our documentation since it
> > > seems bound to the current implementation and explains modifications of
> > > the code.
> > > 
> > > I'd vote it out.
> > 
> > Doesn't most of the manual document the current implementation?
> > 
> > When this wasn't here, you wanted an example! I do agree we should give people 
> > some kind of a hint about how to write their own tests. We're likely going to end 
> > up adding more example, not less?
> > 
> 
> Because I understood the original section as "it's very simple to do
> this, look into this file", so I assumed some arguments could be passed
> to make it easy to re-use. I wasn't expecting changes in a Python
> script.

I think the confusion here is the definition of simple :).

At least in theory, you can create your own test case in your own layer
and in that test, inherit and subclass the original test (standard python). 
In that subclassed test, you could change those two variables and you 
should then have your own test case.

Would that work? Should do, at least mostly but I will admit I've not tried it.
Adding a new test in your layer and also subclassing an existing test is 
something we should document somewhere in the test manual ultimately. That
is partly why I continued to expand on what I meant here.

> As opposed to classes, variables and/or tasks, which to me seems to be
> kind of an ABI, so it is maintained and watched for changes and if
> there's any, usually listed in the migration manual, I would assume the
> content of Python scripts aren't expected to stay "stable" or their
> change be documented otherwise?
> 
> Here the suggested example is about modifying variables that are used only
> in a given Python class, which could change over time, including the name
> of the variables to be changed.

I agree it is a bit risky to have these in the manual, equally, the manual
does have worked examples and I believe there is a good case for having them
here as this is something we want to teach people how to do.

FWIW that test was designed to be sub-classed so there is at least some
intent to allow people to do this. As such we'd probably try to maintain 
some kind of compatibility if we can.

> This also kind of encourages people to modify code in layers they don't
> have push access to, which is something that we usually don't want
> people to do IIRC?

The key missing detail is you can put test code in your own layer. I
can even point at an example:

http://git.yoctoproject.org/cgit.cgi/poky/tree/meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py

(which is also how we test this stays working)

> I'm not sure I managed to convey my thoughts better. I just expected a
> simple command to be able to test my recipes, or via a configuration
> script.
> 
> Anyway, no big deal, I'm happy to see the reproducible test procedure is
> being documented :)

Thanks for the review, it is helpful to have have a fresher perspective on
this!

Cheers,

Richard


  reply	other threads:[~2021-06-10  9:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1686F0ED5A1183FF.18579@lists.yoctoproject.org>
2021-06-09 14:47 ` [PATCH v3] test-manual: add initial reproducible builds documentation Michael Opdenacker
2021-06-09 15:55   ` [docs] " Quentin Schulz
2021-06-09 16:30     ` Richard Purdie
2021-06-10  8:54       ` Quentin Schulz
2021-06-10  9:14         ` Richard Purdie [this message]
2021-06-10 16:42           ` Quentin Schulz
2021-06-14 16:22     ` Michael Opdenacker
2021-06-09 16:43   ` Michael Opdenacker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=25943cb95fd97a83144e00e7a30917d609b184b2.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=docs@lists.yoctoproject.org \
    --cc=foss@0leil.net \
    --cc=michael.opdenacker@bootlin.com \
    --cc=quentin.schulz@streamunlimited.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.