Ported pico_ql_test.c for Valgrind in master.