When testing with
meson test -C .build --wrap='valgrind --leak-check=full'
the Python binding will trigger 'Invalid read of size 4' warnings.
Tell Python to use malloc directly for all memory allocation which can
be properly traced by valgrind.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
test_env = environment()
test_env.append('MALLOC_PERTURB_', '0')
test_env.append('PYTHONPATH', join_paths(meson.current_build_dir(), '..'))
+ test_env.append('PYTHONMALLOC', 'malloc')
# Test section
test('[Python] import libnvme', python3, args: ['-c', 'from libnvme import nvme'], env: test_env)