-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Update runtests to test for shared memory segments #3308
base: master
Are you sure you want to change the base?
Conversation
Update to remove shellcheck problems (mostly double quotes).
Your commit comment mentions shellcheck. Is this commit dependent on previous shellcheck-related ones? |
All commits and PRs are independent, but all include fixes as indicated by shellcheck. This PR in particular adds a check for left-over shared memory segments. It also fixes the necessary double quotes and few other shellcheck indicated fixes. I separated the PR because this adds/changes functionality. |
done | ||
done | ||
echo | ||
echo "You should remove the key(s) with 'ipcrm -M <key>' if LinuxCNC is" |
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.
Would it be appropriate to add this to what halrun -U does?
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.
Halrun takes care of hal items. Only one of the shared mem keys is from hal.
That said, the point of the check you address here (function test_shmem()) is to show to the person trying to run the tests that something has not gone through cleanup on a previous run. This function is called before any tests are executed and just protects you from starting tests in a bad environment (this has bit my many times). The runtests script exits if keys are found so you can do your own investigation.
It is easier to do cleanups once tests are underway and in-between each test is a checkpoint to see if there are leftovers and can be dealt with (function test_and_remove_shmem()).
There are cases where shared memory segments are left in existence. Either by crashes or other problems. This PR checks the existence of them by key and refuses to start the tests if detected. When tests are underway, runtests will warn and remove segments after a test is completed so that the next tests is not influenced by the previous.
Notably motion-logger fails to cleanup shared memory. This should be fixed separately.
The PR also updates to remove shellcheck problems (mostly double quotes).