On 9/12/19 1:31 PM, Daniel P. Berrangé wrote:
The OOM handling requires special build time options which we never
enable in our CI. Even once enabled the tests are incredibly slow and
typically require manual inspection of the results to weed out false
positives.
Since there was previous agreement to switch to abort on OOM in libvirt
code, there's no point continuing to keep the unused OOM testing code.
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
configure.ac | 17 ---
docs/docs.html.in | 3 -
docs/internals/oomtesting.html.in | 213 ------------------------------
src/libvirt_private.syms | 4 -
src/util/viralloc.c | 111 ----------------
src/util/viralloc.h | 5 -
tests/Makefile.am | 1 -
tests/oomtrace.pl | 41 ------
tests/qemuxml2argvtest.c | 12 +-
tests/testutils.c | 189 +-------------------------
tests/testutils.h | 2 -
tests/virfirewalltest.c | 12 --
12 files changed, 6 insertions(+), 604 deletions(-)
delete mode 100644 docs/internals/oomtesting.html.in
delete mode 100755 tests/oomtrace.pl
diff --git a/configure.ac b/configure.ac
index bf9e7681bc..8cb7de9c19 100644
--- a/configure.ac
+++ b/configure.ac
@@ -764,22 +764,6 @@ if test "$enable_test_coverage" = yes; then
WARN_CFLAGS=$save_WARN_CFLAGS
fi
-LIBVIRT_ARG_ENABLE([TEST_OOM], [memory allocation failure checking], [no])
-case "$enable_test_oom" in
- yes|no) ;;
- *) AC_MSG_ERROR([bad value ${enable_test_oom} for test-oom option]) ;;
-esac
-
-if test "$enable_test_oom" = yes; then
- have_trace=yes
- AC_CHECK_HEADER([execinfo.h],[],[have_trace=no])
- AC_CHECK_FUNC([backtrace],[],[have_trace=no])
- if test "$have_trace" = "yes"; then
- AC_DEFINE([TEST_OOM_TRACE], 1, [Whether backtrace() is available])
- fi
- AC_DEFINE([TEST_OOM], 1, [Whether malloc OOM checking is enabled])
-fi
-
LIBVIRT_ARG_ENABLE([TEST_LOCKING], [thread locking tests using CIL], [no])
case "$enable_test_locking" in
yes|no) ;;
@@ -1048,7 +1032,6 @@ AC_MSG_NOTICE([])
AC_MSG_NOTICE([Test suite])
AC_MSG_NOTICE([])
AC_MSG_NOTICE([ Coverage: $enable_test_coverage])
-AC_MSG_NOTICE([ Alloc OOM: $enable_test_oom])
I've just created a merge conflict here, sorry. But it's trivial to resolve.
Reviewed-by: Michal Privoznik <mprivozn(a)redhat.com>
Michal