Repository navigation
Add behavioural tests for spank_qrmi - #210
Draft
awennersteen wants to merge 1 commit into
Draft
awennersteen wants to merge 1 commit into
awennersteen wants to merge 1 commit into
Conversation
Build spank_qrmi.c into a test binary with fake Slurm and QRMI functions
and run the plugin hooks the way slurmstepd does for a batch step. The
cases cover --qpu with one or several resources, unknown, inaccessible
and failing resources, --env: plugin arguments, copying {name}_QRMI_*
from the job environment, token export and release, and RUST_LOG from
SRUN_DEBUG.
One case is marked WILL_FAIL because it hits a bug on main: a token
already in the job environment wins over the one just acquired (#204).
CI runs the tests after the first spank_qrmi build, which provides
qrmi.h.
awennersteen
force-pushed
the
aw/spank-qrmi-tests
branch
from
October 28, 2026 15:53
0bf38a2 to
05be0b0
Compare
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.
Description of Change
Adds a CTest suite under
plugins/tests/spank_qrmi/that runs the plugin hooks the way slurmstepd does for a batch step (slurm_spank_init->slurm_spank_task_init->slurm_spank_exit), without a Slurm cluster or a QPU.#includesspank_qrmi.cand provides fakespank_*/slurm_*andqrmi_*functions against the realslurm/spank.handqrmi.h, so it links neither libslurm nor libqrmi. Each case records calls and checks the resulting job environment.--qpu, task step skipped, missing/failing config, one or several resources, unknown resources (alone and in a list), inaccessible resource, failing acquire,--env:plugin arguments (with and without=), copying{name}_QRMI_*from the job environment (including entries without=), token export and release with the matching deallocator, a fresh token replacing one inherited from the job environment, andRUST_LOGfromSRUN_DEBUG.qrmi.h.One case is
WILL_FAILbecause it hits a bug on main; whichever of this PR and #204 merges second should drop it from the list inCMakeLists.txt:fresh_token_replaces_job_env_token-> Keep credentials out of spank_qrmi logs #204(
unknown_resource_in_listwasWILL_FAILuntil #209 merged.)Testing
ctestin Ubuntu 24.04 (libslurm 23.11) against main 1c2eb64: 17/17 pass (15 pass, 2 expected failures).WILL_FAILcase passes.spank_job_control_setenvfake for spank_qrmi: expose --qpu value to slurmctld as QRMI_QPU job control e… #211), built against qrmi main: 17/17 pass.Prepared by Claude, not yet reviewed by @awennersteen.