Am 11.06.2019 um 20:02 hat Andrey Shinkevich geschrieben: > The Valgrind tool fails to manage its termination when QEMU raises the > signal SIGKILL. Lets exclude such test cases from running under the > Valgrind because there is no sense to check memory issues that way. > > Signed-off-by: Andrey Shinkevich <andrey.shinkev...@virtuozzo.com>
I don't fully understand the reasoning here. Most interesting memory access errors happen before a process terminates. (I'm not talking about leaks here, but use-after-free, buffer overflows, uninitialised memory etc.) However, I do see that running these test cases with -valgrind ends in a hang because the valgrind process keeps hanging around as a zombie process and the test case doesn't reap it. I'm not exactly sure why that is, but it looks more like a problem with the parent process (i.e. the bash script). If we can't figure out how to fix this, we can disable valgrind in these cases, but I think the explanation needs to be different. > diff --git a/tests/qemu-iotests/039 b/tests/qemu-iotests/039 > index 0d4e963..95115e2 100755 > --- a/tests/qemu-iotests/039 > +++ b/tests/qemu-iotests/039 > @@ -65,6 +65,7 @@ echo "== Creating a dirty image file ==" > IMGOPTS="compat=1.1,lazy_refcounts=on" > _make_test_img $size > > +VALGRIND_QEMU="" \ > $QEMU_IO -c "write -P 0x5a 0 512" \ > -c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 \ > | _filter_qemu_io I agree with Vladimir that setting VALGRIND_QEMU only once at the top of the script is probably the better option. Kevin