ssssam opened a new issue #1610:
URL: https://github.com/apache/buildstream/issues/1610
Using Bst 1.6.4 to wrap the test suite of a commercial component I am
working on.
The tests are run using a command similar to this.
```
/bin/bash "-c" "/bin/mkdir -p ${TEST_OUTPUT}/mytest mytest > >(tee
${TEST_OUTPUT}/mytest/stdout.log) 2> >(tee ${TEST_OUTPUT}/mytest/stderr.log
>&2)"
```
Bash version in the sandbox is 4.2.26.
The tests all fail when run inside `bst build`, with this error:
```
/bin/bash: /dev/fd/62: No such file or directory
```
Bash tries to use `/dev/fd` for the `>()` redirects, and this fails as it
does not exist.
I found an old newsgroup post saying that this is by design:
https://gnu.bash.bug.narkive.com/waCuOLkA/dev-fd-62-no-such-file-or-directory.
I haven't tested if newer Bash versions have the same issue.
Workaround:
* Run the tests in `bst shell` instead, so the `/dev` from the host is
bind-mounted with its `/dev/fd` symlink
* Use a custom element plugin to run the tests, which can set
`SandboxFlags.INTERACTIVE` and get the same effect as above.
Not possible:
* Create the `/dev/fd` symlink in the sandbox - /dev is readonly.
Proposed solution:
* Make a `/dev/fd` symlink in every sandbox. It seems harmless and would
prevent this strange breakage when using Bash shell.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]