• Chris Wilson's avatar
    lib/igt_aux: Divert ioctls for signal injection · d5456108
    Chris Wilson authored
    To simplify and speed up running interruptible tests, use a custom
    ioctl() function that control the signaling and detect when we need no
    more iterations to trigger an interruption.
    
    We use a realtime timer to inject the signal after a certain delay,
    increasing the delay on every loop to try and exercise different code
    paths within the function. The first delay is very short such that we
    hopefully enter the kernel with a pending signal.
    
    Clients should use
    
    struct igt_sigiter iter = {};
    while (igt_sigiter_repeat(&iter, enable_interrupts=true))
    	do_test()
    
    to automatically repeat the test until we can inject no more signals
    into the ioctls. This is condensed into a macro
    
    igt_interruptible(enable_interrupts=true)
    	do_test();
    
    for convenience.
    Signed-off-by: Chris Wilson's avatarChris Wilson <chris@chris-wilson.co.uk>
    d5456108
Name
Last commit
Last update
..
.gitignore Loading commit data...
Android.mk Loading commit data...
Makefile.am Loading commit data...
Makefile.sources Loading commit data...
igt_assert.c Loading commit data...
igt_command_line.sh Loading commit data...
igt_exit_handler.c Loading commit data...
igt_fork_helper.c Loading commit data...
igt_invalid_subtest_name.c Loading commit data...
igt_list_only.c Loading commit data...
igt_no_exit.c Loading commit data...
igt_no_exit_list_only.c Loading commit data...
igt_no_subtest.c Loading commit data...
igt_segfault.c Loading commit data...
igt_simple_test_subtests.c Loading commit data...
igt_simulation.c Loading commit data...
igt_stats.c Loading commit data...
igt_subtest_group.c Loading commit data...
igt_timeout.c Loading commit data...