On Thu, Nov 30, 2023 at 2:46 AM Pedro Falcato via groups.io <pedro.falcato=gmail....@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/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-