mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	ZTS: Restore some delays in online_offline tests
After more CI runs and code reading after #17259 I've found that
online starts resilver via async mechanism, which does not provide
wait primitives at this time.  Restore some delays to restore CI
until this is properly fixed.
Signed-off-by:	Alexander Motin <mav@FreeBSD.org>
Sponsored by:	iXsystems, Inc.
(cherry picked from commit f85c96edf7)
			
			
This commit is contained in:
		
							parent
							
								
									101edf7ed9
								
							
						
					
					
						commit
						52749ebb49
					
				| @ -59,6 +59,7 @@ function cleanup | ||||
| 		log_must zpool online $TESTPOOL $disk | ||||
| 		log_must check_state $TESTPOOL $disk "online" | ||||
| 	done | ||||
| 	sleep 1 # Delay for resilver to start | ||||
| 	log_must zpool wait -t resilver $TESTPOOL | ||||
| 
 | ||||
| 	[[ -e $TESTDIR ]] && log_must rm -rf $TESTDIR/* | ||||
| @ -77,7 +78,7 @@ for disk in $DISKLIST; do | ||||
| 
 | ||||
| 	log_must zpool online $TESTPOOL $disk | ||||
| 	log_must check_state $TESTPOOL $disk "online" | ||||
| 
 | ||||
| 	sleep 1 # Delay for resilver to start | ||||
| 	log_must zpool wait -t resilver $TESTPOOL | ||||
| done | ||||
| 
 | ||||
|  | ||||
| @ -60,6 +60,7 @@ function cleanup | ||||
| 		log_must zpool online $TESTPOOL $disk | ||||
| 		log_must check_state $TESTPOOL $disk "online" | ||||
| 	done | ||||
| 	sleep 1 # Delay for resilver to start | ||||
| 	log_must zpool wait -t resilver $TESTPOOL | ||||
| 
 | ||||
| 	[[ -e $TESTDIR ]] && log_must rm -rf $TESTDIR/* | ||||
| @ -89,6 +90,7 @@ while [[ $i -lt ${#disks[*]} ]]; do | ||||
| 		log_must zpool online $TESTPOOL ${disks[$i]} | ||||
| 		check_state $TESTPOOL ${disks[$i]} "online" || \ | ||||
| 		    log_fail "Failed to set ${disks[$i]} online" | ||||
| 		sleep 1 # Delay for resilver to start | ||||
| 		log_must zpool wait -t resilver $TESTPOOL | ||||
| 		log_must zpool clear $TESTPOOL | ||||
| 		while [[ $j -lt ${#disks[*]} ]]; do | ||||
| @ -121,6 +123,7 @@ while [[ $i -lt ${#disks[*]} ]]; do | ||||
| 		log_must zpool online $TESTPOOL ${disks[$i]} | ||||
| 		check_state $TESTPOOL ${disks[$i]} "online" || \ | ||||
| 		    log_fail "Failed to set ${disks[$i]} online" | ||||
| 		sleep 1 # Delay for resilver to start | ||||
| 		log_must zpool wait -t resilver $TESTPOOL | ||||
| 		log_must zpool clear $TESTPOOL | ||||
| 	fi | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Alexander Motin
						Alexander Motin