tests: skip pdsh tests when pdsh is not installed#626
Merged
Conversation
degremont
reviewed
Jun 15, 2026
| # Get machine short hostname | ||
| HOSTNAME = socket.gethostname().split('.', 1)[0] | ||
|
|
||
| def which(program): |
Collaborator
There was a problem hiding this comment.
Add a comment like:
# Should be replaced by shutil.which() when we drop everything < Py3.3
degremont
approved these changes
Jun 15, 2026
degremont
left a comment
Collaborator
There was a problem hiding this comment.
minor comment, otherwise LGTM
Signed-off-by: Stephane Thiell <sthiell@stanford.edu>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Running the test suite on a host without pdsh is currently fatal: in
test_033_worker_pdsh_tty, clush's tty code path runs the command in a separate task thread; the failed pdsh spawn raisesWorkerError("Cannot run pdsh (error 255)")there, which reachesclush_excepthookand ends inos._exit(1)— silently killing the whole unittest process mid-test. Watching the suite log, this looks like a hang (the log freezes attest_033 ...with no result; the error message is lost in the captured stderr).which()helper to tests/TLib.py@unittest.skipIf(which('pdsh') is None, ...): the threeTaskDistantPdshTestclasses,CLIClushTesttest_032/test_033, and the twoTaskRLimitsTestWorkerPdsh testsVerified without pdsh installed: all guarded tests now skip and the suite completes normally; with pdsh present the guards are no-ops.