<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/MdePkg/Test/UnitTest/Library, branch master</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2026-02-23T21:01:28+00:00</updated>
<entry>
<title>MdePkg: Replace include guards with #pragma once</title>
<updated>2026-02-23T21:01:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2026-02-03T18:54:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=7835e5802a2a70984333c054002e449bfd1f0a0d'/>
<id>urn:sha1:7835e5802a2a70984333c054002e449bfd1f0a0d</id>
<content type='text'>
Replace traditional `#ifndef`/`#define`/`#endif` include guards with
`#pragma` once.

`#pragma once` is a widely supported preprocessor directive that
prevents header files from being included multiple times. It is
supported by all toolchains used to build edk2: GCC, Clang/LLVM, and
MSVC.

Compared to macro-based include guards, `#pragma once`:

- Eliminates the risk of macro name collisions or copy/paste errors
  where two headers inadvertently use the same guard macro.
- Eliminate inconsistency in the way include guard macros are named
  (e.g., some files use `__FILE_H__`, others use `FILE_H_`, etc.).
- Reduces boilerplate (three lines replaced by one).
- Avoids polluting the macro namespace with guard symbols.
- Can improve build times as the preprocessor can skip re-opening the
  file entirely, rather than re-reading it to find the matching
  `#endif` ("multiple-include optimization").
  - Note that some compilers may already optimize traditional include
    guards, by recognzining the idiomatic pattern.

This change is made acknowledging that overall portability of the
code will technically be reduced, as `#pragma once` is not part of the
C/C++ standards.

However, this is considered acceptable given:

1. edk2 already defines a subset of supported compilers in
   BaseTools/Conf/tools_def.template, all of which have supported
   `#pragma once` for over two decades.
2. There have been concerns raised to the project about inconsistent
   include guard naming and potential macro collisions.

Approximate compiler support dates:

