diff mbox series

[blktests,07/14] check: Introduce group_exit() function

Message ID 20190109013542.23686-8-damien.lemoal@wdc.com (mailing list archive)
State New, archived
Headers show
Series Implement zoned block device support | expand

Commit Message

Damien Le Moal Jan. 9, 2019, 1:35 a.m. UTC
From: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>

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
 }