Commit 75aee309 authored by Peter Hutterer's avatar Peter Hutterer

test: add a script to check for leftover litest rules

An aborted test run can sometimes leave udev rules as detritus. Test for that
so we don't get test case failures triggered by those rules.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 48d6861e
......@@ -564,6 +564,9 @@ if get_option('tests')
config_h.set_quoted('ADDR2LINE', addr2line.path())
endif
leftover_rules = find_program('test/check-leftover-udev-rules.sh')
test('leftover-rules', leftover_rules, is_parallel : false)
dep_libunwind = dependency('libunwind', required : false)
config_h.set10('HAVE_LIBUNWIND', dep_libunwind.found())
......
#!/bin/bash
ls /run/udev/rules.d/*litest*.rules 2>/dev/null
if [[ $? -eq 0 ]]; then
exit 1
fi
ls /etc/udev/hwdb.d/*litest*REMOVEME*.hwdb 2>/dev/null
if [[ $? -eq 0 ]]; then
exit 1
fi
......@@ -52,3 +52,15 @@
fun:ioctl
fun:libevdev_grab
}
{
bash:execute_command
Memcheck:Cond
...
fun:execute_command
}
{
bash:execute_command
Memcheck:Leak
...
fun:execute_command
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment