Skip to content

Commit 161024b

Browse files
committed
[no-relnote] Add test for compat mode ldconf file
Signed-off-by: Evan Lezar <elezar@nvidia.com>
1 parent e36e976 commit 161024b

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

tests/e2e/nvidia-container-toolkit_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,16 @@ var _ = Describe("docker", Ordered, ContinueOnFailure, func() {
198198
Expect(err).ToNot(HaveOccurred())
199199
Expect(ldconfigOut).To(ContainSubstring("/usr/local/cuda-12.9/compat/"))
200200
})
201+
202+
It("should create a single ld.so.conf.d config file", func(ctx context.Context) {
203+
lsout, _, err := runner.Run("docker run --rm -i -e NVIDIA_DISABLE_REQUIRE=true --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=runtime.nvidia.com/gpu=all nvcr.io/nvidia/cuda:12.9.0-base-ubi8 bash -c \"ls -l /etc/ld.so.conf.d/00-compat-*.conf\"")
204+
Expect(err).ToNot(HaveOccurred())
205+
Expect(lsout).To(WithTransform(
206+
func(s string) []string {
207+
return strings.Split(strings.TrimSpace(s), "\n")
208+
}, HaveLen(1),
209+
))
210+
})
201211
})
202212

203213
When("Disabling device node creation", Ordered, func() {

0 commit comments

Comments
 (0)