diff options
author | Michael Pratt <mpratt@google.com> | 2019-03-18 18:39:08 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-03-18 18:40:06 -0700 |
commit | 8a499ae65f361fb01c2e4be03122f69910a8ba4a (patch) | |
tree | 6b217045a189f94b9bd62756fe61bf40f34d622f /test/BUILD | |
parent | e420cc3e5d2066674d32d16ad885bee6b30da210 (diff) |
Remove references to replaced child in Rename in ramfs/agentfs
In the case of a rename replacing an existing destination inode, ramfs
Rename failed to first remove the replaced inode. This caused:
1. A leak of a reference to the inode (making it live indefinitely).
2. For directories, a leak of the replaced directory's .. link to the
parent. This would cause the parent's link count to incorrectly
increase.
(2) is much simpler to test than (1), so that's what I've done.
agentfs has a similar bug with link count only, so the Dirent layer
informs the Inode if this is a replacing rename.
Fixes #133
PiperOrigin-RevId: 239105698
Change-Id: I4450af2462d8ae3339def812287213d2cbeebde0
Diffstat (limited to 'test/BUILD')
-rw-r--r-- | test/BUILD | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/test/BUILD b/test/BUILD new file mode 100644 index 000000000..6b83757f6 --- /dev/null +++ b/test/BUILD @@ -0,0 +1,48 @@ +# gVisor is a general-purpose sandbox. + +package(licenses = ["notice"]) + +exports_files(["LICENSE"]) + +# We need to define a bazel platform and toolchain to specify dockerPrivileged +# and dockerRunAsRoot options, they are required to run tests on the RBE +# cluster in Kokoro. +alias( + name = "rbe_ubuntu1604", + actual = ":rbe_ubuntu1604_r346485", +) + +platform( + name = "rbe_ubuntu1604_r346485", + constraint_values = [ + "@bazel_tools//platforms:x86_64", + "@bazel_tools//platforms:linux", + "@bazel_tools//tools/cpp:clang", + "@bazel_toolchains//constraints:xenial", + "@bazel_toolchains//constraints/sanitizers:support_msan", + ], + remote_execution_properties = """ + properties: { + name: "container-image" + value:"docker://gcr.io/cloud-marketplace/google/rbe-ubuntu16-04@sha256:f3120a030a19d67626ababdac79cc787e699a1aa924081431285118f87e7b375" + } + properties: { + name: "dockerAddCapabilities" + value: "SYS_ADMIN" + } + properties: { + name: "dockerPrivileged" + value: "true" + } + """, +) + +toolchain( + name = "cc-toolchain-clang-x86_64-default", + exec_compatible_with = [ + ], + target_compatible_with = [ + ], + toolchain = "@bazel_toolchains//configs/ubuntu16_04_clang/1.1/bazel_0.20.0/default:cc-compiler-k8", + toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", +) |