- MSVC: Supported since Visual C++ 4.2 (1996)
- GCC: Supported since 3.4 (2004)
  (http://gnu.ist.utl.pt/software/gcc/gcc-3.4/changes.html)
- Clang (LLVM based): Since initial release in 2007

Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdePkg: Remove ARM32 Support from UnitTests</title>
<updated>2025-09-25T22:04:10+00:00</updated>
<author>
<name>Oliver Smith-Denny</name>
<email>osde@microsoft.com</email>
</author>
<published>2025-09-15T16:27:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=5984676364f21c2f10d313cbe8d82ec8d6943af0'/>
<id>urn:sha1:5984676364f21c2f10d313cbe8d82ec8d6943af0</id>
<content type='text'>
edk2 is dropping support for the ARM32 architecture. This
commit removes ARM32 code from UnitTests and moves the
AARCH64 files to the top level.

Signed-off-by: Oliver Smith-Denny &lt;osde@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/Test/DevicePathLib: Remove FreePool(NULL)</title>
<updated>2024-11-08T17:22:14+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2024-10-24T01:45:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=fadf4f377e86aebf64bfc0c57cdcfe5e70f04443'/>
<id>urn:sha1:fadf4f377e86aebf64bfc0c57cdcfe5e70f04443</id>
<content type='text'>
Unit test checks if AppendDevicePathInstance() returns NULL.
In those cases, AppendDevicePathInstance() does not allocate
a device path, so the call to FreePool() must not be performed.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>MdePkg: Fix some spelling mistakes found by cspell</title>
<updated>2024-08-01T19:53:47+00:00</updated>
<author>
<name>Rebecca Cran</name>
<email>rebecca@bsdio.com</email>
</author>
<published>2024-07-30T16:00:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=ecb0d1e2cb513baf03586158899349d67b3f7c8f'/>
<id>urn:sha1:ecb0d1e2cb513baf03586158899349d67b3f7c8f</id>
<content type='text'>
When cspell is installed (via `npm install cspell`), CI checks for
spelling mistakes. There are currently a very large number of them: some
are genuine mistakes while others are words or acryonyms that cspell
doesn't know.

Fix a few of the misspellings in MdePkg.

Signed-off-by: Rebecca Cran &lt;rebecca@bsdio.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/Test: Add DevicePathLib host test module</title>
<updated>2023-10-19T15:20:02+00:00</updated>
<author>
<name>Mateusz Albecki</name>
<email>mateusz.albecki@intel.com</email>
</author>
<published>2022-06-29T15:54:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=0355e559c6c4a7d3602120045d74e3a1e792fec6'/>
<id>urn:sha1:0355e559c6c4a7d3602120045d74e3a1e792fec6</id>
<content type='text'>
This commit adds host-based unit tests for device path lib.

Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Liming Gao &lt;gaoliming@bysoft.com.cn&gt;
Cc: Zhiguang Liu &lt;zhiguang.liu@intel.com&gt;
Signed-off-by: Mateusz Albecki &lt;mateusz.albecki@intel.com&gt;
Reviewed-by: Michael D Kinney &lt;Michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>MdePkg: Apply uncrustify changes</title>
<updated>2021-12-07T17:24:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2021-12-05T22:54:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=2f88bd3a1296c522317f1c21377876de63de5be7'/>
<id>urn:sha1:2f88bd3a1296c522317f1c21377876de63de5be7</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the MdePkg package

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>MdePkg/Test/BaseLib: Add SAFE_STRING_CONSTRAINT_CHECK unit test</title>
<updated>2020-05-22T00:03:14+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2020-05-19T21:51:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=1c877c716038a862e876cac8f0929bab4a96e849'/>
<id>urn:sha1:1c877c716038a862e876cac8f0929bab4a96e849</id>
<content type='text'>
Use the safe string function StrCpyS() in BaseLib to test the
SAFE_STRING_CONSTRAINT_CHECK() macro.

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Cc: Bret Barkelew &lt;bret.barkelew@microsoft.com&gt;
Cc: Brian J. Johnson &lt;brian.johnson@hpe.com&gt;
Cc: Chasel Chiu &lt;chasel.chiu@intel.com&gt;
Cc: Jordan Justen &lt;jordan.l.justen@intel.com&gt;
Cc: Laszlo Ersek &lt;lersek@redhat.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Cc: Marvin Häuser &lt;mhaeuser@outlook.de&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Vincent Zimmer &lt;vincent.zimmer@intel.com&gt;
Cc: Zhichao Gao &lt;zhichao.gao@intel.com&gt;
Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Cc: Vitaly Cheptsov &lt;vit9696@protonmail.com&gt;
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Philippe Mathieu-Daude &lt;philmd@redhat.com&gt;
Reviewed-by: Vitaly Cheptsov &lt;vit9696@protonmail.com&gt;
Acked-by: Liming Gao &lt;liming.gao@intel.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/UnitTestBaseLib: Add check for pointer BinData</title>
<updated>2020-03-27T02:03:41+00:00</updated>
<author>
<name>Guomin Jiang</name>
<email>guomin.jiang@intel.com</email>
</author>
<published>2020-03-24T01:34:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=090e267b5bb594d9f2dbe38b2b3562347773826a'/>
<id>urn:sha1:090e267b5bb594d9f2dbe38b2b3562347773826a</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2531

AllocatePool may fail and BinData may be invalid, check it before use.

Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Signed-off-by: Guomin Jiang &lt;guomin.jiang@intel.com&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Bret Barkelew &lt;bret.barkelew@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/Test: Add SafeIntLib and BaseLib Base64 unit tests</title>
<updated>2020-02-07T19:18:53+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2020-01-22T18:15:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e50c2bb38398553b184cee7d96d676a12b4c064b'/>
<id>urn:sha1:e50c2bb38398553b184cee7d96d676a12b4c064b</id>
<content type='text'>
https://bugzilla.tianocore.org/show_bug.cgi?id=2505

* Add unit tests for SafeIntLib class
* Add unit tests for BaseLib Base64 conversion APIs.
* Add Test/MdePkgHostTest.dsc -to build host based unit
  tests
* Update MdePkg.dsc to build target based tests for
  SafeIntLib and BaseLib
* Update MdePkg.ci.yaml to build and run host based
  tests for SafeIntLib and BaseLib

Cc: Sean Brogan &lt;sean.brogan@microsoft.com&gt;
Cc: Bret Barkelew &lt;Bret.Barkelew@microsoft.com&gt;
Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Acked-by: Hao A Wu &lt;hao.a.wu@intel.com&gt;
Reviewed-by: Bret Barkelew &lt;Bret.Barkelew@microsoft.com&gt;
</content>
</entry>
</feed>
