Skip to content

Commit 3ee52fe

Browse files
Yucong SunNobody
authored andcommitted
selftests/bpf: workaround stdout issue in VM launched by vmtest.sh
This apply a workaround to fix stdout issue in `./vmtest.sh` invocations, but doesn't work on `./vmtest.sh -s` Signed-off-by: Yucong Sun <[email protected]>
1 parent f2cdb4b commit 3ee52fe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/testing/selftests/bpf/vmtest.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ EOF
184184
fi
185185

186186
sudo bash -c "echo '#!/bin/bash' > ${init_script}"
187+
sudo bash -c "cat >>${init_script}" <<EOF
188+
# Force rebinding stdout/stderr to /dev/ttyS0, to workaround a mysterious issue
189+
exec 1>/dev/ttyS0 2>/dev/ttyS0
190+
EOF
187191

188192
if [[ "${command}" != "" ]]; then
189193
sudo bash -c "cat >>${init_script}" <<EOF

0 commit comments

Comments
 (0)