generic: add a writeback error handling test
authorJeff Layton <jlayton@redhat.com>
Fri, 16 Jun 2017 19:36:17 +0000 (15:36 -0400)
committerEryu Guan <eguan@redhat.com>
Tue, 20 Jun 2017 12:30:05 +0000 (20:30 +0800)
commit702421f528911e8e399e0e65c90bce201334ce01
treeaffd91b8d6e8b19c6ac7583b1602b087a7eaa94c
parent39c3f812deb71701b5a933e62a99c1e383952707
generic: add a writeback error handling test

I'm working on a set of kernel patches to change how writeback errors
are handled and reported in the kernel. Instead of reporting a
writeback error to only the first fsync caller on the file, it has
the the kernel report them once on every file description that was
open at the time of the error.

This patch adds a test for this new behavior. Basically, open many fds
to the same file, turn on dm_error, write to each of the fds, and then
fsync them all to ensure that they all get an error back.

To do that, I'm adding a new tools/dmerror script that the C program
can use to load the error table from the script. It's also suitable for
setting up, frobbing and tearing down a dmerror device for by-hand testing.

For now, only ext2/3/4 and xfs are whitelisted on this test, since those
filesystems are included in the initial patchset. We can add to that as
we convert filesystems, and eventually make it a more general test.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
.gitignore
common/dmerror
doc/auxiliary-programs.txt
src/Makefile
src/dmerror [new file with mode: 0755]
src/fsync-err.c [new file with mode: 0644]
tests/generic/441 [new file with mode: 0755]
tests/generic/441.out [new file with mode: 0644]
tests/generic/group