mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	Print fail messages before callbacks in test suite
Reorder operations in _endlog so failure messages get printed prior to performing callbacks and cleanup. This helps clarify why a test failed and places the message closer to the point of incident in the resulting logs. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: George Melikov <mail@gmelikov.ru> Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov> Closes #6281
This commit is contained in:
		
							parent
							
								
									aa6e82a6a5
								
							
						
					
					
						commit
						b81a1c61ec
					
				| @ -418,7 +418,11 @@ function _endlog | |||||||
| 	typeset logfile="/tmp/log.$$" | 	typeset logfile="/tmp/log.$$" | ||||||
| 	_recursive_output $logfile | 	_recursive_output $logfile | ||||||
| 
 | 
 | ||||||
| 	if [[ $1 == $STF_FAIL ]] ; then | 	typeset exitcode=$1 | ||||||
|  | 	shift | ||||||
|  | 	(( ${#@} > 0 )) && _printline "$@" | ||||||
|  | 
 | ||||||
|  | 	if [[ $exitcode == $STF_FAIL ]] ; then | ||||||
| 		_execute_testfail_callbacks | 		_execute_testfail_callbacks | ||||||
| 	fi | 	fi | ||||||
| 
 | 
 | ||||||
| @ -428,9 +432,7 @@ function _endlog | |||||||
| 		log_note "Performing local cleanup via log_onexit ($cleanup)" | 		log_note "Performing local cleanup via log_onexit ($cleanup)" | ||||||
| 		$cleanup | 		$cleanup | ||||||
| 	fi | 	fi | ||||||
| 	typeset exitcode=$1 | 
 | ||||||
| 	shift |  | ||||||
| 	(( ${#@} > 0 )) && _printline "$@" |  | ||||||
| 	exit $exitcode | 	exit $exitcode | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Giuseppe Di Natale
						Giuseppe Di Natale