DCIT / perl-CryptX

https://metacpan.org/pod/CryptX
Other
35 stars 23 forks source link

0.076: test suite is failing with Math-BigInt-1.999837 from perl 5.36.0 #84

Closed kloczek closed 2 years ago

kloczek commented 2 years ago

Looks like test suite is failing when it is build against Math-BigInt-1.999837 from perl 5.36.0.

+ cd CryptX-0.076
++ perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- -j48
+ HARNESS_OPTIONS=j48
+ /usr/bin/make -O -j48 V=1 VERBOSE=1 test
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- CryptX.bs blib/arch/auto/CryptX/CryptX.bs 644
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/002_all_pm.t ...................... skipped: set AUTHOR_MODE to enable this test (developer only!)
# Testing CryptX 0.076, Perl 5.036000 linux /usr/bin/perl
# osname       = linux
# myarchname   = x86_64-linux
# myuname      = linux devel-g2v 5.17.11-300.fc36.x86_64 #1 smp preempt wed may 25 15:04:05 utc 2022 x86_64 gnulinux
# intsize      = 4
# longsize     = 8
# longlongsize = 8
# ptrsize      = 8
# byteorder    = 12345678
#
# LibTomCrypt 1.18.2-develop (www.libtom.net)
# LibTomCrypt is public domain software.
#
#
# Endianness: little (64-bit words)
# Clean stack: disabled
#
# Ciphers built-in:
#    Blowfish
#    RC2
#    RC5
#    RC6
#    Safer+
#    Safer
#    Rijndael
#    XTEA
#    Twofish (tables)
#    DES
#    CAST5
#    Noekeon
#    Skipjack
#    Khazad
#    Anubis  (tweaked)
#    KSEED
#    KASUMI
#    MULTI2
#    Camellia
#    IDEA
#    Serpent
#    TEA
# Stream ciphers built-in:
#    ChaCha
#    Salsa20
#    XSalsa20
#    Sosemanuk
#    Rabbit
#    RC4
#    SOBER128
#
# Hashes built-in:
#    SHA3
#    KECCAK
#    SHA-512
#    SHA-384
#    SHA-512/256
#    SHA-256
#    SHA-512/224
#    SHA-224
#    TIGER
#    SHA1
#    MD5
#    MD4
#    MD2
#    RIPEMD128
#    RIPEMD160
#    RIPEMD256
#    RIPEMD320
#    WHIRLPOOL
#    BLAKE2S
#    BLAKE2B
#    CHC_HASH
#
# Block Chaining Modes:
#    CFB
#    OFB
#    ECB
#    CBC
#    CTR
#    LRW (tables)
#    F8
#    XTS
#
# MACs:
#    HMAC
#    OMAC
#    PMAC
#    PELICAN
#    XCBC
#    F9
#    POLY1305
#    BLAKE2S MAC
#    BLAKE2B MAC
#
# ENC + AUTH modes:
#    EAX
#    OCB
#    OCB3
#    CCM
#    GCM (tables)
#    CHACHA20POLY1305
#
# PRNG:
#    Yarrow (LTC_YARROW_AES=2)
#    SPRNG
#    RC4
#    ChaCha20
#    Fortuna (LTC_FORTUNA_POOLS=32, LTC_FORTUNA_RESEED_RATELIMIT_TIMED, )
#    SOBER128
#
# PK Crypto:
#    RSA (with blinding and CRT hardening)
#    DH
#    ECC (with blinding)
#    DSA
#    Ed25519
#    X25519
#    LTC_PK_MAX_RETRIES=20
#
# MPI (Math):
#    LTC_MPI
#    LTM_DESC
#    LTC_MILLER_RABIN_REPS=40
#
# Compiler:
#    GCC compiler 12.1.1 20220628 (Red Hat 12.1.1-3).
#    x86-64 detected.
#
# Various others:  ARGTYPE=4  ADLER32  BASE64  BASE64-URL-SAFE  BASE32  BASE16  BCRYPT  LTC_BCRYPT_DEFAULT_ROUNDS=10  CRC32  DER  LTC_DER_MAX_RECURSION=30  PKCS#1  PKCS#5  PKCS#8  PKCS#12  PADDING  HKDF  PBES1  PBES2  SSH  LTC_DEVRANDOM  LTC_TRY_URANDOM_FIRST  LTC_RNG_GET_BYTES  LTC_RNG_MAKE_PRNG  LTC_HASH_HELPERS  LTC_FILE_READ_BUFSIZE=8192  LTC_FAST  LTC_ROx_ASM  LTC_NO_TEST  LTC_ECC_SHAMIR  LTC_CLOCK_GETTIME
#
# MP_PROVIDER  = LibTomMath
# MP_DIGIT_BIT = 60
#
t/001_compile.t ..................... ok
t/003_all_pm_pod.t .................. skipped: set AUTHOR_MODE to enable this test (developer only!)
t/004_all_pm_pod_spelling.t ......... skipped: set AUTHOR_MODE to enable this test (developer only!)
t/005_all_pm_pod_coverage.t ......... skipped: set AUTHOR_MODE to enable this test (developer only!)
t/auth_enc_ocb.t .................... ok
t/auth_enc_chacha20poly1305.t ....... ok
t/auth_enc_ccm.t .................... ok
t/auth_enc_ccm_test_vector_ltc.t .... ok
t/auth_enc_eax.t .................... ok
t/auth_enc_gcm.t .................... ok
t/cipher_twofish_test_vectors_bc.t .. ok
t/cipher_seed_test_vectors_bc.t ..... ok
t/cipher_xtea_test_vectors_bc.t ..... ok
t/cipher_stream_rabbit.t ............ ok
t/cipher_aes_test_vectors_bc.t ...... ok
t/auth_enc_gcm_test_vector_ltc.t .... ok
t/cipher_aes.t ...................... ok
t/cipher_anubis.t ................... ok
t/cipher_blowfish.t ................. ok
t/cipher_camellia.t ................. ok
t/cipher_cast5.t .................... ok
t/cipher_xtea.t ..................... ok
t/auth_enc_eax_test_vector_ltc.t .... ok
t/auth_enc_ocb_test_vectors_ietf.t .. ok
t/cipher_des.t ...................... ok
t/cipher_des_ede.t .................. ok
t/cipher_twofish.t .................. ok
t/cipher_kasumi.t ................... ok
t/checksum.t ........................ ok
t/cipher_idea.t ..................... ok
t/cipher_khazad.t ................... ok
t/cipher_serpent_compat.t ........... ok
t/cipher_rc2.t ...................... ok
t/cipher_multi2.t ................... ok
t/cipher_rc5.t ...................... ok
t/cipher_idea_compat.t .............. ok
t/cipher_noekeon.t .................. ok
t/cipher_safer_k128.t ............... ok
t/cipher_rc6.t ...................... ok
t/cipher_seed.t ..................... ok
t/cipher_safer_k64.t ................ ok
t/cipher_safer_sk64.t ............... ok
t/cipher_skipjack.t ................. ok
t/cipher_saferp.t ................... ok
t/cipher_stream.t ................... ok
t/cipher_safer_sk128.t .............. ok
t/digest_blake2b_384.t .............. ok
t/digest_blake2b_160.t .............. ok
t/digest_blake2s_128.t .............. ok
t/digest_blake2b_512.t .............. ok
t/digest_blake2s_224.t .............. ok
t/digest_blake2b_256.t .............. ok
t/cipher_serpent.t .................. ok
t/digest_blake2s_160.t .............. ok
t/digest_shake.t .................... ok
t/digest_keccak384.t ................ ok
t/digest_chaes.t .................... ok
t/digest_blake2s_256.t .............. ok
t/digest_ripemd160.t ................ ok
t/digest_md2.t ...................... ok
t/digest_ripemd256.t ................ ok
t/digest_keccak512.t ................ ok
t/digest_keccak224.t ................ ok
t/digest_ripemd320.t ................ ok
t/digest_keccak256.t ................ ok
t/digest_md5.t ...................... ok
t/digest_md4.t ...................... ok
t/digest_sha256.t ................... ok
t/digest_sha1.t ..................... ok
t/digest_ripemd128.t ................ ok
t/key_derivation.t .................. ok
t/digest_sha224.t ................... ok
# Math::BigInt VERSION=1.999837
t/mbi_ltm_01load.t .................. ok
t/digest_sha3_224.t ................. ok
t/mbi_ltm_bugs.t .................... ok
t/digest_sha384.t ................... ok
t/digest_sha3_256.t ................. ok
t/mac_blake2b.t ..................... ok
t/mbi_ltm_storable.t ................ ok
t/mac_hmac_nist.t ................... ok
# use64=1 ivsize=8 ivtype=long use64bitint=define
t/mbi_ltm_mbi-from-big-scalar.t ..... ok
t/mode_cfb.t ........................ ok
t/digest_sha3_384.t ................. ok
t/mode_ofb.t ........................ ok
t/mac_poly1305.t .................... ok
t/digest_sha512_224.t ............... ok
t/mac_blake2s.t ..................... ok
t/digest_sha3_512.t ................. ok
t/mac_pmac.t ........................ ok
t/mac_omac.t ........................ ok
t/mode_ctr.t ........................ ok
t/mac_pelican.t ..................... ok
t/digest_sha512.t ................... ok
t/digest_sha512_256.t ............... ok
t/mbi_ltm_bigroot.t ................. ok
t/digest_whirlpool.t ................ ok
t/digest_tiger192.t ................. ok
t/pk_enc_pem.t ...................... ok
t/prng_chacha20.t ................... ok
t/pkcs8.t ........................... ok
t/mac_xcbc.t ........................ ok
t/prng_sober128.t ................... ok
t/prng_fortuna.t .................... ok
t/prng.t ............................ ok
t/prng_rc4.t ........................ ok
t/mac_f9.t .......................... ok
t/prng_yarrow.t ..................... ok
t/jwk.t ............................. ok
t/pk_dh.t ........................... ok
t/mac_hmac.t ........................ ok

