Add gating tests

This commit is contained in:
Andrew Price 2020-09-03 09:19:32 +01:00
parent 9791e7be60
commit 01606e25fc
7 changed files with 5541 additions and 1 deletions

15
gating.yaml Normal file
View File

@ -0,0 +1,15 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_testing
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}

View File

@ -1,6 +1,6 @@
Name: gfs2-utils
Version: 3.3.0
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2+ and LGPLv2+
Summary: Utilities for managing the global file system (GFS2)
%ifnarch %{arm}
@ -62,6 +62,9 @@ modifying, and correcting inconsistencies in GFS2 file systems.
%{_prefix}/lib/udev/rules.d/82-gfs2-withdraw.rules
%changelog
* Thu Sep 03 2020 Andrew Price <anprice@redhat.com> - 3.3.0-2
- Version bump to enable gating tests
* Tue Sep 01 2020 Andrew Price <anprice@redhat.com> - 3.3.0-1
- New upstream version
- Add dependency on bzip2

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:
- upstream_test_suite:
dir: .
run: ./testsuite

5464
tests/testsuite Executable file

File diff suppressed because it is too large Load Diff