* [edk2-devel] [PATCH 0/2] MdePkg: Fix CRC16-ANSI calculation
@ 2023-11-30 2:46 Pedro Falcato
0 siblings, 0 replies; 2+ 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] 2+ messages in thread
* Re: [edk2-devel] [PATCH 0/2] MdePkg: Fix CRC16-ANSI calculation
[not found] <179C4698EAA331A7.11889@groups.io>
@ 2023-11-30 2:48 ` Pedro Falcato
0 siblings, 0 replies; 2+ messages in thread
From: Pedro Falcato @ 2023-11-30 2:48 UTC (permalink / raw)
To: devel, pedro.falcato
Cc: Savva Mitrofanov, Kinney, Michael D, Liming Gao, Zhiguang Liu
On Thu, Nov 30, 2023 at 2:46 AM Pedro Falcato via groups.io
<pedro.falcato=gmail.com@groups.io> wrote:
>
> 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
whoops, dropped some CC's here, adding...
--
Pedro
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111886): https://edk2.groups.io/g/devel/message/111886
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] 2+ messages in thread
end of thread, other threads:[~2023-11-30 2:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <179C4698EAA331A7.11889@groups.io>
2023-11-30 2:48 ` [edk2-devel] [PATCH 0/2] MdePkg: Fix CRC16-ANSI calculation Pedro Falcato
2023-11-30 2:46 Pedro Falcato
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox