Repository navigation
Add unit tests for gpu-kubelet-plugin/sharing.go - #1471
vishalanarase wants to merge 3 commits into
Conversation
Cover the time-slicing and MPS paths that need no GPU or privileges: ID derivation, the control daemon lifecycle helpers, deployment rendering against the shipped template, and the reachable Start/Stop branches. Start and Stop stay partially covered, as mounting the shm tmpfs needs CAP_SYS_ADMIN; getDefaultShmSize reads /proc/meminfo directly and is left untested. Signed-off-by: Vishal Anarase <iamvishalanarase@gmail.com>
👷 Deploy request for dra-driver-nvidia-gpu pending review.Visit the deploys page to approve it
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: vishalanarase The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
This PR has been awaiting review for over month, and I've already followed up a couple of times. Could someone please prioritise the review and share feedback? I'd appreciate getting this moving forward. |
|
Thanks for your patience, and sorry for the delay. These are solid tests: they check real behavior, and rendering the real template catches broken YAML. I left a few small comments. Dropping the bug label since this only adds tests. /remove-kind bug |
…nit-tests-gpu-kubelet-plugin-sharing Signed-off-by: Vishal Anarase <iamvishalanarase@gmail.com>
Clear LD_PRELOAD for every fake nvidia-smi case, use client-go's NewClientset, and note that the MPS Start success path is covered by the GPU sharing bats tests. Signed-off-by: Vishal Anarase <iamvishalanarase@gmail.com>
|
Adding label DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Thanks for the review. I addressed the three comments: |
What type of PR is this?
/kind cleanup
/kind bug
What this PR does / why we need it:
Cover the time-slicing and MPS paths that need no GPU or privileges: ID derivation, the control daemon lifecycle helpers, deployment rendering against the shipped template, and the reachable Start/Stop branches.
cmd/gpu-kubelet-plugin/sharing.gohad two tests (setMpsShmMountPath and the image-pull settings of the rendered deployment). This adds coverage for the rest of the fileWhich issue(s) this PR is related to:
Fixes #1309 Part of #1297
Special notes for your reviewer:
Does this PR introduce a user-facing change?
NONE
Additional documentation (design docs, usage docs, etc.):
Checklist
make check testpasses locallymake check-generatepasses ifapi/changed (CRDs, deepcopy, informers, listers, clientset)make check-modulespasses ifgo.mod/go.sumchangeddeployments/helm) updated if flags, RBAC, or defaults changed