aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell/bazel/bazel_sandboxing_test.sh
diff options
context:
space:
mode:
authorGravatar Philipp Wollermann <philwo@google.com>2017-03-24 09:47:11 +0000
committerGravatar Yue Gan <yueg@google.com>2017-03-24 12:20:06 +0000
commit3e2329a73ffd5d60e5e2babe60ebe5bf322c07da (patch)
treeb1a66c81c4e59eedc84fb28bc8a02ec68fe3ed73 /src/test/shell/bazel/bazel_sandboxing_test.sh
parent2879971666e0cc3f1f24ae91b88c4400af77e7f3 (diff)
sandbox: Remove the flag --sandbox_block_path.
It is in the way of optimizing the performance of the sandbox, because it requires us to create two helper files (an unreadable file and an unreadable directory) which are bind-mounted on top of paths specified via this flag. These two helper files were created on a tmpfs mounted by the sandbox until now, which ensured that they were automatically deleted on exit. However, mounting tmpfs on /dev/shm or /tmp causes issues like #2686 or #1882. By removing this flag, we can get rid of the two helper files, which means we can also remove the reliance on a "sandbox temp directory" completely in the next change. -- PiperOrigin-RevId: 151107496 MOS_MIGRATED_REVID=151107496
Diffstat (limited to 'src/test/shell/bazel/bazel_sandboxing_test.sh')
-rwxr-xr-xsrc/test/shell/bazel/bazel_sandboxing_test.sh17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/test/shell/bazel/bazel_sandboxing_test.sh b/src/test/shell/bazel/bazel_sandboxing_test.sh
index 8e393d86ec..f85d33aaff 100755
--- a/src/test/shell/bazel/bazel_sandboxing_test.sh
+++ b/src/test/shell/bazel/bazel_sandboxing_test.sh
@@ -298,23 +298,6 @@ function test_sandbox_undeclared_deps_skylark_with_local_tag() {
|| fail "Action did not produce output: examples/genrule:skylark_breaks1_works_with_local_tag"
}
-function test_sandbox_block_filesystem() {
- output_file="${BAZEL_GENFILES_DIR}/examples/genrule/breaks2.txt"
-
- bazel build --sandbox_block_path=/var/log examples/genrule:breaks2 &> $TEST_log \
- && fail "Non-hermetic genrule succeeded: examples/genrule:breaks2" || true
-
- [ -f "$output_file" ] ||
- fail "Action did not produce output: $output_file"
-
- if [ $(wc -l $output_file) -gt 1 ]; then
- fail "Output contained more than one line: $output_file"
- fi
-
- fgrep "Permission denied" $output_file ||
- fail "Output did not contain expected error message: $output_file"
-}
-
function test_sandbox_cyclic_symlink_in_inputs() {
bazel build examples/genrule:breaks3 &> $TEST_log \
&& fail "Genrule with cyclic symlinks succeeded: examples/genrule:breaks3" || true