Good point, but it does not work for the test case that triggered me to write this (i.e. testing TC 4.0a1 in a QEMU VM with KQEMU enabled, where 'Xvesa' fails with an 'Illegal Instruction').
I've now an even shorter suggestion to achieve the same:
waitforX || ! echo failed in waitforX || exit