rnpgp / ruby-rnp

Ruby bindings for librnp
https://www.rnpgp.org
MIT License
7 stars 3 forks source link

s2k_iterations test is flaky #82

Closed andrey-utkin closed 1 year ago

andrey-utkin commented 2 years ago

The results change from run to run.

First run: failure https://github.com/rnpgp/rnp/runs/7359446582?check_suite_focus=true

Failures:

  1) #<Method: Rnp.s2k_iterations(hash:, msec:) /home/runner/work/rnp/rnp/installs/ruby-rnp/lib/rnp/misc.rb:196> returns a higher iterations count for MD5 vs SM3
     Failure/Error:
       expect(
         Rnp.s2k_iterations(hash: 'MD5', msec: MSEC)
       ).to be > Rnp.s2k_iterations(hash: 'SM3', msec: MSEC)

       expected: > 983040
            got:   655360
     # ./spec/misc_spec.rb:160:in `block (2 levels) in <top (required)>'

Finished in 15.99 seconds (files took 0.28659 seconds to load)
247 examples, 1 failure

Failed examples:

rspec ./spec/misc_spec.rb:158 # #<Method: Rnp.s2k_iterations(hash:, msec:) /home/runner/work/rnp/rnp/installs/ruby-rnp/lib/rnp/misc.rb:196> returns a higher iterations count for MD5 vs SM3

Second run: success https://github.com/rnpgp/rnp/actions/runs/2677366450

maxirmx commented 1 year ago

Fixed by https://github.com/rnpgp/rnp/issues/2024