Skip to content

Bug/193 nativeshims #211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 22 commits into
base: develop
Choose a base branch
from
Draft

Bug/193 nativeshims #211

wants to merge 22 commits into from

Conversation

DennisDyallo
Copy link
Collaborator

This pull request includes significant updates to the GitHub workflows and introduces new integration tests for the Yubico.Core library. The most important changes include adding matrix builds for different .NET frameworks, updating test configurations, and adding new files for integration tests.

Workflow Updates:

Integration Tests:

Codebase Enhancements:

Project Configuration:

…oaded

tests are run on both framework 6 and 8.
add dll resolving tests to verify that the necessary dlls can be loaded.
build warning on TFM and nuget package compat ignored
@DennisDyallo DennisDyallo requested a review from Copilot March 24, 2025 11:07
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request updates the GitHub workflows to run tests across multiple .NET framework versions and adds new integration tests (and supporting helper and registry classes) for the Yubico.Core library native library loading functionality. Key changes include:

  • New workflow matrix builds for macOS, Ubuntu, and Windows with support for .NET 6.0, 8.0 (and .NET Framework 4.7 on Windows).
  • Addition of integration test projects and helper classes to verify native library loading on different platforms.
  • Enhancements to platform-specific library registry and library loader to improve native library verification.

Reviewed Changes

Copilot reviewed 40 out of 44 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Yubico.Core/tests/integration/Yubico/PlatformInterop/PlatformLibraryLoader.cs Added a helper for loading libraries and retrieving error messages across Windows, Linux, and macOS.
Yubico.Core/tests/integration/Yubico/PlatformInterop/PlatformLibraryRegistry.cs Introduced a registry for platform libraries, mapping libraries by OS.
Yubico.Core/tests/integration/Yubico/PlatformInterop/PlatformTestHelpers.cs Provided common test helpers for skipping tests on non-target platforms and determining architecture-specific paths.
Yubico.Core/tests/integration/Yubico/PlatformInterop/NativeLibraryTests.cs Added integration tests that verify loading of native libraries and proper error handling.
Yubico.Core/tests/integration/Yubico/PlatformInterop/NativeLibraryRegistry.cs Set up a registry of native libraries with per-platform verification lambdas.
Yubico.Core/src/Yubico/PlatformInterop/Libraries.Net47.cs Updated .NET Framework 4.7 implementation to use RuntimeInformation for determining architecture.
.github/workflows/test-macos.yml, test-windows.yml, test-ubuntu.yml, test.yml Updated workflows to run tests on matrix builds across different frameworks and refined file path filters.
Yubico.Core/tests/unit/Yubico/Core/Cryptography/AesGcmPrimitivesOpenSslTests.cs Adjusted unit tests to conditionally use new AesGcm constructors with clearer array initialization formatting.
Files not reviewed (4)
  • Yubico.Core/src/Yubico.Core.csproj: Language not supported
  • Yubico.Core/tests/integration/Yubico.Core.IntegrationTests.csproj: Language not supported
  • Yubico.Core/tests/integration/xunit.runner.json: Language not supported
  • Yubico.Core/tests/unit/Yubico.Core.UnitTests.csproj: Language not supported
Comments suppressed due to low confidence (1)

Yubico.Core/tests/unit/Yubico/Core/Cryptography/AesGcmPrimitivesOpenSslTests.cs:73

  • [nitpick] Review the conditional compilation blocks for AesGcm usage to ensure consistency and clarity between .NET versions; aligning the formatting and structure can improve maintainability.
#if NET6_0

# - '**.csproj'
# - '**.sln'
# - '.github/workflows/test.yml'
# Run on specific file paths relevant to tests
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need

@DennisDyallo DennisDyallo force-pushed the bug/193-nativeshims branch from 0f5170b to 27087b9 Compare April 7, 2025 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[KNOWN ISSUE] The SDK does not correctly locate the Yubico.NativeShims.dll on 32 bit processes
1 participant