aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/mount_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-08-29 22:12:21 +0900
committerOphestra <cat@gensokyo.uk>2025-08-29 22:12:21 +0900
commitd7c7c69a13868546c26c3e5096fca09304a6e182 (patch)
tree0fb383109f03be3024e0d140454ee866572f393b /container/mount_test.go
parent50972096cd8bffd9b17dbdf656ec34c48edb8f86 (diff)
container/dispatcher: check simple test errors via reflect
Again, avoids the errors package concealing unexpected behaviours. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/mount_test.go')
-rw-r--r--container/mount_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/container/mount_test.go b/container/mount_test.go
index f2f8e29b..cf21e81f 100644
--- a/container/mount_test.go
+++ b/container/mount_test.go
@@ -90,7 +90,7 @@ func TestRemount(t *testing.T) {
}, [][]kexpect{{
{"evalSymlinks", expectArgs{"/sysroot/nix"}, "/sysroot/nix", nil},
{"open", expectArgs{"/sysroot/nix", 0x280000, uint32(0)}, 0xdeadbeef, errUnique},
- }}, errUnique},
+ }}, &os.PathError{Op: "open", Path: "/sysroot/nix", Err: errUnique}},
{"readlink", func(k syscallDispatcher) error {
return newProcPaths(k, hostPath).remount("/sysroot/nix", syscall.MS_REC|syscall.MS_RDONLY|syscall.MS_NODEV)
@@ -107,7 +107,7 @@ func TestRemount(t *testing.T) {
{"open", expectArgs{"/sysroot/nix", 0x280000, uint32(0)}, 0xdeadbeef, nil},
{"readlink", expectArgs{"/host/proc/self/fd/3735928559"}, "/sysroot/nix", nil},
{"close", expectArgs{0xdeadbeef}, nil, errUnique},
- }}, errUnique},
+ }}, &os.PathError{Op: "close", Path: "/sysroot/nix", Err: errUnique}},
{"mountinfo no match", func(k syscallDispatcher) error {
return newProcPaths(k, hostPath).remount("/sysroot/nix", syscall.MS_REC|syscall.MS_RDONLY|syscall.MS_NODEV)