mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	ZTS: Speed up write_dirs cleanup
The write_dirs tests fill a filesystem with a bunch of files until it is full. In cleanup the files are truncated and removed individually. These tests already take a while to run. It is quicker and easier to destroy the whole dataset and create a new one to replace it in the cleanup functions. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #10098
This commit is contained in:
		
							parent
							
								
									fa23c5be88
								
							
						
					
					
						commit
						5a1abc4b5b
					
				| @ -47,11 +47,8 @@ verify_runnable "both" | |||||||
| 
 | 
 | ||||||
| function cleanup | function cleanup | ||||||
| { | { | ||||||
| 	for file in `find $TESTDIR -type f`; do | 	destroy_dataset $TESTPOOL/$TESTFS | ||||||
| 		cat /dev/null > $file | 	zfs create -o mountpoint=$TESTDIR $TESTPOOL/$TESTFS | ||||||
| 	done |  | ||||||
| 	log_must sync |  | ||||||
| 	log_must rm -rf $TESTDIR/* |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| typeset -i retval=0 | typeset -i retval=0 | ||||||
|  | |||||||
| @ -47,11 +47,8 @@ verify_runnable "both" | |||||||
| 
 | 
 | ||||||
| function cleanup | function cleanup | ||||||
| { | { | ||||||
| 	for file in `find $TESTDIR -type f`; do | 	destroy_dataset $TESTPOOL/$TESTFS | ||||||
| 		cat /dev/null > $file | 	zfs create -o mountpoint=$TESTDIR $TESTPOOL/$TESTFS | ||||||
| 	done |  | ||||||
| 	log_must sync |  | ||||||
| 	log_must rm -rf $TESTDIR/* |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| typeset -i retval=0 | typeset -i retval=0 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Brian Behlendorf
						Brian Behlendorf