public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH 0/2] MdePkg: Fix CRC16-ANSI calculation
@ 2023-11-30  2:46 Pedro Falcato
  2023-11-30  2:46 ` [edk2-devel] [PATCH 1/2] MdePkg/BaseLib: " Pedro Falcato
  2023-11-30  2:46 ` [edk2-devel] [PATCH 2/2] MdePkg/Test: Add google tests for BaseLib Pedro Falcato
  0 siblings, 2 replies; 9+ messages in thread
From: Pedro Falcato @ 2023-11-30  2:46 UTC (permalink / raw)
  To: devel; +Cc: Savva Mitrofanov, Pedro Falcato

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4609

CalculateCrc16Ansi is currently miscalculating all checksums and causing
ext4 mount failures on older (~13 year old) filesystems.

This patchset:
1) Fixes CalculateCrc16Ansi to properly calculate checksums
   This is a breaking change.
2) Adds google test tests for BaseLib. They were immensely helpful in
  making sure things were correct, while iterating quickly.

Boot tested on a freshly baked "old filesystem" using a script[1],
and tested for further correctness using unit tests.

[1] https://gist.github.com/heatd/6adaae8288e270897975d9321c5e8f41

Pedro Falcato (2):
  MdePkg/BaseLib: Fix CRC16-ANSI calculation
  MdePkg/Test: Add google tests for BaseLib

 MdePkg/Include/Library/BaseLib.h              |  5 ++
 MdePkg/Library/BaseLib/CheckSum.c             |  4 +-
 .../Library/BaseLib/GoogleTestBaseLib.inf     | 31 +++++++++
 .../Library/BaseLib/TestBaseLibMain.cpp       | 23 +++++++
 .../Library/BaseLib/TestCheckSum.cpp          | 64 +++++++++++++++++++
 .../SafeIntLibUintnIntnUnitTests64.cpp        |  4 +-
 MdePkg/Test/MdePkgHostTest.dsc                |  5 ++
 7 files changed, 132 insertions(+), 4 deletions(-)
 create mode 100644 MdePkg/Test/GoogleTest/Library/BaseLib/GoogleTestBaseLib.inf
 create mode 100644 MdePkg/Test/GoogleTest/Library/BaseLib/TestBaseLibMain.cpp
 create mode 100644 MdePkg/Test/GoogleTest/Library/BaseLib/TestCheckSum.cpp

-- 
2.43.0



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



^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <179C4698EAA331A7.11889@groups.io>]

end of thread, other threads:[~2023-11-30 22:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-30  2:46 [edk2-devel] [PATCH 0/2] MdePkg: Fix CRC16-ANSI calculation Pedro Falcato
2023-11-30  2:46 ` [edk2-devel] [PATCH 1/2] MdePkg/BaseLib: " Pedro Falcato
2023-11-30 19:32   ` Michael D Kinney
2023-11-30  2:46 ` [edk2-devel] [PATCH 2/2] MdePkg/Test: Add google tests for BaseLib Pedro Falcato
2023-11-30 19:32   ` Michael D Kinney
2023-11-30 20:15     ` Pedro Falcato
2023-11-30 21:31       ` Michael D Kinney
2023-11-30 22:44         ` Pedro Falcato
     [not found] <179C4698EAA331A7.11889@groups.io>
2023-11-30  2:48 ` [edk2-devel] [PATCH 0/2] MdePkg: Fix CRC16-ANSI calculation Pedro Falcato

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