Skip to contentSkip to conversation

common: allow dmflakey tests to work without udev

PATCH New Theodore Ts'o 1 participant 1 message Aug 11, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 common/dmflakey | 2 ++
 1 file changed, 2 insertions(+)
common/dmflakey +2 -0
index bc984bd..e55aefd 100644
@@ -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 <table> [lockfs]
Signature · 1 line
2.0.0