This makes the rtprio warning less verbose when the `${CI}` env var is set. `${CI}` is usually set by common CI providers, see: - https://docs.travis-ci.com/user/environment-variables/#default-environment-v... - https://www.appveyor.com/docs/environment-variables/ - https://docs.gitlab.com/ee/ci/variables/#predefined-variables-environment-va...
"pthread_setschedparam failed: Operation not permitted" is still printed to inform about the misconfiguration.
If no one objects, I will merge this in the next couple of days...
Closes #275 You can view, comment on, or merge this pull request online at:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/279
-- Commit Summary --
* Suppress rtprio warning when ${CI} env var is set
-- File Changes --
M platforms/unix/vm/sqUnixHeartbeat.c (3)
-- Patch Links --
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/279.patch https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/279.diff
Hi Fabio,
I think using a CI environment variable to control the output of warnings is less than ideal:
- It is doing double duty with a variable, which is never a good idea.
- If I'm running a CI that does allow rtprio and I want the warning, I have to write the non-obvious script to unset the environment variable.
- If I'm running some other production environment and want to suppress the warning I have to do something like:
export CI "this is a ugly hack to make smalltalk suppress one warning" squeak/pharo some.image
Either of:
--suppress-rtprio-warning # previously suggested
or
--suppress list,of,warnings
as command line options is a better approach. We have CI specific scripts which can do the appropriate thing.
Cheers, Alistair
@akgrant43 I agree, a command line flag is nice and this was just a practical "hack". As I mentioned, the "pthread_setschedparam failed: Operation not permitted" error is still displayed, it's just the "how to fix it" that I tried to suppress here. I'd like to see that flag implemented soon, but I'm afraid I don't have enough time to work on it (if you know how the option parse work, it should be much work. I just haven't touched that code yet).
Closed #279.
Hi @fniephaus ,
Thanks for the clarification.
Cheers, Alistair
vm-dev@lists.squeakfoundation.org