qemu-iotests: Fix core dump suppression in test 039
The shell script attempts to suppress core dumps like this:
ulimit -c 0
ulimit -c "$old_ulimit"
This breaks the test hard unless the limit was zero to begin with!
ulimit sets both hard and soft limit by default, and (re-)raising the
hard limit requires privileges. Broken since it was added in commit
Could be fixed by adding -S to set only the soft limit, but I'm not
sure how portable that is in practice. Simply do it in a subshell
instead, like this:
(ulimit -c 0; exec $QEMU_IO arg...)
Signed-off-by: Markus Armbruster <email@example.com>
Reviewed-by: Fam Zheng <firstname.lastname@example.org>
Signed-off-by: Kevin Wolf <email@example.com>
3 files changed