]> granicus.if.org Git - zfs/commitdiff
Enable zfs_rename_002_pos, zfs_rename_005_neg, zfs_rename_007_pos
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 13 Oct 2016 23:00:26 +0000 (16:00 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 14 Oct 2016 17:11:00 +0000 (10:11 -0700)
These tests all pass once updated to wait for udev to create the
expected linked under /dev/zvol/.

Reviewed-by: luozhengzheng <luo.zhengzheng@zte.com.cn>
Reviewed-by: yuxiang <guo.yong33@zte.com.cn>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #5275

tests/runfiles/linux.run
tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename.kshlib
tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename_007_pos.ksh

index 5764bb8f919da4eaa37cdcb1856a63cabbe2790e..9d659af969296ac30a8323b098d779b5688737fb 100644 (file)
@@ -147,13 +147,11 @@ tests = ['zfs_receive_001_pos', 'zfs_receive_002_pos', 'zfs_receive_003_pos',
     'zfs_receive_013_pos']
 
 # DISABLED:
-# zfs_rename_002_pos - needs investigation
-# zfs_rename_005_neg - nested pools
 # zfs_rename_006_pos - needs investigation
-# zfs_rename_007_pos - needs investigation
 [tests/functional/cli_root/zfs_rename]
-tests = ['zfs_rename_001_pos', 'zfs_rename_003_pos',
-    'zfs_rename_004_neg', 'zfs_rename_008_pos', 'zfs_rename_009_neg',
+tests = ['zfs_rename_001_pos', 'zfs_rename_002_pos', 'zfs_rename_003_pos',
+    'zfs_rename_004_neg', 'zfs_rename_005_neg',
+    'zfs_rename_007_pos', 'zfs_rename_008_pos', 'zfs_rename_009_neg',
     'zfs_rename_010_neg', 'zfs_rename_011_pos', 'zfs_rename_012_neg',
     'zfs_rename_013_pos']
 
index e363607eb822dbdfa62ffe5c5136ff24b41f7e92..d2a6a2225a15d21ad81876c0c38cca535a4240d1 100644 (file)
@@ -71,6 +71,7 @@ function rename_dataset # src dest
        typeset dest=$2
 
        log_must $ZFS rename $src $dest
+       block_device_wait
 
        #
        # Verify src name no longer in use
index 425422fc63cef477d2f7be5e1815facd0a263d7d..5985eac4e4cc4a65a331b62d3e7e70b1009bfeca 100755 (executable)
@@ -117,6 +117,7 @@ log_must $DIFF $SRC_FILE $obj
 if is_global_zone; then
        vol=$TESTPOOL/$TESTFS/vol.$$ ;  volclone=$TESTPOOL/$TESTFS/volclone.$$
        log_must $ZFS create -V 100M $vol
+       block_device_wait
 
        obj=$(target_obj $vol)
        log_must $DD if=$SRC_FILE of=$obj bs=$BS count=$CNT
@@ -124,10 +125,12 @@ if is_global_zone; then
        snap=${vol}@snap.$$
        log_must $ZFS snapshot $snap
        log_must $ZFS clone $snap $volclone
+       block_device_wait
 
        # Rename dataset & clone
        log_must $ZFS rename $vol ${vol}-new
        log_must $ZFS rename $volclone ${volclone}-new
+       block_device_wait
 
        # Compare source file and target file
        obj=$(target_obj ${vol}-new)
@@ -141,6 +144,7 @@ if is_global_zone; then
        log_must $ZFS rename ${vol}-new $vol
        log_must $ZFS rename $snap ${snap}-new
        log_must $ZFS clone ${snap}-new $volclone
+       block_device_wait
 
        # Compare source file and target file
        obj=$(target_obj $volclone)