Yes, we can create a host test specific lib if no better ways.

Regards,
Yi

From: Yao, Jiewen <jiewen....@intel.com>
Sent: Friday, June 14, 2024 3:20 PM
To: Li, Yi1 <yi1...@intel.com>; devel@edk2.groups.io
Cc: Hou, Wenxing <wenxing....@intel.com>; Kinney, Michael D 
<michael.d.kin...@intel.com>; Pedro Falcato <pedro.falc...@gmail.com>; Ard 
Biesheuvel <ardb+tianoc...@kernel.org>
Subject: RE: CryptoPkg host test broken due to smoketest for RDRAND

Can we use a host test specific RngLib?



From: Li, Yi1 <yi1...@intel.com<mailto:yi1...@intel.com>>
Sent: Friday, June 14, 2024 3:08 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Hou, Wenxing <wenxing....@intel.com<mailto:wenxing....@intel.com>>; Yao, 
Jiewen <jiewen....@intel.com<mailto:jiewen....@intel.com>>; Kinney, Michael D 
<michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>; Pedro Falcato 
<pedro.falc...@gmail.com<mailto:pedro.falc...@gmail.com>>; Ard Biesheuvel 
<ardb+tianoc...@kernel.org<mailto:ardb+tianoc...@kernel.org>>
Subject: CryptoPkg host test broken due to smoketest for RDRAND

All crypto host tests which consumed randlib broken due to:
https://github.com/tianocore/edk2/pull/5714
Not sure why this issue not reported  by CI when merge this PR.

The reason is that the ```BaseRngLibConstructor``` of rnglib is not called in 
host test, so ```mRdRandSupported``` is not enabled.
Then the Crypto API calls ```GetRandomNumber*``` will fail.
GetRandomNumber64 (
  OUT     UINT64  *Rand
  )
{
  ......
  if (!ArchIsRngSupported ()) {
    return FALSE;
  }

Is there a way to let unit test host to call the constructors correctly?

Regards,
Yi



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119569): https://edk2.groups.io/g/devel/message/119569
Mute This Topic: https://groups.io/mt/106666288/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to