From: Theodore Ts'o Date: Wed, 13 Aug 2014 01:20:57 +0000 (+1000) Subject: common: allow dmflakey tests to work without udev X-Git-Tag: v2022.05.01~3088 X-Git-Url: http://git.apps.os.sepia.ceph.com/?p=xfstests-dev.git;a=commitdiff_plain;h=2e0960f99e634f6372b0a56318152883d08642d0 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 Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- diff --git a/common/dmflakey b/common/dmflakey index bc984bda..e55aefdd 100644 --- a/common/dmflakey +++ b/common/dmflakey @@ -29,6 +29,7 @@ _init_flakey() FLAKEY_TABLE_DROP="0 $BLK_DEV_SIZE flakey $SCRATCH_DEV 0 0 180 1 drop_writes" $DMSETUP_PROG create flakey-test --table "$FLAKEY_TABLE" || \ _fatal "failed to create flakey device" + $DMSETUP_PROG mknodes > /dev/null 2>&1 } _mount_flakey() @@ -48,6 +49,7 @@ _cleanup_flakey() $DMSETUP_PROG resume flakey-test > /dev/null 2>&1 $UMOUNT_PROG $SCRATCH_MNT > /dev/null 2>&1 $DMSETUP_PROG remove flakey-test > /dev/null 2>&1 + $DMSETUP_PROG mknodes > /dev/null 2>&1 } # _load_flakey_table [lockfs]