public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: Sean <sean.brogan@microsoft.com>, devel@edk2.groups.io
Cc: Ard Biesheuvel <ardb@kernel.org>
Subject: Re: [edk2-devel] Adding Bhyve support into upstream EDK2
Date: Tue, 10 Mar 2020 10:05:55 +0100	[thread overview]
Message-ID: <6ef172e5-4999-f1bc-0d08-43685b03f5ce@redhat.com> (raw)
In-Reply-To: <1758.1583805050303399990@groups.io>

On 03/10/20 02:50, sean.brogan via [] wrote:
> [...] There are numerous ways to keep multiple repos in sync that
> allow a user to root cause regressions.  Using submodules is one way
> to easily track the version of edk2 that was/is used in the platform
> repo and when issues are identified the commit history can be
> bisected to find the problem.  [...]
I disagree.

Running git-bisect on a commit range in the superproject will identify
the submodule update commit as the one introducing the regression, yes.

But I don't see a way forward from that point onward. The goal of
git-bisect is to identify (pinpoint) the smallest atomic change that's
related to a regression. A submodule update is the polar opposite of an
atomic change.

Delving into the submodule itself, for a git-bisect -- i.e., bisecting
the submodule between the boundaries set by the superproject's submodule
update commit -- is not something that can be relied upon.

Namely, a core trait of git-bisect is that it tests states of the whole
project that have *existed* at some point. But a combination of:

- the superproject checked out at any particular point in its own history,

- and the submodule checked out strictly *between* two such adjacent
commits that have ever been actively consumed by the superproject,

is not a state like that.

Such states may not even build. They may never have been tested, put
through CI, and so whether they work or not is inconsequential -- they
should not be *expected* to work. Such states don't qualify as
"checkpoints". That's because a submodule is unaware of all the
superprojects that consume it. Whereas, in a shared git history, every
single commit counts as a checkpoint -- a combined state that has
existed at some point.

You can solve this problem (in the separate repository model) only if
you build and test every known platform (= every known superproject)
against every single patch (not series!) that is proposed for the core
(= the submodule). Importantly, it's not enough to build and test the
superprojects at the ends of the submodule (= core) patch sets, because
that still leaves the checkpoints two far apart. The full platform
testing (for all platforms) would have to be done at every stage of the
submodule (= core) patch series.

Turning a codebase (such as core edk2) into a submodule for a
superproject (such as OVMF) is equivalent to saying, "we trust the
submodule that, at distinguished checkouts, it holds up all its
contracts". That's exactly what I don't trust the core of edk2 to do,
and those contract violations are exactly what git-bisect is designed to
root out.

The edk2 bisection that I've performed most recently was less than nine
hours ago. It identified a regression in a core (non-platform) change,
namely "ArmPkg/Library/ArmMmuLib":

https://edk2.groups.io/g/devel/message/55701

It was doable because git-bisect was aware of six patches that had been
applied in a row on ArmMmuLib against a single ArmVirtQemu platform state.

I may not be knowledgeable enough about git-bisect, of course; I've
asked my teammates internally if they have positive experience and/or
recommendations with git-bisect across submodules.

Thanks
Laszlo


  reply	other threads:[~2020-03-10  9:06 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-06 16:09 Adding Bhyve support into upstream EDK2 Rebecca Cran
2020-03-06 19:54 ` Laszlo Ersek
2020-03-06 20:04   ` [edk2-devel] " Laszlo Ersek
2020-03-07  1:29 ` Yao, Jiewen
2020-03-24  1:34   ` Rebecca Cran
2020-03-25  0:04     ` Laszlo Ersek
2020-03-25 18:18       ` [EXTERNAL] " Bret Barkelew
2020-03-27 12:56         ` Laszlo Ersek
2020-03-25 18:50       ` Rebecca Cran
     [not found] ` <15F9E16A0219E7B7.19404@groups.io>
2020-03-07  1:43   ` Yao, Jiewen
2020-03-07  7:39     ` Laszlo Ersek
2020-03-07  7:52       ` Ard Biesheuvel
2020-03-08  2:40         ` Rebecca Cran
2020-03-09  6:08         ` Sean
2020-03-09 22:54           ` Laszlo Ersek
2020-03-09 23:17             ` Laszlo Ersek
2020-03-10  1:50               ` Sean
2020-03-10  9:05                 ` Laszlo Ersek [this message]
2020-03-10 17:25                   ` Sean
2020-03-10 17:54                     ` Ard Biesheuvel
2020-03-10 19:10                       ` Sean
2020-03-10 19:23                         ` Michael D Kinney
2020-03-10 19:44                           ` Sean
2020-03-10 20:04                             ` Rebecca Cran
2020-03-11  0:05                             ` Laszlo Ersek
2020-03-11  0:30                               ` Sean
2020-03-11  3:21                             ` Liming Gao
2020-03-10 23:34                     ` Laszlo Ersek
2020-03-11  0:43           ` Leif Lindholm
2020-03-07  7:53       ` Laszlo Ersek

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-list 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=6ef172e5-4999-f1bc-0d08-43685b03f5ce@redhat.com \
    --to=devel@edk2.groups.io \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox