Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sharness: Add munged_kill_daemon and munged_cleanup
Add munged_kill_daemon() to kill an errant munged process left running in the background from a previous test, and munged_cleanup() which currently only calls munged_kill_daemon(). The situation of an errant munged process is most likely to occur when a munged test is expected to fail and instead erroneously succeeds since those tests do not include a corresponding munged_stop_daemon(). munged_cleanup() should be called at the end of any test script that starts a munged process. It is not necessary to call it or munged_kill_daemon() after every munged process is supposedly stopped since munged_kill_daemon() is now called by munged_start_daemon() to kill any previous munged process named in the $(MUNGE_PIDFILE} before starting a new one. By only checking for a leftover munged process named in the pidfile, munged_kill_daemon() will not interfere with munged processes belonging to other tests or system use. Tested: - Arch Linux - CentOS Stream 8, 8.3.2011, 7.9.2009, 6.10 - Debian sid, 10.8, 9.13, 8.11, 7.11, 6.0.10, 5.0.10, 4.0 - Fedora 33, 32, 31 - FreeBSD 12.2, 11.4 - NetBSD 9.1, 9.0, 8.1 - OpenBSD 6.8, 6.7, 6.6 - openSUSE 15.2, 15.1 - Raspberry Pi OS (Raspbian 10) [armv7l] - Ubuntu 20.10, 20.04.2 LTS, 18.04.5 LTS, 16.04.7 LTS, 14.04.6 LTS, 12.04.5 LTS Tested by calling munged_start_daemon() without a corresponding munged_stop_daemon() in order to leave the munged process running in the background. The test suite was run with debug=t and verbose=t to check for the test_debug() message for the killed munged pid.
- Loading branch information
Showing
15 changed files
with
111 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters