While developing a patch to update xilinx tests to use the "expect"
utility I found that with the current use of "expect" in the *qemu-* *scripts,
it is possible for the test to produce a *false success *if the expect
script returns nonzero due to the following lines

    set +e
...
    ./automation/scripts/qemu-key.exp | sed 's/\r\+$//'
    (end of file)

The first disables exiting on errors which is needed for cleanup in some
cases such as turning off power in a hardware test. However, here the
script exits 0 on reaching the end of file.

This is a serious flaw in our testing system as the result of the test is
essentially ignored.

I have been able produce such a false success here by setting a random passed
message and short timeout (line 142).
https://gitlab.com/xen-project/people/sstabellini/xen/-/jobs/7693194287#L142

I have sent a patch that fixes this using the same method from my xilinx
patch but suggestions are welcome. For qemu tests it may be enough to
instead just remove "set +e".


Reply via email to