[PATCH] common: allow dmflakey tests to work without udev

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



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@xxxxxxx>
---
 common/dmflakey | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/dmflakey b/common/dmflakey
index bc984bd..e55aefd 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 <table> [lockfs]
-- 
2.0.0

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux