This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch andyp-testsuite
in repository gfs2-utils.
commit eab8bbe8829e195dbbed6ad65bf4cd064759eed0
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Fri Feb 25 12:55:39 2022 +0000
tests: Regenerate testvol where needed
Some tests depend on previous tests creating the testvol file so they
cannot be run individually. Recreate it for each test that requires it.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
tests/mkfs.at | 6 ++++++
tests/testsuite.at | 2 +-
tests/tune.at | 2 ++
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/tests/mkfs.at b/tests/mkfs.at
index 6d6d3bd1..09a3ed29 100644
--- a/tests/mkfs.at
+++ b/tests/mkfs.at
@@ -27,12 +27,14 @@ AT_CLEANUP
AT_SETUP([Quota change file size validation])
AT_KEYWORDS(mkfs.gfs2 mkfs)
+GFS_TGT_REGEN
AT_CHECK([$GFS_MKFS -p lock_nolock -c 0 $GFS_TGT], 255, [ignore], [ignore])
AT_CHECK([$GFS_MKFS -p lock_nolock -c 65 $GFS_TGT], 255, [ignore], [ignore])
AT_CLEANUP
AT_SETUP([Format version validation])
AT_KEYWORDS(mkfs.gfs2 mkfs)
+GFS_TGT_REGEN
AT_CHECK([$GFS_MKFS -p lock_nolock -o format=-1 $GFS_TGT], 255, [ignore], [ignore])
AT_CHECK([$GFS_MKFS -p lock_nolock -o format=0 $GFS_TGT], 255, [ignore], [ignore])
AT_CHECK([$GFS_MKFS -p lock_nolock -o format=1800 $GFS_TGT], 255, [ignore], [ignore])
@@ -123,6 +125,7 @@ AT_CLEANUP
AT_SETUP([Device i/o limits handling])
AT_KEYWORDS(mkfs.gfs2 mkfs)
+GFS_TGT_REGEN
AT_CHECK([$GFS_MKFS -p lock_nolock -o test_topology=0:0:0:0:0 $GFS_TGT], 0, [ignore], [ignore])
AT_CHECK([$GFS_MKFS -p lock_nolock -o test_topology=0:512:512:512:512 $GFS_TGT], 0, [ignore], [ignore])
AT_CHECK([gfs2_edit -p sb field sb_bsize $GFS_TGT | tr -d '\n' ], 0, [4096], [ignore])
@@ -134,6 +137,7 @@ AT_CLEANUP
AT_SETUP([Resource group alignment])
AT_KEYWORDS(mkfs.gfs2 mkfs)
+GFS_TGT_REGEN
AT_CHECK([$GFS_MKFS -p lock_nolock -o test_topology=0:512:65536:393216:512 $GFS_TGT], 0, [ignore], [ignore])
# Check rgrp alignment to minimum_io_size: 65536 / 4096 == 16
AT_CHECK([gfs2_edit -p rindex $GFS_TGT | grep ri_addr | awk '{print $2, $2 % 16; if ($2 % 16 != 0) { exit 1 }}'], 0, [ignore], [ignore])
@@ -143,6 +147,7 @@ AT_CLEANUP
AT_SETUP([Values of rg_skip])
AT_KEYWORDS(mkfs.gfs2 mkfs)
+GFS_TGT_REGEN
AT_CHECK([$GFS_MKFS -p lock_nolock -r 2048 $GFS_TGT], 0, [ignore], [ignore])
AT_CHECK(GFS_RUN_OR_SKIP([rgskipcheck.sh $GFS_TGT]), 0, [ignore], [ignore])
AT_CHECK([$GFS_MKFS -p lock_nolock -r 1024 $GFS_TGT], 0, [ignore], [ignore])
@@ -159,6 +164,7 @@ AT_CLEANUP
AT_SETUP([Values of rg_data0, rg_data, rg_bitbytes])
AT_KEYWORDS(mkfs.gfs2 mkfs)
+GFS_TGT_REGEN
AT_CHECK([$GFS_MKFS -p lock_nolock -r 2048 $GFS_TGT], 0, [ignore], [ignore])
AT_CHECK(GFS_RUN_OR_SKIP([rgrifieldscheck.sh $GFS_TGT]), 0, [ignore], [ignore])
AT_CHECK([$GFS_MKFS -p lock_nolock -r 1024 $GFS_TGT], 0, [ignore], [ignore])
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 1c1dc9e5..6a625e5d 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -7,7 +7,7 @@ m4_define([GFS_TGT_REGEN],
AT_SKIP_IF([test ! -f ${GFS_TGT}])])
# Regenerate the sparse file used for testing, with a given size, and skip the test if it fails
-# Usage: GFS_TGT_REGEN(<size>)
+# Usage: GFS_TGT_SIZE(<size>)
m4_define([GFS_TGT_SIZE],
[AT_CHECK([rm -f $GFS_TGT && truncate -s $1 ${GFS_TGT}], [ignore], [ignore], [ignore])
AT_SKIP_IF([test ! -f ${GFS_TGT}])])
diff --git a/tests/tune.at b/tests/tune.at
index 4f0ecd79..e477b61e 100644
--- a/tests/tune.at
+++ b/tests/tune.at
@@ -3,6 +3,7 @@ AT_BANNER([tunegfs2 tests])
AT_SETUP([Format version])
AT_KEYWORDS(tunegfs2 tune)
+GFS_TGT_REGEN
AT_CHECK([$GFS_MKFS -p lock_nolock -o format=1802 $GFS_TGT], 0, [ignore], [ignore])
# Exit code 65 == EX_DATAERR (sysexits.h)
AT_CHECK([tunegfs2 -r 0 $GFS_TGT], 65, [ignore], [ignore])
@@ -26,6 +27,7 @@ AT_CLEANUP
AT_SETUP([Expected output])
AT_KEYWORDS(tunegfs2 tune)
+GFS_TGT_REGEN
AT_CHECK([echo -n "File system volume name: cluster:fsname
File system UUID: e90815fc-087b-460c-b8a5-8edc8a2ed691
File system magic number: 0x1161970
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.