Gitweb:
http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=fadb42f8...
Commit: fadb42f8f3c97b5a4106682abef660c2ea2e0b73
Parent: 0352f73791b80745c17f651f55faf7ce3a28d435
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Wed Jan 14 15:21:06 2015 +0000
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Fri Jan 16 12:04:26 2015 +0000
gfs2-utils tests: Document usage of convenience macros
Lower the barrier to writing tests by adding some docs to clarify the m4
convenience macros in testsuite.at.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
tests/testsuite.at | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/tests/testsuite.at b/tests/testsuite.at
index aa86966..0422b02 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -1,15 +1,18 @@
# Regenerate the sparse file used for testing and skip the test if it fails
+# Usage: GFS_TGT_REGEN
m4_define([GFS_TGT_REGEN],
[AT_CHECK([rm -f $GFS_TGT && truncate -s ${GFS_TGT_SZ}G ${GFS_TGT}], [ignore],
[ignore], [ignore])
AT_SKIP_IF([test ! -f ${GFS_TGT}])])
# Regenerate, check, fsck is used a lot so combine it into one macro
+# Usage: GFS_FSCK_CHECK ([mkfs.gfs2 ... $GFS_TGT])
m4_define([GFS_FSCK_CHECK],
[GFS_TGT_REGEN
AT_CHECK($1, 0, [ignore], [ignore])
AT_CHECK([fsck.gfs2 -n $GFS_TGT], 0, [ignore], [ignore])])
# Regenerate, mkfs, modify fs with gfs2l, fsck
+# Usage: GFS_TGT_REGEN ([<mkfs.gfs2 command>], [<gfs2l script>])
m4_define([GFS_LANG_CHECK],
[GFS_TGT_REGEN
AT_CHECK($1, 0, [ignore], [ignore])