* Tue Mar 28 2023 Andrew Price <anprice@redhat.com> - 3.2.0-13

- Re-add tests that were dropped in the c8s migration
  Resolves: rhbz#2180782
This commit is contained in:
Andrew Price 2023-03-28 17:53:13 +01:00
parent 988d6182ba
commit 6425218214
6 changed files with 5347 additions and 1 deletions

View File

@ -12,7 +12,7 @@
Name: gfs2-utils
Version: 3.2.0
Release: 12%{?dist}
Release: 13%{?dist}
License: GPLv2+ and LGPLv2+
Group: System Environment/Kernel
Summary: Utilities for managing the global file system (GFS2)
@ -103,6 +103,10 @@ modifying, and correcting inconsistencies in GFS2 file systems.
%{_prefix}/lib/udev/rules.d/82-gfs2-withdraw.rules
%changelog
* Tue Mar 28 2023 Andrew Price <anprice@redhat.com> - 3.2.0-13
- Re-add tests that were dropped in the c8s migration
Resolves: rhbz#2180782
* Tue Mar 28 2023 Andrew Price <anprice@redhat.com> - 3.2.0-12
- mkfs.gfs2: Add -U UUID option
Resolves: rhbz#2180782

8
tests/atlocal Normal file
View File

@ -0,0 +1,8 @@
GFS_TGT="../../testvol"
GFS_TGT_SZ=10
GFS_MKFS="mkfs.gfs2 -O -D"
gfs_max_blocks()
{
printf $((GFS_TGT_SZ*1073741824/$1))
}

20
tests/rgrifieldscheck.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/sh
dev=$1
i=0
gfs2_edit -p rg 0 $dev | grep rg_data0 > /dev/null 2>&1
# New fields not present in /usr/include/linux/gfs2_ondisk.h
test $? = 0 || exit 0
gfs2_edit -p rindex $dev | while read field rival unused
do
test $field = ri_data0 -o $field = ri_data -o $field = ri_bitbytes || continue
rgfield=$(echo $field | sed 's/ri/rg/')
rgval=$(gfs2_edit -p rg $i $dev | grep " $rgfield " | awk '{print $2}')
if test "$rival" != "$rgval"
then
echo "Bad $rgfield in rg $i: $rgval (expected: $rival)" >&2
exit 1
fi
test $field = ri_bitbytes && i=$((i+1))
done

19
tests/rgskipcheck.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh
dev=$1
rgcount=$(gfs2_edit -p rgcount $dev | cut -f1 -d' ')
prevaddr=$(gfs2_edit -p rg 0 $dev | grep ^RG | awk '{print $5}')
prevskip=0
for i in `seq 0 $(($rgcount - 1))`; do
addr=$(gfs2_edit -p rg $i $dev | grep ^RG | awk '{print $5}')
expected=$(($addr - $prevaddr))
if test $prevskip != $expected; then
echo "Bad rg_skip in rg $(($i - 1)): $prevskip (expected: $expected)" >&2
exit 1
fi
prevskip=$(gfs2_edit -p rg $i $dev | grep rg_skip | awk '{print $2}')
prevaddr=$addr
done

11
tests/tests.yml Normal file
View File

@ -0,0 +1,11 @@
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
environment:
PATH: ".:{{ ansible_env.PATH }}"
tests:
- simple:
dir: .
run: ./testsuite

5284
tests/testsuite Executable file

File diff suppressed because it is too large Load Diff