Skip to content

Commit

Permalink
PATCH: [perl #133649] fails on OpenBSD-6.4 unthreaded
Browse files Browse the repository at this point in the history
OpenBSD has a (perfectly legal) different syntax for the string
parameter to setlocale(), so the failing tests are not actually valid on
that platform.  Rather than go to the significant effort to create a
Configure probe to find out what platforms use what syntax, simply skip
these on this platform.  The tests aren't skipped if built with threads,
as they actually help make sure that the code that deals with different
syntaxes for thread-safe handling of locales works in the face of
different syntaxes
  • Loading branch information
khwilliamson committed Nov 19, 2018
1 parent 620e0b0 commit 8f6aacb
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion t/run/locale.t
Expand Up @@ -459,7 +459,18 @@ EOF
}
}

{
SKIP: {
# Note: a Configure probe could be written to give us the syntax to
# use, but khw doesn't think it's worth it. If the POSIX 2008 locale
# functions are being used, the syntax becomes mostly irrelevant, so
# do the test anyway if they are
# it's a lot of trouble to figure out in a perl script
if ($^O eq 'openbsd' && ( $Config{useithreads} ne 'define'
|| ! ${^SAFE_LOCALES}))
{
skip("The setlocale() syntax used is invalid on this platform", 2);
}

my @valid_categories = valid_locale_categories();

my $valid_string = "";
Expand Down

0 comments on commit 8f6aacb

Please sign in to comment.