All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leif Lindholm <leif.lindholm@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 00/23] efi_loader implement missing functions
Date: Wed, 30 Aug 2017 08:59:31 +0100	[thread overview]
Message-ID: <20170830075931.r3fibjazpwhvsado@bivouac.eciton.net> (raw)
In-Reply-To: <4ee6eb75-c73c-f2ee-3fda-29266db511cd@gmx.de>

On Wed, Aug 30, 2017 at 12:03:16AM +0200, Heinrich Schuchardt wrote:
> On 08/29/2017 10:38 PM, Alexander Graf wrote:
> >> Am 29.08.2017 um 22:16 schrieb Simon Glass <sjg@chromium.org>:
> >>>>>> That seems more useful long term than re-inventing comprehensive UEFI
> >>>>>> test suite.  (Also, beyond just running shim/fallback/grub, I don't
> >>>>>> really have time to invent new tests for the stack of efi_loader
> >>>>>> patches I have.)
> >>>>>
> >>>>> Yes and no - it depends on the availability of the official suite :/.
> >>>>
> >>>> UEFI SCT is not yet open source/free software. Obviously, this is
> >>>> something Linaro has been lobbying for since day one of our
> >>>> involvement. There used to be little understanding for this, but that
> >>>> attitude has shifted substantially.
> >>>
> >>> So, if/until UEFI SCT is not an option, what about:
> >>>
> >>>  https://01.org/linux-uefi-validation
> >>>
> >>> (thx to pjones for pointing that out to me)
> >>
> >> Well in any case I'm not looking for a large functional test suite at
> >> this stage. It certainly could be useful, but not as a replacement for
> >> unit tests. The latter is for fast verification (so that everyone can
> >> run it as part of 'make tests') and easy identification of the
> >> location of bugs.
> > 
> > I fail to see the point here to be honest. The thing we care most
> > about in the uefi implementation is abi compatibility with the
> > spec. That's basically what SCT is supposed to get you. Running it
> > should be a matter of seconds with kvm enabled, so 'make tests'
> > should easily be able to run it if you have the correct target
> > compiled.
> > 
> >>
> >> These new tests should be written in C, run very quickly (similar to
> >> the existing tests) to verify that the code works. Then when each new
> >> feature is added, the test are expanded to cover the new
> >> functionality. Should the code be refactored, the tests should provide
> >> comfort that nothing broke.
> > 
> > So far I've never seen that approach work well in (low level) open
> > source projects, as you start to heavily raise the barrier for
> > participation. Most people in this world do these tasks in their
> > spare time and won't spend x2 the time to also write and update
> > unit tests.
> > 
> > I really think having a working functional test suite that is easy
> > to run is the best way forward in this case. We can then start
> > thinking of ways to test hard to reach code sections to increase
> > test coverage.
> > 
> > Alex
> 
> Simon is right in that test code is needed to ensure that refactoring
> does not break existing functionality. The current git HEAD cannot read
> from an IDE disk anymore. This problem could have been caught by a
> functional test four weeks ago.
> 
> Unit tests should be based on exposed APIs. Tests for lower level
> functions would not survive refactoring.

Completely agreed. UEFI is an interface, not an implementation.

> We implement only part of the UEFI spec. If we do not want to blow up
> binary size we may even want to keep it that way. So a test suite for
> full UEFI compatibility will always fail partially if it runs at all.

SCT is (almost?) entirely implemented in the form of:
- Does the implementation claim to support X?
- If so, determine if X behaves in conformance with the specification.

> I am able to provide a test application that will cover the API
> functions that I have focused on (events, protocols, (dis)connect
> controllers). To limit my effort I would like to write it for the HEAD
> of my patch queue and not break it down into one test patch per
> implementation patch. I hope that is ok for you. My effort estimate is
> 40h+ so, please, be patient.

I am not going to claim that getting SCT to run under U-Boot is going
to come near the top of my priority queue any time soon, and it would
certainly be useful for some sort of "make sure we don't break what we
have" tests.

