summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/cgroupfs/BUILD
blob: 60ee5ede25719ceaedb5195af6920e2188e75e56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
load("//tools:defs.bzl", "go_library", "go_test")
load("//tools/go_generics:defs.bzl", "go_template_instance")

licenses(["notice"])

go_template_instance(
    name = "dir_refs",
    out = "dir_refs.go",
    package = "cgroupfs",
    prefix = "dir",
    template = "//pkg/refsvfs2:refs_template",
    types = {
        "T": "dir",
    },
)

go_library(
    name = "cgroupfs",
    srcs = [
        "base.go",
        "bitmap.go",
        "cgroupfs.go",
        "cpu.go",
        "cpuacct.go",
        "cpuset.go",
        "dir_refs.go",
        "job.go",
        "memory.go",
    ],
    visibility = ["//pkg/sentry:internal"],
    deps = [
        "//pkg/abi/linux",
        "//pkg/bitmap",
        "//pkg/context",
        "//pkg/coverage",
        "//pkg/errors/linuxerr",
        "//pkg/fspath",
        "//pkg/hostarch",
        "//pkg/log",
        "//pkg/refs",
        "//pkg/refsvfs2",
        "//pkg/sentry/arch",
        "//pkg/sentry/fsimpl/kernfs",
        "//pkg/sentry/kernel",
        "//pkg/sentry/kernel/auth",
        "//pkg/sentry/memmap",
        "//pkg/sentry/usage",
        "//pkg/sentry/vfs",
        "//pkg/sync",
        "//pkg/usermem",
    ],
)

go_test(
    name = "cgroupfs_test",
    size = "small",
    srcs = ["bitmap_test.go"],
    library = ":cgroupfs",
    deps = ["//pkg/bitmap"],
)