Bazel's own integration tests fail locally on Linux
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 75
Description
### Description of the bug:
Many of Bazel's own integration tests fail locally on Linux with an error such as the following:
```
src/main/tools/linux-sandbox-pid1.cc:280: "The sandbox working directory cannot be below a path where we mount tmpfs (you requested mounting /tmp/bazel-working-directory/_main/_tmp/74701f16efd616fedbad9bb8b36df803/root/0a1489a1de031466aaaf200f31c5b29b/sandbox/linux-sandbox/1/execroot/_main in /tmp). Is your --output_base= below one of your --sandbox_tmpfs_path values?": Invalid argument
```
This appears to be due to a combination of the outer Bazel process now running with `--incompatible_sandbox_hermetic_tmp` and the inner Bazel process running with `--sandbox_tmpfs_path=/tmp` due to
https://github.com/bazelbuild/bazel/blob/055e25b75c74d1e2c4c71694a938b6456323facc/src/test/shell/testenv.sh.tmpl#L261
### Which category does this issue belong to?
_No response_
### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
```shell
bazel test //src/test/shell/bazel:bazel_rules_cc_test --test_output=errors
```
### Which operating system are you running Bazel on?
Linux
### What is the output of `bazel info release`?
_No response_
### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.
_No response_
### What's the output of `git remote get-url origin; git rev-parse master; git rev-parse HEAD` ?
_No response_
### Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
_No response_
### Have you found anything relevant by searching the web?
_No response_
### Any other information, logs, or outputs that you want to share?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.