But there will be additional bits of UEFI functionality that will be
useful to add. Some of that functionality will be generically useful,
some may not be relevant for certain systems and if the effect on code
size is non-negligable, its inclusion in the final image should be
made conditional.

And surely it would be preferable to be able to reuse an existing
testsuite when adding new bits, instead of having to implement new
tests for every feature? Especially when the goal is compatibility
with something that uses that existing test suite.

Alex got me up and running with a test environment, so I will put
"investigate why Shell.efi won't run" on my background task list.

/
    Leif

  reply	other threads:[~2017-08-30  7:59 UTC|newest]

Thread overview: 89+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-26 22:51 [U-Boot] [PATCH 00/23] efi_loader implement missing functions Heinrich Schuchardt
2017-08-26 22:51 ` [U-Boot] [PATCH 01/23] efi_loader: allow return value in EFI_CALL Heinrich Schuchardt
2017-08-31 12:51   ` Simon Glass
2017-08-31 13:58     ` Alexander Graf
2017-09-04  6:51       ` Simon Glass
2017-08-26 22:51 ` [U-Boot] [PATCH 02/23] efi_loader: notify when ExitBootServices is invoked Heinrich Schuchardt
2017-08-31 12:51   ` Simon Glass
2017-08-26 22:51 ` [U-Boot] [PATCH 03/23] efi_loader: support 16 protocols per efi_object Heinrich Schuchardt
2017-08-31 12:51   ` Simon Glass
2017-08-31 14:01   ` Alexander Graf
2017-09-01  1:45     ` Heinrich Schuchardt
2017-09-01  8:15       ` Alexander Graf
2017-09-02 18:14     ` Rob Clark
2017-09-02 22:26       ` Alexander Graf
2017-08-26 22:51 ` [U-Boot] [PATCH 04/23] efi_loader: rework efi_locate_handle Heinrich Schuchardt
2017-08-31 12:51   ` Simon Glass
2017-08-26 22:51 ` [U-Boot] [PATCH 05/23] efi_loader: rework efi_search_obj Heinrich Schuchardt
2017-08-31 12:51   ` Simon Glass
2017-08-26 22:51 ` [U-Boot] [PATCH 06/23] efi_loader: new function efi_search_protocol Heinrich Schuchardt
2017-08-31 12:51   ` Simon Glass
2017-08-26 22:51 ` [U-Boot] [PATCH 07/23] efi_loader: simplify efi_install_protocol_interface Heinrich Schuchardt
2017-08-31 12:51   ` Simon Glass
2017-08-26 22:51 ` [U-Boot] [PATCH 08/23] efi_loader: allow creating new handles Heinrich Schuchardt
2017-08-31 12:51   ` Simon Glass
2017-09-07 19:20     ` Rob Clark
2017-08-26 22:51 ` [U-Boot] [PATCH 09/23] efi_loader: simplify efi_uninstall_protocol_interface Heinrich Schuchardt
2017-08-31 12:51   ` Simon Glass
2017-08-26 22:53 ` [U-Boot] [PATCH 10/23] efi_loader: open_info in OpenProtocol Heinrich Schuchardt
2017-08-26 22:53   ` [U-Boot] [PATCH 11/23] efi_loader: open_info in CloseProtocol Heinrich Schuchardt
2017-08-31 12:51     ` Simon Glass
2017-08-26 22:53   ` [U-Boot] [PATCH 12/23] efi_loader: implement OpenProtocolInformation Heinrich Schuchardt
2017-08-31 12:51     ` Simon Glass
2017-08-31 17:39       ` Heinrich Schuchardt
2017-08-26 22:53   ` [U-Boot] [PATCH 13/23] efi_loader: non-static efi_open_protocol, efi_close_protocol Heinrich Schuchardt
2017-08-31 12:51     ` Simon Glass
2017-08-26 22:53   ` [U-Boot] [PATCH 14/23] efi_loader: pass GUIDs as const efi_guid_t * Heinrich Schuchardt
2017-08-31 12:51     ` Simon Glass
2017-08-26 22:53   ` [U-Boot] [PATCH 15/23] efi_loader: implement ConnectController Heinrich Schuchardt
2017-08-31 12:52     ` Simon Glass
2017-09-15  6:48       ` Heinrich Schuchardt
2017-09-20 13:49         ` Simon Glass
2017-09-15  7:45       ` [U-Boot] [PATCH 1/1] efi_loader: provide comment for protocol GUIDs Heinrich Schuchardt
2017-09-25  2:11         ` Simon Glass
2017-08-26 22:53   ` [U-Boot] [PATCH 16/23] efi_loader: implement DisconnectController Heinrich Schuchardt
2017-08-31 12:52     ` Simon Glass
2017-09-15  6:35       ` Heinrich Schuchardt
2017-09-20 13:49         ` Simon Glass
2017-09-20 14:23           ` Rob Clark
2017-09-21  4:58             ` Simon Glass
2017-08-26 22:53   ` [U-Boot] [PATCH 17/23] efi_loader: efi_net: hwaddr_size = 6 Heinrich Schuchardt
2017-08-31 12:52     ` Simon Glass
2017-08-26 22:53   ` [U-Boot] [PATCH 18/23] efi_net: return EFI_UNSUPPORTED where appropriate Heinrich Schuchardt
2017-08-31 12:52     ` Simon Glass
2017-08-26 22:53   ` [U-Boot] [PATCH 19/23] efi_loader: correct bits of receive_filters bit mask Heinrich Schuchardt
2017-08-31 12:52     ` Simon Glass
2017-08-31 12:51   ` [U-Boot] [PATCH 10/23] efi_loader: open_info in OpenProtocol Simon Glass
2017-08-26 22:54 ` [U-Boot] [PATCH 20/23] efi_loader: use events for efi_net_receive Heinrich Schuchardt
2017-08-26 22:54   ` [U-Boot] [PATCH 21/23] efi_loader: fix efi_net_get_status Heinrich Schuchardt
2017-08-31 12:52     ` Simon Glass
2017-08-26 22:54   ` [U-Boot] [PATCH 22/23] efi_loader: set parent handle in efi_load_image Heinrich Schuchardt
2017-08-31 12:52     ` Simon Glass
2017-08-26 22:54   ` [U-Boot] [PATCH 23/23] efi_loader: implement SetWatchdogTimer Heinrich Schuchardt
2017-08-31 12:52     ` Simon Glass
2017-08-31 12:52   ` [U-Boot] [PATCH 20/23] efi_loader: use events for efi_net_receive Simon Glass
2017-08-27 20:10 ` [U-Boot] [PATCH 00/23] efi_loader implement missing functions Simon Glass
2017-08-29 10:52   ` Heinrich Schuchardt
2017-08-29 11:45     ` Alexander Graf
2017-08-29 12:17       ` Rob Clark
2017-08-29 12:26         ` Alexander Graf
2017-08-29 12:57           ` Leif Lindholm
2017-08-29 14:16             ` Rob Clark
2017-08-29 17:11               ` Heinrich Schuchardt
2017-08-29 20:16               ` Simon Glass
2017-08-29 20:38                 ` Alexander Graf
2017-08-29 22:03                   ` Heinrich Schuchardt
2017-08-30  7:59                     ` Leif Lindholm [this message]
2017-08-31 14:45                       ` Leif Lindholm
2017-09-01 12:54                         ` Rob Clark
2017-09-01 13:05                         ` Rob Clark
2017-08-30  9:36                     ` Simon Glass
2017-09-01 14:45                 ` Tom Rini
2017-09-05  8:55                   ` Simon Glass
2017-09-05 23:48                     ` Rob Clark
2017-09-06  4:18                       ` Heinrich Schuchardt
2017-09-06 10:54                         ` Rob Clark
2017-08-29 15:59             ` Heinrich Schuchardt
2017-08-29 16:06               ` Leif Lindholm
2017-08-29 16:13                 ` Alexander Graf
2017-08-29 12:22     ` Simon Glass

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=20170830075931.r3fibjazpwhvsado@bivouac.eciton.net \
    --to=leif.lindholm@linaro.org \
    --cc=u-boot@lists.denx.de \
    /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.