This commit is contained in:
Evan Lezar 2025-03-21 09:13:53 +08:00 committed by GitHub
commit 2ac389f75c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 19 additions and 12 deletions

View File

@ -109,7 +109,8 @@ containerEdits:
- ro - ro
- nosuid - nosuid
- nodev - nodev
- bind - rbind
- rprivate
`, `,
}, },
} }

View File

@ -111,7 +111,8 @@ containerEdits:
- ro - ro
- nosuid - nosuid
- nodev - nodev
- bind - rbind
- rprivate
`, `,
}, },
} }

View File

@ -52,7 +52,8 @@ func TestIPCMounts(t *testing.T) {
"ro", "ro",
"nosuid", "nosuid",
"nodev", "nodev",
"bind", "rbind",
"rprivate",
"noexec", "noexec",
}, },
}, },

View File

@ -71,7 +71,8 @@ func (d *mountsToContainerPath) Mounts() ([]Mount, error) {
"ro", "ro",
"nosuid", "nosuid",
"nodev", "nodev",
"bind", "rbind",
"rprivate",
}, },
} }
mounts = append(mounts, mount) mounts = append(mounts, mount)

View File

@ -32,7 +32,8 @@ func TestMountsToContainerPath(t *testing.T) {
"ro", "ro",
"nosuid", "nosuid",
"nodev", "nodev",
"bind", "rbind",
"rprivate",
} }
testCases := []struct { testCases := []struct {

View File

@ -102,7 +102,8 @@ func (d *mounts) Mounts() ([]Mount, error) {
"ro", "ro",
"nosuid", "nosuid",
"nodev", "nodev",
"bind", "rbind",
"rprivate",
}, },
} }
} }

View File

@ -41,7 +41,8 @@ func TestMounts(t *testing.T) {
"ro", "ro",
"nosuid", "nosuid",
"nodev", "nodev",
"bind", "rbind",
"rprivate",
} }
logger, logHook := testlog.NewNullLogger() logger, logHook := testlog.NewNullLogger()

View File

@ -79,12 +79,12 @@ func TestDiscovererFromCSVFiles(t *testing.T) {
{ {
Path: "/usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so", Path: "/usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so",
HostPath: "/usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so", HostPath: "/usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so",
Options: []string{"ro", "nosuid", "nodev", "bind"}, Options: []string{"ro", "nosuid", "nodev", "rbind", "rprivate"},
}, },
{ {
Path: "/usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so", Path: "/usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so",
HostPath: "/usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so", HostPath: "/usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so",
Options: []string{"ro", "nosuid", "nodev", "bind"}, Options: []string{"ro", "nosuid", "nodev", "rbind", "rprivate"},
}, },
}, },
expectedHooks: []discover.Hook{ expectedHooks: []discover.Hook{
@ -135,12 +135,12 @@ func TestDiscovererFromCSVFiles(t *testing.T) {
{ {
Path: "/usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so", Path: "/usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so",
HostPath: "/usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so", HostPath: "/usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so",
Options: []string{"ro", "nosuid", "nodev", "bind"}, Options: []string{"ro", "nosuid", "nodev", "rbind", "rprivate"},
}, },
{ {
Path: "/usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so", Path: "/usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so",
HostPath: "/usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so", HostPath: "/usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so",
Options: []string{"ro", "nosuid", "nodev", "bind"}, Options: []string{"ro", "nosuid", "nodev", "rbind", "rprivate"},
}, },
}, },
expectedHooks: []discover.Hook{ expectedHooks: []discover.Hook{
@ -175,7 +175,7 @@ func TestDiscovererFromCSVFiles(t *testing.T) {
{ {
Path: "/usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so", Path: "/usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so",
HostPath: "/usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so", HostPath: "/usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so",
Options: []string{"ro", "nosuid", "nodev", "bind"}, Options: []string{"ro", "nosuid", "nodev", "rbind", "rprivate"},
}, },
}, },
}, },