Debian Codegraph @

internal/linux/statfs_test.go

raw symbols SCIP
1 package linux
2
3 import (
4 "testing"
5
6 "github.com/cilium/ebpf/internal/unix"
7
8 "github.com/go-quicktest/qt"
9 )
10
11 func TestFSType(t *testing.T) {
12 for _, fs := range []struct {
13 path string
14 magic int64
15 }{
16 {"/sys/kernel/tracing", unix.TRACEFS_MAGIC},
17 {"/sys/fs/bpf", unix.BPF_FS_MAGIC},
18 } {
19 fst, err := FSType(fs.path)
20 skipIfNotSupportedOnOS(t, err)
21 qt.Assert(t, qt.IsNil(err))
22 qt.Assert(t, qt.Equals(fst, fs.magic))
23 }
24 }