common: add helper function _flakey_drop_and_remount
authorFilipe Manana <fdmanana@suse.com>
Mon, 16 Nov 2015 21:41:32 +0000 (08:41 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 16 Nov 2015 21:41:32 +0000 (08:41 +1100)
commit1a22b6820e2e62b053da3ba92cae91e5c4a38320
tree84859106f853d0ced6017516c088ef0122fb7975
parent71f68b47e16bdcfbacaeeaf1e228e05d17a3ae6f
common: add helper function _flakey_drop_and_remount

To avoid having many tests repeating the following pattern:

        _load_flakey_table $FLAKEY_DROP_WRITES
        _unmount_flakey

        _load_flakey_table $FLAKEY_ALLOW_WRITES
        _mount_flakey

add the helper function _flakey_drop_and_remount to remove
the existing duplicated code and serve as a shortcut.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
23 files changed:
common/dmflakey
tests/btrfs/056
tests/btrfs/095
tests/btrfs/098
tests/generic/034
tests/generic/039
tests/generic/040
tests/generic/041
tests/generic/056
tests/generic/057
tests/generic/059
tests/generic/065
tests/generic/066
tests/generic/073
tests/generic/090
tests/generic/101
tests/generic/104
tests/generic/106
tests/generic/107
tests/generic/321
tests/generic/322
tests/generic/325
tests/shared/002