Skip to content

Conversation

@vkarak
Copy link
Contributor

@vkarak vkarak commented Dec 17, 2022

While I was working with parameterised tests, I noticed some hash clashes, where a test with a single parameter value was being assigned the same hash even if the parameter value changed. It turned out the bug was a missing () ! The hashcode property was treating is_fixture as a property instead of a function, so the test was always returning true, thus the has was actually being computed based on the test's unique name and not based on its display name... I've added a unit test to avoid that from happening again.

@vkarak vkarak added this to the ReFrame sprint 22.12.1 milestone Dec 17, 2022
@vkarak vkarak self-assigned this Dec 17, 2022
@vkarak vkarak changed the title [bugfix] Fix test hash calculation [bugfix] Fix hash clashes for parameterised tests Dec 17, 2022
@vkarak vkarak force-pushed the bugfix/hash-conflicts branch from b235dd0 to d680e75 Compare December 17, 2022 10:13
@codecov-commenter
Copy link

codecov-commenter commented Dec 17, 2022

Codecov Report

Base: 86.57% // Head: 86.61% // Increases project coverage by +0.03% 🎉

Coverage data is based on head (4ab7308) compared to base (0398ce6).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2714      +/-   ##
==========================================
+ Coverage   86.57%   86.61%   +0.03%     
==========================================
  Files          60       60              
  Lines       11213    11213              
==========================================
+ Hits         9708     9712       +4     
+ Misses       1505     1501       -4     
Impacted Files Coverage Δ
reframe/core/pipeline.py 93.77% <100.00%> (+0.52%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@vkarak vkarak merged commit de75906 into reframe-hpc:master Dec 20, 2022
@vkarak vkarak deleted the bugfix/hash-conflicts branch December 20, 2022 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants