Commit a56f5bf
init: symlink /dev/fd to /proc/self/fd
For process substitution to work, /dev/fd needs to be symlinked to /proc/self/fd
Without the change, the newly added `test_command_process_substitution` test
would fail with:
```
---- test_command_process_substitution stdout ----
Command output=bash: line 1: cd: /tmp/.tmpr2SM0u: No such file or directory
Command output=cat: /dev/fd/63: No such file or directory
[tests/test.rs:251] get_error(recv, None) = Some(
"Command failed with 1",
)
thread 'test_command_process_substitution' panicked at 'assertion failed: dbg!(get_error(recv, None)).is_none()', tests/test.rs:251:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
test_command_process_substitution
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 11 filtered out; finished in 2.41s
error: test failed, to rerun pass `--test test`
```
After the change, the test pass and it is possible to run:
```
$ cargo run -- -k $KERNEL_REPO/arch/x86_64/boot/bzImage "tail <(cat README.md)
Finished dev [unoptimized + debuginfo] target(s) in 0.03s
Running `target/debug/vmtest -k /home/chantra/devel/bpf-next//arch/x86_64/boot/bzImage 'tail <(cat README.md)'`
=> bzImage
===> Booting
===> Setting up VM
===> Running command
For general architecture notes, see [architecture.md](./docs/architecture.md).
Many thanks to [`drgn`'s
vmtest](https://github.com/osandov/drgn/tree/main/vmtest) by Omar Sandoval and
Andy Lutomirski's most excellent [`virtme`](https://github.com/amluto/virtme)
for providing both ideas and technical exploration.
```
Signed-off-by: Manu Bretelle <chantr4@gmail.com>1 parent 81ae527 commit a56f5bf
2 files changed
+30
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
78 | 82 | | |
79 | 83 | | |
80 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
233 | 259 | | |
234 | 260 | | |
235 | 261 | | |
| |||
0 commit comments