Skip to content

Comments

fix test failures with PERL_UNICODE#19

Merged
david-dick merged 1 commit intodavid-dick:mainfrom
mauke:patch-1
Oct 19, 2025
Merged

fix test failures with PERL_UNICODE#19
david-dick merged 1 commit intodavid-dick:mainfrom
mauke:patch-1

Conversation

@mauke
Copy link
Contributor

@mauke mauke commented Oct 18, 2025

Mark STDOUT as binary before printing random bytes to it. Otherwise it will use the system default encoding, which may be UTF-8 if PERL_UNICODE=S or similar is set in the environment.

Fixes this error:

t/getrandom.t .......... 1/? 
#   Failed test 'getrandom hit with INT signal after 13 bytes recovers to produce correct length of 27 bytes:32'
#   at t/getrandom.t line 61.
# EAGAIN looks like 'Failed to getrandom:Resource temporarily unavailable at -e line 1.'
# Looks like you failed 1 test of 6.

Mark STDOUT as binary before printing random bytes to it. Otherwise it will use the system default encoding, which may be UTF-8 if PERL_UNICODE=S or similar is set in the environment.

Fixes this error:

    t/getrandom.t .......... 1/? 
    #   Failed test 'getrandom hit with INT signal after 13 bytes recovers to produce correct length of 27 bytes:32'
    #   at t/getrandom.t line 61.
    # EAGAIN looks like 'Failed to getrandom:Resource temporarily unavailable at -e line 1.'
    # Looks like you failed 1 test of 6.


Signed-off-by: Lukas Mai <lukasmai.403@gmail.com>
@david-dick david-dick merged commit 1dba5fe into david-dick:main Oct 19, 2025
3 checks passed
@david-dick david-dick self-assigned this Oct 19, 2025
@david-dick david-dick added the bug Something isn't working label Oct 19, 2025
@david-dick
Copy link
Owner

Thanks for the patch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants