The sysfail
uses bpf to inject failpoint. The -inject
option format align
with strace(1). For example, you can delay mount(2) with 10 seconds.
$ sysfail -inject mount:delay_enter=10000:when=1 -pid 1000
bpf-helper(7) doesn't support sleep function. However, fentry/fexit tracing
functions support sleepable call. sysfail
uses btf_kfunc
to export kernel
function msleep
to bpf_failpoint_delay
. The btf_kfunc
registration is
done by kernel module
$ cd bpf/kmod
$ make install-mod
It requires kernel to build with CONFIG_FUNCTION_ERROR_INJECTION
.