-
Notifications
You must be signed in to change notification settings - Fork 117
[bugfix] Fix TypeError crash in the performance checking phase when the extracted performance variable value is not a number #1183
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
[bugfix] Fix TypeError crash in the performance checking phase when the extracted performance variable value is not a number #1183
Conversation
Instead of failing when comparing reference of different types with ``` TypeError: '>=' not supported between instances of 'str' and 'float' ``` now, ReFrame fails with a much nicer message like ``` cannot compare 9.c with reference value 0 ```
|
Hello @victorusu, Thank you for updating!
Do see the ReFrame Coding Style Guide Comment last updated at 2020-02-24 14:36:00 UTC |
vkarak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from my other comments, we will need also a unit test to test this.
The reason for that is that we don't do any argument type checking in any other sanity function, so it would be strange to do it in either `assert_reference()` or `assert_bounded()` only. The reason for that is that type and value errors are handled specially if they are raised from user test context. In this particular case, though, the `assert_reference()` is called from the framework context as a result of user input. So it makes more sense then to do the type checking inside `check_performance()`, where we call it. We also don't type check the reference and lower/upper thresholds, because this should be addressed correctly by the updated declaration of the `reference` field as soon as reframe-hpc#1147 is fixed (see also related FIXME note for the `reference` field). Finally, this commit adds also a pipeline unit test to check for this condition.
|
@victorusu I have changed the implementation. I am quoting the comment of my last commit: |
|
@teojgo Can you review this PR? |
I changed completely the implementation, so I need another reviewer
Instead of failing when comparing reference of different types with
now, ReFrame fails with a much nicer message like (edited by @vkarak)
Closes #1146