Add fault injection with 1-byte reads
Closes #86
@vinipsmaker I made a patch that add a fault injection errinj_1byte_read that limits amount of data on every read() by a single byte. Could you check that fault injection works for you?
Could you check that fault injection works for you?
I think I can give it a try by next month.
Thanks for the patch. It should help one of my projects a lot.
I think I can give it a try by next month.
Good, I will wait for your feedback.
@vinipsmaker How to check the new fault injection with 1-byte read:
$ git clone https://github.com/ligurio/unreliablefs/
$ git checkout ligurio/gh-86
$ cd unreliablesfs
$ cmake .
$ make -j
$ mkdir source target
$ ./unreliablefs -basedir=./source target/
$ cat << EOF > target/unreliablefs.conf
[errinj_1byte_read]
op_regexp = .*
path_regexp = .*
probability = 80
EOF
$ umount source
I can give it a try this week. Will report back soon.
How to check the new fault injection with 1-byte read
Thanks for the heads-on tutorial. It'll make the test quicker.
It's not working at all.
The read() syscall returns -1 and errno is set to EINTR.
That's the log from unreliablefs:
errinj_1byte_read triggered on operation 'getattr', /home/vinipsmaker/Projetos/tabjson/test.BAK/jpat_changes.in
start of 1-byte read
errinj_1byte_read triggered on operation 'open', /home/vinipsmaker/Projetos/tabjson/test.BAK/jpat_changes.in
start of 1-byte read
errinj_1byte_read triggered on operation 'read', /home/vinipsmaker/Projetos/tabjson/test.BAK/jpat_changes.in
start of 1-byte read
errinj_1byte_read triggered on operation 'read', /home/vinipsmaker/Projetos/tabjson/test.BAK/jpat_changes.in
start of 1-byte read
errinj_1byte_read triggered on operation 'flush', /home/vinipsmaker/Projetos/tabjson/test.BAK/jpat_changes.in
start of 1-byte read
errinj_1byte_read triggered on operation 'lock', /home/vinipsmaker/Projetos/tabjson/test.BAK/jpat_changes.in
start of 1-byte read
errinj_1byte_read triggered on operation 'release', /home/vinipsmaker/Projetos/tabjson/test.BAK/jpat_changes.in
start of 1-byte read
Before it hits my call to read() the host for my plugin (gawk) performs some additional simple calls. My plugin controls the calls to read() so that's the part that matters to me.
It's not working at all. The
read()syscall returns-1anderrnois set toEINTR.
Thanks. I'll take a look.