2019-09-12 22:09:01 +00:00
|
|
|
load("//tools/go_stateify:defs.bzl", "go_library")
|
|
|
|
load("@io_bazel_rules_go//go:def.bzl", "go_test")
|
2020-01-06 20:51:35 +00:00
|
|
|
load("//tools/go_generics:defs.bzl", "go_template_instance")
|
2019-07-18 22:09:14 +00:00
|
|
|
|
|
|
|
package(licenses = ["notice"])
|
|
|
|
|
|
|
|
go_template_instance(
|
|
|
|
name = "dentry_list",
|
|
|
|
out = "dentry_list.go",
|
2020-01-06 20:51:35 +00:00
|
|
|
package = "tmpfs",
|
2019-07-18 22:09:14 +00:00
|
|
|
prefix = "dentry",
|
|
|
|
template = "//pkg/ilist:generic_list",
|
|
|
|
types = {
|
2019-08-08 18:45:33 +00:00
|
|
|
"Element": "*dentry",
|
|
|
|
"Linker": "*dentry",
|
2019-07-18 22:09:14 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
|
|
|
|
go_library(
|
2020-01-06 20:51:35 +00:00
|
|
|
name = "tmpfs",
|
2019-07-18 22:09:14 +00:00
|
|
|
srcs = [
|
|
|
|
"dentry_list.go",
|
|
|
|
"directory.go",
|
|
|
|
"filesystem.go",
|
2019-10-19 18:48:09 +00:00
|
|
|
"named_pipe.go",
|
2019-07-18 22:09:14 +00:00
|
|
|
"regular_file.go",
|
|
|
|
"symlink.go",
|
2020-01-06 20:51:35 +00:00
|
|
|
"tmpfs.go",
|
2019-07-18 22:09:14 +00:00
|
|
|
],
|
2020-01-06 20:51:35 +00:00
|
|
|
importpath = "gvisor.dev/gvisor/pkg/sentry/fsimpl/tmpfs",
|
2019-07-18 22:09:14 +00:00
|
|
|
deps = [
|
|
|
|
"//pkg/abi/linux",
|
2019-10-19 18:48:09 +00:00
|
|
|
"//pkg/amutex",
|
2019-12-11 21:40:57 +00:00
|
|
|
"//pkg/fspath",
|
2020-01-06 20:51:35 +00:00
|
|
|
"//pkg/log",
|
2019-10-19 18:48:09 +00:00
|
|
|
"//pkg/sentry/arch",
|
2019-07-18 22:09:14 +00:00
|
|
|
"//pkg/sentry/context",
|
2020-01-06 20:51:35 +00:00
|
|
|
"//pkg/sentry/fs",
|
|
|
|
"//pkg/sentry/fs/fsutil",
|
|
|
|
"//pkg/sentry/kernel",
|
2019-07-18 22:09:14 +00:00
|
|
|
"//pkg/sentry/kernel/auth",
|
2019-10-19 18:48:09 +00:00
|
|
|
"//pkg/sentry/kernel/pipe",
|
2020-01-06 20:51:35 +00:00
|
|
|
"//pkg/sentry/memmap",
|
|
|
|
"//pkg/sentry/pgalloc",
|
|
|
|
"//pkg/sentry/platform",
|
|
|
|
"//pkg/sentry/safemem",
|
|
|
|
"//pkg/sentry/usage",
|
2019-07-18 22:09:14 +00:00
|
|
|
"//pkg/sentry/usermem",
|
|
|
|
"//pkg/sentry/vfs",
|
|
|
|
"//pkg/syserror",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
go_test(
|
|
|
|
name = "benchmark_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = ["benchmark_test.go"],
|
|
|
|
deps = [
|
2020-01-06 20:51:35 +00:00
|
|
|
":tmpfs",
|
2019-07-18 22:09:14 +00:00
|
|
|
"//pkg/abi/linux",
|
2019-12-23 21:17:29 +00:00
|
|
|
"//pkg/fspath",
|
2019-11-25 23:20:25 +00:00
|
|
|
"//pkg/refs",
|
2019-07-18 22:09:14 +00:00
|
|
|
"//pkg/sentry/context",
|
|
|
|
"//pkg/sentry/context/contexttest",
|
|
|
|
"//pkg/sentry/fs",
|
|
|
|
"//pkg/sentry/fs/tmpfs",
|
|
|
|
"//pkg/sentry/kernel/auth",
|
|
|
|
"//pkg/sentry/vfs",
|
|
|
|
"//pkg/syserror",
|
|
|
|
],
|
|
|
|
)
|
2019-10-19 18:48:09 +00:00
|
|
|
|
|
|
|
go_test(
|
2020-01-06 20:51:35 +00:00
|
|
|
name = "tmpfs_test",
|
2019-10-19 18:48:09 +00:00
|
|
|
size = "small",
|
2020-01-06 20:51:35 +00:00
|
|
|
srcs = [
|
|
|
|
"pipe_test.go",
|
|
|
|
"regular_file_test.go",
|
|
|
|
],
|
|
|
|
embed = [":tmpfs"],
|
2019-10-19 18:48:09 +00:00
|
|
|
deps = [
|
|
|
|
"//pkg/abi/linux",
|
2019-12-23 21:17:29 +00:00
|
|
|
"//pkg/fspath",
|
2019-10-19 18:48:09 +00:00
|
|
|
"//pkg/sentry/context",
|
|
|
|
"//pkg/sentry/context/contexttest",
|
|
|
|
"//pkg/sentry/kernel/auth",
|
2020-01-06 20:51:35 +00:00
|
|
|
"//pkg/sentry/kernel/contexttest",
|
2019-10-19 18:48:09 +00:00
|
|
|
"//pkg/sentry/usermem",
|
|
|
|
"//pkg/sentry/vfs",
|
|
|
|
"//pkg/syserror",
|
|
|
|
],
|
|
|
|
)
|