diff mbox series

[blktests,v2,08/16] check: Introduce group_exit() function

Message ID 20190110093725.32675-9-shinichiro.kawasaki@wdc.com (mailing list archive)
State New, archived
Headers show
Series Implement zoned block device support | expand

Commit Message

Shin'ichiro Kawasaki Jan. 10, 2019, 9:37 a.m. UTC
This optional function can be defined by a test group rc script. When
defined, it is executed after all tests of the group complete, allowing
cleaning up resources used by all tests of the group.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 check | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/check b/check
index 141ebb6..360f61b 100755
--- a/check
+++ b/check
@@ -467,6 +467,11 @@  _run_group() {
 			ret=1
 		fi
 	done
+
+	if declare -fF group_exit >/dev/null ; then
+		group_exit
+	fi
+
 	return $ret
 }