Files

79 lines
1.6 KiB
Python
Raw Permalink Normal View History

load("//pkg/sync/locking:locking.bzl", "declare_mutex")
load("//tools:defs.bzl", "go_library", "go_test")
2018-04-27 10:37:02 -07:00
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)
declare_mutex(
2022-05-19 18:27:34 -07:00
name = "vfs_mutex",
out = "vfs_mutex.go",
package = "pipe",
prefix = "vfs",
)
declare_mutex(
2022-05-19 18:27:34 -07:00
name = "pipe_mutex",
out = "pipe_mutex.go",
nested_lock_names = ["pipe"],
2022-05-19 18:27:34 -07:00
package = "pipe",
prefix = "pipe",
)
declare_mutex(
2022-05-19 18:27:34 -07:00
name = "inode_mutex",
out = "inode_mutex.go",
package = "pipe",
prefix = "inode",
)
2018-04-27 10:37:02 -07:00
go_library(
name = "pipe",
srcs = [
2022-05-19 18:27:34 -07:00
"inode_mutex.go",
2018-04-27 10:37:02 -07:00
"pipe.go",
2022-05-19 18:27:34 -07:00
"pipe_mutex.go",
2020-05-26 21:42:07 -07:00
"pipe_unsafe.go",
2019-10-17 13:08:27 -07:00
"pipe_util.go",
2021-01-14 17:32:38 -08:00
"save_restore.go",
2019-10-17 13:08:27 -07:00
"vfs.go",
2018-04-27 10:37:02 -07:00
],
visibility = ["//pkg/sentry:internal"],
deps = [
"//pkg/abi/linux",
"//pkg/atomicbitops",
2020-01-27 15:17:58 -08:00
"//pkg/context",
"//pkg/errors/linuxerr",
2021-03-29 13:28:32 -07:00
"//pkg/hostarch",
"//pkg/log",
"//pkg/marshal/primitive",
2020-05-26 21:42:07 -07:00
"//pkg/safemem",
2018-04-27 10:37:02 -07:00
"//pkg/sentry/arch",
2022-11-21 13:54:38 -08:00
"//pkg/sentry/fsutil",
2019-10-17 13:08:27 -07:00
"//pkg/sentry/vfs",
2020-01-09 22:00:42 -08:00
"//pkg/sync",
2022-05-19 18:27:34 -07:00
"//pkg/sync/locking",
2020-01-27 15:17:58 -08:00
"//pkg/usermem",
2018-04-27 10:37:02 -07:00
"//pkg/waiter",
"@org_golang_x_sys//unix:go_default_library",
2018-04-27 10:37:02 -07:00
],
)
go_test(
name = "pipe_test",
size = "small",
srcs = [
"pipe_test.go",
],
2020-01-27 10:04:07 -08:00
library = ":pipe",
2018-04-27 10:37:02 -07:00
deps = [
2020-01-27 15:17:58 -08:00
"//pkg/context",
"//pkg/errors/linuxerr",
2020-01-27 15:17:58 -08:00
"//pkg/sentry/contexttest",
2022-11-21 13:54:38 -08:00
"//pkg/sentry/vfs",
2020-01-27 15:17:58 -08:00
"//pkg/usermem",
2018-04-27 10:37:02 -07:00
"//pkg/waiter",
],
)