From: "Pedro Falcato" <pedro.falcato@gmail.com>
To: devel@edk2.groups.io
Cc: Savva Mitrofanov <savvamtr@gmail.com>,
Pedro Falcato <pedro.falcato@gmail.com>
Subject: [edk2-devel] [PATCH 0/2] MdePkg: Fix CRC16-ANSI calculation
Date: Thu, 30 Nov 2023 02:46:09 +0000 [thread overview]
Message-ID: <20231130024611.67135-1-pedro.falcato@gmail.com> (raw)
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]
-=-=-=-=-=-=-=-=-=-=-=-
next reply other threads:[~2023-11-30 2:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-30 2:46 Pedro Falcato [this message]
2023-11-30 2:46 ` [edk2-devel] [PATCH 1/2] MdePkg/BaseLib: Fix CRC16-ANSI calculation 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231130024611.67135-1-pedro.falcato@gmail.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox