gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/pkg/sentry/fsimpl/proc/BUILD (about)

     1  load("//tools:defs.bzl", "go_library", "go_test")
     2  load("//tools/go_generics:defs.bzl", "go_template_instance")
     3  
     4  package(default_applicable_licenses = ["//:license"])
     5  
     6  licenses(["notice"])
     7  
     8  go_template_instance(
     9      name = "fd_dir_inode_refs",
    10      out = "fd_dir_inode_refs.go",
    11      package = "proc",
    12      prefix = "fdDirInode",
    13      template = "//pkg/refs:refs_template",
    14      types = {
    15          "T": "fdDirInode",
    16      },
    17  )
    18  
    19  go_template_instance(
    20      name = "fd_info_dir_inode_refs",
    21      out = "fd_info_dir_inode_refs.go",
    22      package = "proc",
    23      prefix = "fdInfoDirInode",
    24      template = "//pkg/refs:refs_template",
    25      types = {
    26          "T": "fdInfoDirInode",
    27      },
    28  )
    29  
    30  go_template_instance(
    31      name = "subtasks_inode_refs",
    32      out = "subtasks_inode_refs.go",
    33      package = "proc",
    34      prefix = "subtasksInode",
    35      template = "//pkg/refs:refs_template",
    36      types = {
    37          "T": "subtasksInode",
    38      },
    39  )
    40  
    41  go_template_instance(
    42      name = "task_inode_refs",
    43      out = "task_inode_refs.go",
    44      package = "proc",
    45      prefix = "taskInode",
    46      template = "//pkg/refs:refs_template",
    47      types = {
    48          "T": "taskInode",
    49      },
    50  )
    51  
    52  go_template_instance(
    53      name = "tasks_inode_refs",
    54      out = "tasks_inode_refs.go",
    55      package = "proc",
    56      prefix = "tasksInode",
    57      template = "//pkg/refs:refs_template",
    58      types = {
    59          "T": "tasksInode",
    60      },
    61  )
    62  
    63  go_library(
    64      name = "proc",
    65      srcs = [
    66          "fd_dir_inode_refs.go",
    67          "fd_info_dir_inode_refs.go",
    68          "filesystem.go",
    69          "subtasks.go",
    70          "subtasks_inode_refs.go",
    71          "task.go",
    72          "task_fds.go",
    73          "task_files.go",
    74          "task_inode_refs.go",
    75          "task_net.go",
    76          "tasks.go",
    77          "tasks_files.go",
    78          "tasks_inode_refs.go",
    79          "tasks_sys.go",
    80          "yama.go",
    81      ],
    82      visibility = ["//pkg/sentry:internal"],
    83      deps = [
    84          "//pkg/abi/linux",
    85          "//pkg/atomicbitops",
    86          "//pkg/context",
    87          "//pkg/errors/linuxerr",
    88          "//pkg/hostarch",
    89          "//pkg/log",
    90          "//pkg/rand",
    91          "//pkg/refs",
    92          "//pkg/safemem",
    93          "//pkg/sentry/fsimpl/kernfs",
    94          "//pkg/sentry/fsimpl/lock",
    95          "//pkg/sentry/fsimpl/nsfs",
    96          "//pkg/sentry/inet",
    97          "//pkg/sentry/kernel",
    98          "//pkg/sentry/kernel/auth",
    99          "//pkg/sentry/kernel/time",
   100          "//pkg/sentry/limits",
   101          "//pkg/sentry/mm",
   102          "//pkg/sentry/socket",
   103          "//pkg/sentry/socket/unix",
   104          "//pkg/sentry/socket/unix/transport",
   105          "//pkg/sentry/usage",
   106          "//pkg/sentry/vfs",
   107          "//pkg/sync",
   108          "//pkg/tcpip/header",
   109          "//pkg/tcpip/network/ipv4",
   110          "//pkg/usermem",
   111      ],
   112  )
   113  
   114  go_test(
   115      name = "proc_test",
   116      size = "small",
   117      srcs = [
   118          "tasks_sys_test.go",
   119          "tasks_test.go",
   120      ],
   121      library = ":proc",
   122      deps = [
   123          "//pkg/abi/linux",
   124          "//pkg/context",
   125          "//pkg/errors/linuxerr",
   126          "//pkg/fspath",
   127          "//pkg/sentry/contexttest",
   128          "//pkg/sentry/fsimpl/testutil",
   129          "//pkg/sentry/fsimpl/tmpfs",
   130          "//pkg/sentry/inet",
   131          "//pkg/sentry/kernel",
   132          "//pkg/sentry/kernel/auth",
   133          "//pkg/sentry/vfs",
   134          "//pkg/usermem",
   135      ],
   136  )