kernel: Use fs:: namespace and unicode path in kernel tests #34705

pull sedited wants to merge 1 commits into bitcoin:master from sedited:kernel_unicode_path_patch changing 5 files +18 −19
  1. sedited commented at 12:15 pm on March 1, 2026: contributor
    Add support for unicode characters in paths to the kernel tests by using our fs:: wrappers for std::filesystem calls and adding the windows application manifest to the binary. This exercises their handling through the kernel API.
  2. DrahtBot added the label Validation on Mar 1, 2026
  3. DrahtBot commented at 12:16 pm on March 1, 2026: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK hebasto, w0xlt
    Stale ACK purpleKarrot

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #34439 (qa: Drop recursive deletes from test code, add lint checks. by davidgumberg)
    • #32427 ((RFC) kernel: Replace leveldb-based BlockTreeDB with flat-file based store by sedited)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

    LLM Linter (✨ experimental)

    Possible places where comparison-specific test macros should replace generic comparisons:

    • src/test/kernel/test_kernel.cpp: BOOST_CHECK_THROW(chainman->ReadBlockSpentOutputs(tip), std::runtime_error); -> Replace with BOOST_CHECK_EXCEPTION(chainman->ReadBlockSpentOutputs(tip), std::runtime_error, HasReason(“the exact failure message”)) (use the appropriate expected message in HasReason)

    2026-03-04 17:31:07

  4. hebasto commented at 12:46 pm on March 1, 2026: member
    Concept ACK.
  5. w0xlt commented at 3:17 pm on March 2, 2026: contributor
    Concept ACK
  6. purpleKarrot commented at 2:27 pm on March 3, 2026: contributor
    Code review ACK 260b9e5b3ec5b2239d45f4221d2d33e923df2d04
  7. DrahtBot requested review from hebasto on Mar 3, 2026
  8. in src/test/kernel/test_kernel.cpp:103 in 260b9e5b3e
     97@@ -98,16 +98,16 @@ class TestLog
     98 };
     99 
    100 struct TestDirectory {
    101-    std::filesystem::path m_directory;
    102+    fs::path m_directory;
    103     TestDirectory(std::string directory_name)
    104-        : m_directory{std::filesystem::temp_directory_path() / (directory_name + random_string(16))}
    105+        : m_directory{fs::temp_directory_path() / (directory_name + "_🌽_" + random_string(16))}
    


    w0xlt commented at 6:23 pm on March 3, 2026:

    nit: If you want to avoid implicit std::string conversion.

    0        : m_directory{fs::path{fs::temp_directory_path()} / fs::u8path(directory_name + "_🌽_" + random_string(16))}
    
  9. w0xlt commented at 6:23 pm on March 3, 2026: contributor
    ACK 260b9e5b3ec5b2239d45f4221d2d33e923df2d04
  10. in src/test/kernel/CMakeLists.txt:12 in 260b9e5b3e outdated
     8@@ -9,4 +9,6 @@ target_link_libraries(test_kernel
     9     Boost::headers
    10 )
    11 
    12+add_windows_application_manifest(test_kernel)
    


    hebasto commented at 1:50 pm on March 4, 2026:

    Remove it from the skipped binaries in the CI:

     0--- a/.github/ci-windows-cross.py
     1+++ b/.github/ci-windows-cross.py
     2@@ -41,7 +41,6 @@ def check_manifests():
     3     skipped = {  # Skip as they currently do not have manifests
     4         "fuzz.exe",
     5         "bench_bitcoin.exe",
     6-        "test_kernel.exe",
     7     }
     8     for entry in release_dir.iterdir():
     9         if entry.suffix.lower() != ".exe":
    10--- a/.github/ci-windows.py
    11+++ b/.github/ci-windows.py
    12@@ -106,7 +106,6 @@ def check_manifests(ci_type):
    13         "fuzz.exe",
    14         "bench_bitcoin.exe",
    15         "test_bitcoin-qt.exe",
    16-        "test_kernel.exe",
    17         "bitcoin-chainstate.exe",
    18     }
    19     for entry in release_dir.iterdir():
    

    ?

  11. DrahtBot requested review from hebasto on Mar 4, 2026
  12. kernel: Use fs:: namespace and unicode path in kernel tests
    Add support for unicode characters in paths to the kernel tests by using
    our fs:: wrappers for std::filesystem calls and adding the windows
    application manifest to the binary. This exercises their handling
    through the kernel API.
    89386e700e
  13. sedited force-pushed on Mar 4, 2026
  14. sedited commented at 5:30 pm on March 4, 2026: contributor

    Thank you for the reviews @w0xlt and @hebasto,

    260b9e5b3ec5b2239d45f4221d2d33e923df2d04 -> 89386e700ebc232e2beab3a3f3ea0d1ae78ac203 (kernel_unicode_path_patch_0 -> kernel_unicode_path_patch_1, compare)

    • Addressed @hebasto’s comment, removed test_kernel.exe exceptions from windows application manifest check exceptions.
    • Addressed @w0xlt’s comment, making string conversions explicit.
  15. hebasto approved
  16. hebasto commented at 11:53 am on March 5, 2026: member
    ACK 89386e700ebc232e2beab3a3f3ea0d1ae78ac203.
  17. DrahtBot requested review from w0xlt on Mar 5, 2026
  18. DrahtBot requested review from purpleKarrot on Mar 5, 2026
  19. w0xlt commented at 3:44 pm on March 5, 2026: contributor
    ACK 89386e700ebc232e2beab3a3f3ea0d1ae78ac203

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-03-09 09:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me