public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] EDK II CI generating FALSE PASS results - current trunk is actually broken
@ 2024-02-06 17:27 Michael D Kinney
  0 siblings, 0 replies; only message in thread
From: Michael D Kinney @ 2024-02-06 17:27 UTC (permalink / raw)
  To: devel@edk2.groups.io; +Cc: Kinney, Michael D

Hello,

I noticed that a local build of the FmpDevicePkg from latest edk2/master
fails with a missing mapping for the SyncronizationLib.

  build -p FmpDevicePkg/FmpDevicePkg.dsc -b DEBUG -t VS2019 -a IA32 -a X64

  build.py...
  c:\work\github\tianocore\edk2\FmpDevicePkg\FmpDevicePkg.dsc(...): error 4000: Instance of library class [SynchronizationLib] is not found
          in [c:\work\github\tianocore\edk2\CryptoPkg\Library\BaseCryptLib\BaseCryptLib.inf] [X64]
          consumed by module [c:\work\github\tianocore\edk2\conf\.cache\B461B3BD-E62A-4A71-841C-50BA4E500267FmpDxe.inf]

  - Failed -
  Build end time: 09:09:22, Feb.06 2024
  Build total time: 00:00:00

However, all EDK II CI status are in the PASS state.  EDK II CI uses the stuart
commands and the stuart commands run the EDK II build command.  From the stuart
logs I see the FmpDevicePkg built with the following command:

  build -p FmpDevicePkg/FmpDevicePkg.dsc -b DEBUG -t VS2019 -a IA32 -a X64 -D CONTINUOUS_INTEGRATION=TRUE

And sure enough a local build adding -D CONTINUOUS_INTEGRATION =TRUE also passes.

The FmpDevicePkg.dsc file has the following use of CONTINUOUS_INTEGRATION

  !ifdef CONTINUOUS_INTEGRATION
    BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf
  !else
    IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
    OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
    BaseCryptLib|CryptoPkg/Library/BaseCryptLib/ BaseCryptLib.inf
    RngLib|MdePkg/Library/BaseRngLibNull/BaseRngLibNull.inf
  !endif

The root cause is that EDK II CI is not building packages with the same
libraries as real firmware build use cases and missing library mappings
or other differences may result in a false PASS state for EDK II CI.
BaseCryptLibNull does not depend on SyncronizationLib, but BaseCryptLib
does depend on SyncronizationLib.

This is a critical issue that must be resolved.

One idea is to perform all builds without-D CONTINUOUS_INTEGRATION=TRUE, but add genc
to verify that the autogen stage of the build can pass before doing a full build with 
-D CONTINUOUS_INTEGRATION=TRUE. Genc stage of build is very fast and does not run the
Compiler/linker. It does parse the EDK II DSC/FDF/DEC/INF files so checks for consistency
Of those are performed.

1) build -p FmpDevicePkg/FmpDevicePkg.dsc -b DEBUG -t VS2019 -a IA32 -a X64 genc
2) build -p FmpDevicePkg/FmpDevicePkg.dsc -b DEBUG -t VS2019 -a IA32 -a X64 -D CONTINUOUS_INTEGRATION=TRUE

Best regards,

Mike





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115185): https://edk2.groups.io/g/devel/message/115185
Mute This Topic: https://groups.io/mt/104202268/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-06 17:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-06 17:27 [edk2-devel] EDK II CI generating FALSE PASS results - current trunk is actually broken Michael D Kinney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox