openssl: 04-test_params_conversion fails on NonStop x86

This is a new breakage for 3.0.0 when building on x86.

04-test_params_conversion.t ........
        # INFO:  @ /home/ituglib/randall/openssl-3.0/test/testutil/stanza.c:21
        # Reading ../../test/recipes/04-test_params_conversion_data/native_types.txt
        # ERROR: (bool) 'd == pc->d == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:278
        # false
        # unexpected conversion to double on line 14
        # ERROR: (bool) 'd == pc->d == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:278
        # false
        # unexpected conversion to double on line 21
        # ERROR: (bool) 'd == pc->d == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:278
        # false
        # unexpected conversion to double on line 36
        # ERROR: (bool) 'd == pc->d == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:278
        # false
        # unexpected conversion to double on line 44
        # ERROR: (bool) 'd == pc->d == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:278
        # false
        # unexpected conversion to double on line 52
        # ERROR: (bool) 'd == pc->d == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:278
        # false
        # unexpected conversion to double on line 60
        # ERROR: (bool) 'd == pc->d == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:278
        # false
        # unexpected conversion to double on line 67
        # ERROR: (bool) 'd == pc->d == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:278
        # false
        # unexpected conversion to double on line 75
        # ERROR: (bool) 'd == pc->d == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:278
        # false
        # unexpected conversion to double on line 83
        # ERROR: (bool) 'd == pc->d == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:278
        # false
        # unexpected conversion to double on line 91
        # ERROR: (bool) 'd == pc->d == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:278
        # false
        # unexpected conversion to double on line 99
        # ERROR: (bool) 'd == pc->d == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:278
        # false
        # unexpected conversion to double on line 107
        # ERROR: (bool) 'd == pc->d == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:278
        # false
        # unexpected conversion to double on line 115
        # ERROR: (bool) 'd == pc->d == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:278
        # false
        # unexpected conversion to double on line 123
        # ERROR: (bool) 'd == pc->d == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:278
        # false
        # unexpected conversion to double on line 131
        # ERROR: (bool) 'd == pc->d == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:278
        # false
        # unexpected conversion to double on line 139
        # ERROR: (bool) 'd == pc->d == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:278
        # false
        # unexpected conversion to double on line 155
        # ERROR: (bool) 'd == pc->d == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:278
        # false
        # unexpected conversion to double on line 171
        # ERROR: (bool) 'd == pc->d == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:278
        # false
        # unexpected conversion to double on line 179
        # ERROR: (bool) 'd == pc->d == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:278
        # false
        # unexpected conversion to double on line 187
        # ERROR: (bool) 'd == pc->d == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:278
        # false
        # unexpected conversion to double on line 195
        # ERROR: (bool) 'd == pc->d == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:278
        # false
        # unexpected conversion to double on line 203
        # ERROR: (bool) 'd == pc->d == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:278
        # false
        # unexpected conversion to double on line 211
        # ERROR: (bool) 'i32 == pc->i32 == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:198
        # false
        # unexpected conversion to int32 on line 249
        # ERROR: (bool) 'i32 == pc->i32 == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:198
        # false
        # unexpected conversion to int32 on line 256
        # ERROR: (bool) 'i32 == pc->i32 == true' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:198
        # false
        # unexpected conversion to int32 on line 264
        # ERROR: (bool) 'OSSL_PARAM_get_int32(pc->param, &i32) == false' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:192
        # true
        # unexpected valid conversion to int32 on line 272
        # ERROR: (bool) 'OSSL_PARAM_get_int32(pc->param, &i32) == false' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:192
        # true
        # unexpected valid conversion to int32 on line 280
        # ERROR: (bool) 'OSSL_PARAM_get_int32(pc->param, &i32) == false' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:192
        # true
        # unexpected valid conversion to int32 on line 288
        # ERROR: (bool) 'OSSL_PARAM_get_int32(pc->param, &i32) == false' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:192
        # true
        # unexpected valid conversion to int32 on line 296
        # ERROR: (bool) 'OSSL_PARAM_get_int32(pc->param, &i32) == false' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:192
        # true
        # unexpected valid conversion to int32 on line 304
        # ERROR: (bool) 'OSSL_PARAM_get_int32(pc->param, &i32) == false' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:192
        # true
        # unexpected valid conversion to int32 on line 312
        # ERROR: (bool) 'OSSL_PARAM_get_int32(pc->param, &i32) == false' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:192
        # true
        # unexpected valid conversion to int32 on line 320
        # ERROR: (bool) 'OSSL_PARAM_get_int32(pc->param, &i32) == false' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:192
        # true
        # unexpected valid conversion to int32 on line 328
        # INFO:  @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:121
        # Line 336: extra characters at end 'inf' for double
        # ERROR: (bool) 'OSSL_PARAM_get_int32(pc->param, &i32) == false' failed @ /home/ituglib/randall/openssl-3.0/test/params_conversion_test.c:192
        # true
        # unexpected valid conversion to int32 on line 343
        # INFO:  @ /home/ituglib/randall/openssl-3.0/test/testutil/stanza.c:33
        # Completed 0 tests with 0 errors and 0 skipped
        not ok 1 - ../../test/recipes/04-test_params_conversion_data/native_types.txt
# ------------------------------------------------------------------------------
    not ok 1 - run_param_file_tests
# ------------------------------------------------------------------------------
../../util/wrap.pl ../../test/params_conversion_test ../../test/recipes/04-test_params_conversion_data/native_types.txt => 255
not ok 1 - running params_conversion_test native_types.txt
04-test_params_conversion.t ........ 1/? ---------------------------------------
#   Failed test 'running params_conversion_test native_types.txt'
#   at test/recipes/04-test_params_conversion.t line 21.
04-test_params_conversion.t ........ Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 33 (33 by maintainers)

Commits related to this issue

Most upvoted comments

Glad you found it. There is no need for this to be IEEE – the test cases assume a little about IEEE format (mantissa length) but not a lot.

The cast and dereferences are all safe – the OSSL_PARAM structure contains type and length information, so when the casting is done, it is always to the correct type. The OSSL_PARAM design also guarantees correct alignment.

Glad to hear it. We’re going to deploy with IEEE float configured by default. I’m giving a Webinar/presentation in November for the NonStop community on how to build/deploy 3.0.0 with other settings for those who might not like our defaults. When released, anyone on NonStop with git will be able to build OpenSSL 3.0.0 with whatever configuration settings, memory models, threading models, float models, etc., they want without worrying about dependencies - just a c99 compiler which is pretty standard on the boxes. That’s a pretty big win, from my point of view.

Found the root cause - c99 vs. linker incompatible float settings. Pull Request created for the platform configuration. Test now passes.

        # Line 336: extra characters at end 'inf' for double

Line 336 in test/recipes/04-test_params_conversion_data/native_types.txt is at the end of this (that line number wasn’t very obvious, @paulidale):

# infinite
type=double
int32=invalid
int64=invalid
uint32=invalid
uint64=invalid
double=inf

That inf is given to strtod(), so that particular error tells me that the NonStop version of that function doesn’t work quite like we expected. According to https://en.cppreference.com, strtod() is a C function since C89, and it should accept inf:

  • INF or INFINITY ignoring case

POSIX specifies the same: https://pubs.opengroup.org/onlinepubs/009604599/functions/strtod.html

Judging from the rest of the output, I’m guessing that other strto functions also behave in ways that we don’t quite expect. It would be good to know how NonStop varies in this particular area.