mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
common: allow dmflakey tests to work without udev
If udev is not present, we need to run "dmsetup mknodes" to make sure /dev/mapper/flakey-test is created or destroyed as appropriate. On a system with udev, running "dmsetup mknodes" will be a no-op. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
c4a6eb0a03
commit
2e0960f99e
@@ -29,6 +29,7 @@ _init_flakey()
|
|||||||
FLAKEY_TABLE_DROP="0 $BLK_DEV_SIZE flakey $SCRATCH_DEV 0 0 180 1 drop_writes"
|
FLAKEY_TABLE_DROP="0 $BLK_DEV_SIZE flakey $SCRATCH_DEV 0 0 180 1 drop_writes"
|
||||||
$DMSETUP_PROG create flakey-test --table "$FLAKEY_TABLE" || \
|
$DMSETUP_PROG create flakey-test --table "$FLAKEY_TABLE" || \
|
||||||
_fatal "failed to create flakey device"
|
_fatal "failed to create flakey device"
|
||||||
|
$DMSETUP_PROG mknodes > /dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
_mount_flakey()
|
_mount_flakey()
|
||||||
@@ -48,6 +49,7 @@ _cleanup_flakey()
|
|||||||
$DMSETUP_PROG resume flakey-test > /dev/null 2>&1
|
$DMSETUP_PROG resume flakey-test > /dev/null 2>&1
|
||||||
$UMOUNT_PROG $SCRATCH_MNT > /dev/null 2>&1
|
$UMOUNT_PROG $SCRATCH_MNT > /dev/null 2>&1
|
||||||
$DMSETUP_PROG remove flakey-test > /dev/null 2>&1
|
$DMSETUP_PROG remove flakey-test > /dev/null 2>&1
|
||||||
|
$DMSETUP_PROG mknodes > /dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
# _load_flakey_table <table> [lockfs]
|
# _load_flakey_table <table> [lockfs]
|
||||||
|
|||||||
Reference in New Issue
Block a user