Add skip_test helper function.

Skip connect-tcp6 test which fails under Koji.
This commit is contained in:
Richard W.M. Jones 2021-04-10 11:04:39 +01:00
parent 566819509e
commit 9fb600fb49

View File

@ -208,31 +208,36 @@ rm $RPM_BUILD_ROOT%{_mandir}/man3/libnbd-golang.3*
%check %check
function skip_test ()
{
for f in "$@"; do
rm -f "$f"
echo 'exit 77' > "$f"
chmod +x "$f"
done
}
# interop/structured-read.sh fails with the old qemu-nbd in Fedora 29, # interop/structured-read.sh fails with the old qemu-nbd in Fedora 29,
# so disable it there. # so disable it there.
%if 0%{?fedora} <= 29 %if 0%{?fedora} <= 29
rm interop/structured-read.sh skip_test interop/structured-read.sh
touch interop/structured-read.sh
chmod +x interop/structured-read.sh
%endif %endif
# interop/interop-qemu-storage-daemon.sh fails in RHEL 9 because of # interop/interop-qemu-storage-daemon.sh fails in RHEL 9 because of
# this bug in qemu: # this bug in qemu:
# https://lists.nongnu.org/archive/html/qemu-devel/2021-03/threads.html#03544 # https://lists.nongnu.org/archive/html/qemu-devel/2021-03/threads.html#03544
%if 0%{?rhel} %if 0%{?rhel}
rm interop/interop-qemu-storage-daemon.sh skip_test interop/interop-qemu-storage-daemon.sh
touch interop/interop-qemu-storage-daemon.sh
chmod +x interop/interop-qemu-storage-daemon.sh
%endif %endif
# All fuse tests fail in Koji with: # All fuse tests fail in Koji with:
# fusermount: entry for fuse/test-*.d not found in /etc/mtab # fusermount: entry for fuse/test-*.d not found in /etc/mtab
# for unknown reasons but probably related to the Koji environment. # for unknown reasons but probably related to the Koji environment.
for f in fuse/test-*.sh; do skip_test fuse/test-*.sh
rm $f
touch $f # IPv6 loopback connections fail in Koji.
chmod +x $f make -C tests connect-tcp6
done skip_test tests/connect-tcp6
make %{?_smp_mflags} check || { make %{?_smp_mflags} check || {
for f in $(find -name test-suite.log); do for f in $(find -name test-suite.log); do
@ -314,6 +319,8 @@ make %{?_smp_mflags} check || {
* Sat Apr 10 2021 Richard W.M. Jones <rjones@redhat.com> - 1.7.7-1 * Sat Apr 10 2021 Richard W.M. Jones <rjones@redhat.com> - 1.7.7-1
- New upstream development version 1.7.7. - New upstream development version 1.7.7.
- +BR iproute - +BR iproute
- Add skip_test helper function.
- Skip connect-tcp6 test which fails under Koji.
* Thu Apr 08 2021 Richard W.M. Jones <rjones@redhat.com> - 1.7.6-1 * Thu Apr 08 2021 Richard W.M. Jones <rjones@redhat.com> - 1.7.6-1
- New upstream development version 1.7.6. - New upstream development version 1.7.6.