Skip to content

Base64url tests fail on s390x (big endian) #104283

@tmds

Description

@tmds

The tests added in #102364 fail on s390x.

Looking at a specific test failure suggest it is an endianness issue:

System.Buffers.Text.Tests.Base64UrlEncoderUnitTests.TryEncodeToUtf8EncodeUpToDestinationSize(numBytes: 1, expectedText: \"AQ\")

Xunit.Sdk.EqualException: Assert.Equal() Failure: Strings differ\n           ↓ (pos 0)\nExpected: \"AQ\"\nActual:   \"QA\"\n           ↑ (pos 0)
        at System.Buffers.Text.Tests.Base64UrlEncoderUnitTests.TryEncodeToUtf8EncodeUpToDestinationSize(Int32 numBytes, String expectedText) in /home/tester/runtime/src/libraries/System.Memory/tests/Base64Url/Base64UrlEncoderUnitTests.cs:line 331
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in /home/tester/runtime/src/mono/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.Mono.cs:line 22
at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr) in /home/tester/runtime/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs:line 178

cc @buyaa-n @uweigand @omajid

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions