On 2015-02-25 at 02:04, Fam Zheng wrote:
On Tue, 02/24 10:35, Max Reitz wrote:
Redirecting qemu's stderr to stdout makes working with the stderr output
difficult due to the other file descriptor magic performed in
_launch_qemu ("ambiguous redirect").
There is no harm in leaving stderr on stderr, so do it.
Signed-off-by: Max Reitz <address@hidden>
---
If someone has a better solution, especially regarding the redirection
to a subshell here (tests 091 and 109) and in the next patch, I'd be
very grateful. All of my efforts to pipe the output of the _launch_qemu
function resulted in said error ("ambiguous redirect"), so I had to keep
it on stderr and I did not find another way to pipe stderr to another
program.
It will be much less hacky if we compare to a separate stderr reference
(tests/qemu-iotests/109.err), similiar to QAPI tests, or just ignore stderr
where we don't really care.
Hm, I'll take a shot at it. I hope it'll work; but even if it does, it
doesn't feel really right. I'd rather like having stdout and stderr mixed
because that gives us context for the stderr messages (without having to add
a ton of echo 1>&2 into the tests); also, doing so will probably result in a
lot of tests needing to be fixed (because then it won't only potentially
break tests using common.qemu, but every test which outputs something to
stderr). So in the end I'm not sure whether this is a better solution...