#   Failed test 'blog(100)'
#   at t/mbi_ltm_biglog.t line 123.
#          got: '100'
#     expected: '2'
t/pk_x25519.t ....................... ok
# Looks like you failed 1 test of 71.
t/mbi_ltm_biglog.t ..................
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/71 subtests
t/pk_ed25519.t ...................... ok
t/pk_rsa.t .......................... ok
t/pk_dsa_test_vectors_openssl.t ..... ok
t/pk_dsa.t .......................... ok
t/pk_ecc.t .......................... ok
t/mode_ecb.t ........................ ok
t/mode_cbc.t ........................ ok
t/pk_rsa_test_vectors_openssl.t ..... ok
t/cipher_test_vectors_openssl.t ..... ok
t/mbi_ltm_bigintg.t ................. ok
t/mac_omac_test_vectors_ltc.t ....... ok
t/mac_pmac_test_vectors_ltc.t ....... ok
t/sshkey.t .......................... ok
t/crypt-misc.t ...................... ok
t/pk_ecc_test_vectors_openssl.t ..... ok
t/cipher_multi2_rounds.t ............ ok
t/mac_hmac_test_vectors_ltc.t ....... ok
t/digest_test_vectors_ltc.t ......... ok
t/cipher_test_vectors_ltc.t ......... ok

