Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failure StackProfTest#test_raw Expected 0 to be > 0. #227

Open
loqs opened this issue Feb 20, 2024 · 1 comment
Open

Test failure StackProfTest#test_raw Expected 0 to be > 0. #227

loqs opened this issue Feb 20, 2024 · 1 comment

Comments

@loqs
Copy link

loqs commented Feb 20, 2024

A test failure is intermittently triggered with:

$ cd stackprof-0.2.26
$ gem build stackprof.gemspec
$ gem install stackprof-0.2.26.gem
$ rake test
Run options: --seed 14360

# Running:

.............................F.

Finished in 0.274118s, 113.0902 runs/s, 488.8413 assertions/s.

  1) Failure:
StackProfTest#test_raw [/build/ruby-stackprof/src/stackprof-0.2.26/test/test_stackprof.rb:169]:
Expected 0 to be > 0.

31 runs, 134 assertions, 1 failures, 0 errors, 0 skips
rake aborted!
Command failed with status (1)

Tasks: TOP => test
(See full trace by running task with --trace)

Changing the assert so the delta can be zero I can no longer trigger the test failure. From clock_gettime.3

CLOCK_MONOTONIC variants guarantee that the time returned by consecutive calls will not go backwards, but successive calls may—depending on the architecture—return identical (not-increased) time values.

Or possibly a conversion error?

Versions:
stackprof v0.2.26
ruby 3.0.6

@Segaja
Copy link

Segaja commented Aug 10, 2024

The same happens on ruby 3.2.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants