Skip tests/test-memory-allocator-malloc-mlock.sh on RHEL 9 / aarch64

Test failure:

FAIL: test-memory-allocator-malloc-mlock.sh
===========================================
/builddir/build/BUILD/nbdkit-1.25.8/server/nbdkit -v -P memory-allocator-malloc-mlock.pid -U /tmp/nbdkit-test-sock.QSUxq3 -- /builddir/build/BUILD/nbdkit-1.25.8/plugins/memory/.libs/nbdkit-memory-plugin.so 2048 allocator=malloc,mlock=true
nbdkit: debug: nbdkit 1.25.8 (nbdkit-1.25.8-2.el9)
nbdkit: debug: TLS disabled: could not load TLS certificates
nbdkit: debug: registering plugin /builddir/build/BUILD/nbdkit-1.25.8/plugins/memory/.libs/nbdkit-memory-plugin.so
nbdkit: debug: registered plugin /builddir/build/BUILD/nbdkit-1.25.8/plugins/memory/.libs/nbdkit-memory-plugin.so (name memory)
nbdkit: debug: memory: load
nbdkit: debug: memory: config key=size, value=2048
nbdkit: debug: memory: config key=allocator, value=malloc,mlock=true
nbdkit: debug: memory: config_complete
nbdkit: debug: using thread model: parallel
nbdkit: debug: memory: get_ready
nbdkit: debug: allocator: malloc,mlock=true
nbdkit: debug: allocator parameter: mlock=true
nbdkit: error: allocator=malloc: mlock: Cannot allocate memory
./test-memory-allocator-malloc-mlock.sh: run cleanup hooks: exit code 1
FAIL test-memory-allocator-malloc-mlock.sh (exit status: 1)
This commit is contained in:
Richard W.M. Jones 2021-06-02 13:09:47 +01:00
parent f628c07019
commit c05c44cc7b

View File

@ -817,22 +817,40 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/man1/nbdkit-S3-plugin.1*
%check
%ifnarch %{broken_test_arches}
function skip_test ()
{
for f in "$@"; do
rm -f "$f"
echo 'exit 77' > "$f"
chmod +x "$f"
done
}
# Workaround for broken libvirt (RHBZ#1138604).
mkdir -p $HOME/.cache/libvirt
# tests/test-captive.sh is racy especially on s390x. We need to
# rethink this test upstream.
truncate -s 0 tests/test-captive.sh
skip_test tests/test-captive.sh
%ifarch s390x
# Temporarily kill tests/test-cache-max-size.sh since it fails
# sometimes on s390x for unclear reasons.
truncate -s 0 tests/test-cache-max-size.sh
skip_test tests/test-cache-max-size.sh
%endif
# Temporarily kill test-nbd-tls.sh and test-nbd-tls-psk.sh
# https://www.redhat.com/archives/libguestfs/2020-March/msg00191.html
truncate -s 0 tests/test-nbd-tls.sh tests/test-nbd-tls-psk.sh
skip_test tests/test-nbd-tls.sh tests/test-nbd-tls-psk.sh
# This test fails on RHEL 9 & aarch64 with the error:
# nbdkit: error: allocator=malloc: mlock: Cannot allocate memory
# It could be the mlock limit on the builder is too low.
%if 0%{?rhel}
%ifarch aarch64
skip_test tests/test-memory-allocator-malloc-mlock.sh
%endif
%endif
# Make sure we can see the debug messages (RHBZ#1230160).
export LIBGUESTFS_DEBUG=1