#   Failed test '$x = Math::BigFloat->new("0"); $y = Math::BigFloat->new("10"); $x->bcos($y);'
#   at ./t/mbi_ltm/bigfltpm.inc line 168.
#          got: '1.000000000'
#     expected: '1'

#   Failed test '$x = Math::BigFloat->new("0"); $y = Math::BigFloat->new("20"); $x->bcos($y);'
#   at ./t/mbi_ltm/bigfltpm.inc line 168.
#          got: '1.0000000000000000000'
#     expected: '1'
Argument "" isn't numeric in subtraction (-) at /usr/share/perl5/Math/BigFloat.pm line 4680, <DATA> line 330.
Argument "" isn't numeric in subtraction (-) at /usr/share/perl5/Math/BigFloat.pm line 4680, <DATA> line 331.
Argument "" isn't numeric in subtraction (-) at /usr/share/perl5/Math/BigFloat.pm line 4680, <DATA> line 332.
Argument "abc" isn't numeric in subtraction (-) at /usr/share/perl5/Math/BigFloat.pm line 4680, <DATA> line 333.
# Looks like you failed 2 tests of 2408.
t/mbi_ltm_bigfltpm.t ................
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/2408 subtests
        (less 1 skipped subtest: 2405 okay)
t/cipher_stream_salsa20.t ........... ok
t/mbi_ltm_bigintpm.t ................ ok

Test Summary Report
-------------------
t/mbi_ltm_biglog.t                (Wstat: 256 (exited 1) Tests: 71 Failed: 1)
  Failed test:  41
  Non-zero exit status: 1
t/mbi_ltm_bigfltpm.t              (Wstat: 512 (exited 2) Tests: 2408 Failed: 2)
  Failed tests:  79, 81
  Non-zero exit status: 2
Files=135, Tests=24677,  2 wallclock secs ( 1.49 usr  0.20 sys + 19.37 cusr  3.50 csys = 24.56 CPU)
Result: FAIL
Failed 2/135 test programs. 3/24677 subtests failed.
make: *** [Makefile:1666: test_dynamic] Error 255

Please let me know if you want me to perform some diagnostics or need more details.

karel-m commented 2 years ago

fixed by https://github.com/DCIT/perl-CryptX/commit/b749f0097e12824540a8d576fbce96afc013fa89