opentelemetry-dotnet icon indicating copy to clipboard operation
opentelemetry-dotnet copied to clipboard

skip certain tests when running on ARM

Open TimothyMothra opened this issue 1 year ago • 1 comments

Package

OpenTelemetry.Exporter.OpenTelemetryProtocol

Is your feature request related to a problem?

I was experimenting with Windows on ARM and found one group of tests that fail.

This test fails when targeting net462, but pass when targeting either net8 or net9.

OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests
	
System.IO.IOException : Error loading native library "C:\REPOS\opentelemetry-dotnet\test\OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests\bin\Debug\net462\grpc_csharp_ext.x64.dll". LoadLibrary failed with error 193

Stack Trace: 
	UnmanagedLibrary.ctor(String[] libraryPathAlternatives)
	NativeExtension.LoadNativeMethodsUsingExplicitLoad()
	NativeExtension.ctor()
	NativeExtension.Get()
	GrpcEnvironment.GrpcNativeInit()
	GrpcEnvironment.ctor()
	GrpcEnvironment.AddRef()
	Channel.ctor(String target, ChannelCredentials credentials, IEnumerable`1 options)
	OtlpExporterOptionsExtensions.CreateChannel(OtlpExporterOptions options) line 49
	OtlpGrpcTraceExportClient.ctor(OtlpExporterOptions options, TraceServiceClient traceServiceClient) line 23

Blanch wrote a way to skip certain platforms in the contrib repo: https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/b8fe2cb419738f41c0855c25dbe77bb75de10a98/test/OpenTelemetry.Exporter.Geneva.Tests/UnixUserEventsDataTransportTests.cs#L55

I'm proposing that we consider something similar here:

  • https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.runtimeinformation.processarchitecture?view=net-8.0
  • https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.architecture?view=net-8.0

What is the expected behavior?

N/A

Which alternative solutions or features have you considered?

N/A

Additional context

No response

TimothyMothra avatar Oct 16 '24 21:10 TimothyMothra

The OTLP implementation was being rewritten so this may not be an issue when that effort is complete.

TimothyMothra avatar Oct 16 '24 22:10 TimothyMothra

Related: #6045

I should reassess which tests fail now that the OTLP project has been refactored.

TimothyMothra avatar Jan 14 '25 21:01 TimothyMothra

Closing. I think we are in the good state. #6474 executes tests both on .NET Fx 4.6.2 and .NET 9.0

Kielek avatar Sep 09 '25 13:09 Kielek