summaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorSascha Silbe <silbe@linux.vnet.ibm.com>2016-04-19 21:34:02 +0200
committerMax Reitz <mreitz@redhat.com>2016-05-12 15:33:24 +0200
commit5a8fabf3333c8b445f514377a4292ad0354fd35c (patch)
treeb7f6c7ceae0977dc2cc569d0de1e6942d5aa6fb0 /qapi
parent4e9b25fb054257712004272f35de508a6ae998e5 (diff)
downloadqemu-5a8fabf3333c8b445f514377a4292ad0354fd35c.tar.gz
qemu-5a8fabf3333c8b445f514377a4292ad0354fd35c.tar.bz2
qemu-5a8fabf3333c8b445f514377a4292ad0354fd35c.zip
qemu-iotests: iotests: fail hard if not run via "check"
Running an iotests-based Python test directly might appear to work, but may fail in subtle ways and is insecure: - It creates files with predictable file names in a world-writable location (/var/tmp). - Tests expect the environment to be set up by check. E.g. 041 and 055 may take the wrong code paths if QEMU_DEFAULT_MACHINE is not set. This can lead to false negatives. Instead fail hard and tell the user we want to be run via "check". The actual environment expected by the tests is currently only defined by the implementation of "check". We use two of the environment variables set by "check" as indication of whether we're being run via "check". Anyone writing their own test runner (replacing "check") will need to replicate the full environment (in a broader sense, not just environment variables) provided by "check" anyway, including setting the two environment variables we check. Whereas a regular developer just trying to invoke the tests usually won't have both of these defined in their environment so we can catch their mistake and give out useful advice. Signed-off-by: Sascha Silbe <silbe@linux.vnet.ibm.com> Reviewed-by: Bo Tu <tubo@linux.vnet.ibm.com> Message-id: 1461094442-16014-1-git-send-email-silbe@linux.vnet.ibm.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'qapi')
0 files changed, 0 insertions, 0 deletions