aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2024-05-10 11:41:09 +0200
committerAleksandr Nogikh <nogikh@google.com>2024-05-10 10:03:46 +0000
commit6c75691c70198a767edb664e9ae47962933a1521 (patch)
treebdba68b244fe5f28c9875a4f53173d11a6c39d48
parent375932ce51ae4e4055bf0c41f073751b90970e07 (diff)
pkg/vminfo: make TestLinuxSyscalls() more contained
The test becomes very restrictive in cases when custom descriptions are present. Let's only check for the filesystems we expect to see.
-rw-r--r--pkg/vminfo/linux_test.go21
1 files changed, 12 insertions, 9 deletions
diff --git a/pkg/vminfo/linux_test.go b/pkg/vminfo/linux_test.go
index be157b858..217740f6d 100644
--- a/pkg/vminfo/linux_test.go
+++ b/pkg/vminfo/linux_test.go
@@ -30,15 +30,8 @@ func TestLinuxSyscalls(t *testing.T) {
t.Fatal("too many test programs")
}
filesystems := []string{
- "", "9p", "esdfs", "incremental-fs", "cgroup", "cgroup2",
- "pvfs2", "nfs", "nfs4", "fuse", "fuseblk", "afs", "pipefs",
- "sysfs", "tmpfs", "overlay", "bpf", "efs", "vfat", "xfs",
- "qnx4", "hfs", "f2fs", "btrfs", "befs", "cramfs", "vxfs",
- "ubifs", "jfs", "erofs", "udf", "squashfs", "romfs", "qnx6",
- "ntfs", "ntfs3", "hfsplus", "bfs", "exfat", "affs", "jffs2",
- "ext4", "gfs2", "msdos", "v7", "gfs2meta", "zonefs", "omfs",
- "minix", "adfs", "ufs", "sysv", "reiserfs", "ocfs2", "nilfs2",
- "iso9660", "hpfs", "binder", "bcachefs", "",
+ // Without sysfs, the checks would also disable mount().
+ "", "sysfs", "ext4", "binder", "",
}
files := []flatrpc.FileInfo{
{
@@ -61,6 +54,16 @@ func TestLinuxSyscalls(t *testing.T) {
"syz_kvm_setup_cpu$arm64": true,
"syz_kvm_setup_cpu$ppc64": true,
}
+ // All mount and syz_mount_image calls except for ext4 and binder will be disabled.
+ for call := range disabled {
+ name := call.Name
+ if name == "mount$binder" || name == "syz_mount_image$ext4" {
+ continue
+ }
+ if strings.HasPrefix(name, "syz_mount_image$") || strings.HasPrefix(name, "mount$") {
+ expectDisabled[name] = true
+ }
+ }
for call, reason := range disabled {
if expectDisabled[call.Name] {
continue