Skip to content

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

@loqs

Description

@loqs

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions