]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
dm-error: add functions to create dm-error device
authorAnand Jain <Anand.Jain@oracle.com>
Mon, 21 Sep 2015 03:06:18 +0000 (13:06 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 21 Sep 2015 03:06:18 +0000 (13:06 +1000)
commite3a43a873c20128ef38015696d979c2f5b5b0ef6
tree35f0470a3ee2117cbabe5decbc5f2a170071a017
parentd7ae61359f3b02a49c9a0fa69814fd12d3326acf
dm-error: add functions to create dm-error device

Controlled EIO from the device is achieved using the dm device.
Helper functions are at common/dmerror.

Broadly steps will include calling _dmerror_init().
_dmerror_init() will use SCRATCH_DEV to create dm linear device and assign
DMERROR_DEV to /dev/mapper/error-test.

When test script is ready to get EIO, the test cases can call
_dmerror_load_table() which then it will load the dm error.
so that reading DMERROR_DEV will cause EIO. After the test case is
complete, cleanup must be done by calling _dmerror_cleanup().

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
common/dmerror [new file with mode: 0644]
common/rc