[PATCH v2 2/2] efi_selftest: unit test for EFI Conformance Profile Table

Ilias Apalodimas ilias.apalodimas at linaro.org
Sun Sep 4 18:20:01 CEST 2022


On Sun, Sep 04, 2022 at 09:53:03AM +0200, Heinrich Schuchardt wrote:
> 
> 
> On 9/4/22 07:08, Ilias Apalodimas wrote:
> > Hi Heinrich,
> > 
> > [...]
> > 
> > > + */
> > > +static int ecpt_find_guid(struct efi_conformance_profiles_table *ecpt,
> > > +                         const efi_guid_t *guid) {
> > > +       int i;
> > > +
> > > +       for (i = 0; i < ecpt->number_of_profiles; ++i) {
> > > +               if (!memcmp(&ecpt->conformance_profiles[i], guid, 16))
> > > +                       return EFI_ST_SUCCESS;
> > 
> > Can't we use guidcmp here?
> 
> I would prefer to keep the unit tests independent of U-Boot's library
> functions so that we can opt to compile them as freestanding UEFI
> application.
> 
> Best regards

Fair enough,

Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>

> 
> Heinrich
> 
> > 
> > > +       }
> > > +       efi_st_error("GUID %pU not found\n", guid);
> > > +       return EFI_ST_FAILURE;
> > > +}
> > > +
> > > +/*
> > [...]
> > 
> > Thanks
> > /Ilias


More information about the U-Boot mailing list