common: allow dmflakey tests to work without udev
[xfstests-dev.git] / common / dmflakey
index bc984bdabdc603d0a4e72b40979f6cfc3d8e216c..e55aefdd45a4ff395e65c9d4632b1d97f53d7d1d 100644 (file)
@@ -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]