Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal/lookup/root Tests Fail in a Mock Chroot #794

Open
damaestro opened this issue Nov 11, 2024 · 1 comment
Open

internal/lookup/root Tests Fail in a Mock Chroot #794

damaestro opened this issue Nov 11, 2024 · 1 comment

Comments

@damaestro
Copy link

The following tests fail in a mock chroot environment:

github.com/NVIDIA/nvidia-container-toolkit/internal/lookup/root
--- FAIL: TestDriverLibrariesLocate (0.04s)
    --- FAIL: TestDriverLibrariesLocate/rootfs-no-cache-lib64libcuda.so.1 (0.00s)
        root_test.go:76: 
            	Error Trace:	/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/internal/lookup/root/root_test.go:76
            	Error:      	Not equal: 
            	            	expected: []string{"/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/testdata/lookup/rootfs-no-cache-lib64/usr/lib64/libcuda.so.999.88.77"}
            	            	actual  : []string{"/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/testdata/lookup/rootfs-no-cache-lib64/usr/lib64/libcuda.so.999.88.77"}
            	            	
            	            	Diff:
            	            	--- Expected
            	            	+++ Actual
            	            	@@ -1,3 +1,3 @@
            	            	 ([]string) (len=1) {
            	            	- (string) (len=214) "/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/testdata/lookup/rootfs-no-cache-lib64/usr/lib64/libcuda.so.999.88.77"
            	            	+ (string) (len=160) "/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/testdata/lookup/rootfs-no-cache-lib64/usr/lib64/libcuda.so.999.88.77"
            	            	 }
            	Test:       	TestDriverLibrariesLocate/rootfs-no-cache-lib64libcuda.so.1
    --- FAIL: TestDriverLibrariesLocate/rootfs-no-cache-lib64libcuda.so.* (0.00s)
        root_test.go:76: 
            	Error Trace:	/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/internal/lookup/root/root_test.go:76
            	Error:      	Not equal: 
            	            	expected: []string{"/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/testdata/lookup/rootfs-no-cache-lib64/usr/lib64/libcuda.so.999.88.77"}
            	            	actual  : []string{"/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/testdata/lookup/rootfs-no-cache-lib64/usr/lib64/libcuda.so.999.88.77"}
            	            	
            	            	Diff:
            	            	--- Expected
            	            	+++ Actual
            	            	@@ -1,3 +1,3 @@
            	            	 ([]string) (len=1) {
            	            	- (string) (len=214) "/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/testdata/lookup/rootfs-no-cache-lib64/usr/lib64/libcuda.so.999.88.77"
            	            	+ (string) (len=160) "/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/testdata/lookup/rootfs-no-cache-lib64/usr/lib64/libcuda.so.999.88.77"
            	            	 }
            	Test:       	TestDriverLibrariesLocate/rootfs-no-cache-lib64libcuda.so.*
    --- FAIL: TestDriverLibrariesLocate/rootfs-no-cache-lib64libcuda.so.*.* (0.00s)
        root_test.go:76: 
            	Error Trace:	/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/internal/lookup/root/root_test.go:76
            	Error:      	Not equal: 
            	            	expected: []string{"/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/testdata/lookup/rootfs-no-cache-lib64/usr/lib64/libcuda.so.999.88.77"}
            	            	actual  : []string{"/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/testdata/lookup/rootfs-no-cache-lib64/usr/lib64/libcuda.so.999.88.77"}
            	            	
            	            	Diff:
            	            	--- Expected
            	            	+++ Actual
            	            	@@ -1,3 +1,3 @@
            	            	 ([]string) (len=1) {
            	            	- (string) (len=214) "/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/testdata/lookup/rootfs-no-cache-lib64/usr/lib64/libcuda.so.999.88.77"
            	            	+ (string) (len=160) "/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/testdata/lookup/rootfs-no-cache-lib64/usr/lib64/libcuda.so.999.88.77"
            	            	 }
            	Test:       	TestDriverLibrariesLocate/rootfs-no-cache-lib64libcuda.so.*.*
    --- FAIL: TestDriverLibrariesLocate/rootfs-no-cache-lib64libcuda.so.999.88.77 (0.00s)
        root_test.go:76: 
            	Error Trace:	/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/internal/lookup/root/root_test.go:76
            	Error:      	Not equal: 
            	            	expected: []string{"/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/testdata/lookup/rootfs-no-cache-lib64/usr/lib64/libcuda.so.999.88.77"}
            	            	actual  : []string{"/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/testdata/lookup/rootfs-no-cache-lib64/usr/lib64/libcuda.so.999.88.77"}
            	            	
            	            	Diff:
            	            	--- Expected
            	            	+++ Actual
            	            	@@ -1,3 +1,3 @@
            	            	 ([]string) (len=1) {
            	            	- (string) (len=214) "/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/testdata/lookup/rootfs-no-cache-lib64/usr/lib64/libcuda.so.999.88.77"
            	            	+ (string) (len=160) "/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/testdata/lookup/rootfs-no-cache-lib64/usr/lib64/libcuda.so.999.88.77"
            	            	 }
            	Test:       	TestDriverLibrariesLocate/rootfs-no-cache-lib64libcuda.so.999.88.77
    --- FAIL: TestDriverLibrariesLocate/rootfs-1libcuda.so.1 (0.00s)
        root_test.go:76: 
            	Error Trace:	/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/internal/lookup/root/root_test.go:76
            	Error:      	Not equal: 
            	            	expected: []string{"/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/testdata/lookup/rootfs-1/lib/x86_64-linux-gnu/libcuda.so.999.88.77"}
            	            	actual  : []string{"/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/testdata/lookup/rootfs-1/lib/x86_64-linux-gnu/libcuda.so.999.88.77"}
            	            	
            	            	Diff:
            	            	--- Expected
            	            	+++ Actual
            	            	@@ -1,3 +1,3 @@
            	            	 ([]string) (len=1) {
            	            	- (string) (len=212) "/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/testdata/lookup/rootfs-1/lib/x86_64-linux-gnu/libcuda.so.999.88.77"
            	            	+ (string) (len=158) "/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/testdata/lookup/rootfs-1/lib/x86_64-linux-gnu/libcuda.so.999.88.77"
            	            	 }
            	Test:       	TestDriverLibrariesLocate/rootfs-1libcuda.so.1
    --- FAIL: TestDriverLibrariesLocate/rootfs-1libcuda.so.* (0.01s)
        root_test.go:76: 
            	Error Trace:	/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/internal/lookup/root/root_test.go:76
            	Error:      	Not equal: 
            	            	expected: []string{"/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/testdata/lookup/rootfs-1/lib/x86_64-linux-gnu/libcuda.so.999.88.77"}
            	            	actual  : []string{"/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/testdata/lookup/rootfs-1/lib/x86_64-linux-gnu/libcuda.so.999.88.77"}
            	            	
            	            	Diff:
            	            	--- Expected
            	            	+++ Actual
            	            	@@ -1,3 +1,3 @@
            	            	 ([]string) (len=1) {
            	            	- (string) (len=212) "/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/testdata/lookup/rootfs-1/lib/x86_64-linux-gnu/libcuda.so.999.88.77"
            	            	+ (string) (len=158) "/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/testdata/lookup/rootfs-1/lib/x86_64-linux-gnu/libcuda.so.999.88.77"
            	            	 }
            	Test:       	TestDriverLibrariesLocate/rootfs-1libcuda.so.*
    --- FAIL: TestDriverLibrariesLocate/rootfs-1libcuda.so.*.* (0.00s)
        root_test.go:76: 
            	Error Trace:	/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/internal/lookup/root/root_test.go:76
            	Error:      	Not equal: 
            	            	expected: []string{"/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/testdata/lookup/rootfs-1/lib/x86_64-linux-gnu/libcuda.so.999.88.77"}
            	            	actual  : []string{"/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/testdata/lookup/rootfs-1/lib/x86_64-linux-gnu/libcuda.so.999.88.77"}
            	            	
            	            	Diff:
            	            	--- Expected
            	            	+++ Actual
            	            	@@ -1,3 +1,3 @@
            	            	 ([]string) (len=1) {
            	            	- (string) (len=212) "/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/testdata/lookup/rootfs-1/lib/x86_64-linux-gnu/libcuda.so.999.88.77"
            	            	+ (string) (len=158) "/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/testdata/lookup/rootfs-1/lib/x86_64-linux-gnu/libcuda.so.999.88.77"
            	            	 }
            	Test:       	TestDriverLibrariesLocate/rootfs-1libcuda.so.*.*
    --- FAIL: TestDriverLibrariesLocate/rootfs-1libcuda.so.999.88.77 (0.00s)
        root_test.go:76: 
            	Error Trace:	/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/internal/lookup/root/root_test.go:76
            	Error:      	Not equal: 
            	            	expected: []string{"/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/testdata/lookup/rootfs-1/lib/x86_64-linux-gnu/libcuda.so.999.88.77"}
            	            	actual  : []string{"/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/testdata/lookup/rootfs-1/lib/x86_64-linux-gnu/libcuda.so.999.88.77"}
            	            	
            	            	Diff:
            	            	--- Expected
            	            	+++ Actual
            	            	@@ -1,3 +1,3 @@
            	            	 ([]string) (len=1) {
            	            	- (string) (len=212) "/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/_build/src/github.com/NVIDIA/nvidia-container-toolkit/testdata/lookup/rootfs-1/lib/x86_64-linux-gnu/libcuda.so.999.88.77"
            	            	+ (string) (len=158) "/builddir/build/BUILD/nvidia-container-toolkit-1.17.1-build/nvidia-container-toolkit-1.17.1/testdata/lookup/rootfs-1/lib/x86_64-linux-gnu/libcuda.so.999.88.77"
            	            	 }
            	Test:       	TestDriverLibrariesLocate/rootfs-1libcuda.so.999.88.77
FAIL
exit status 1
FAIL	github.com/NVIDIA/nvidia-container-toolkit/internal/lookup/root	0.043s
@elezar
Copy link
Member

elezar commented Nov 16, 2024

@damaestro could you please provide more information on how you're running the tests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants