提交 6962a2dd 编写于 作者: D Daniel P. Berrange

Added an optional OCaml+CIL test program for mutex lock validation

上级 3ce55d22
......@@ -235,9 +235,11 @@ src/*.exe
src/*.gcda
src/*.gcno
src/*.gcov
src/*.i
src/*.la
src/*.lo
src/*.loT
src/*.s
src/.deps
src/.libs
src/Makefile
......@@ -264,6 +266,10 @@ tests/conftest
tests/eventtest
tests/nodedevxml2xmltest
tests/nodeinfotest
tests/object-locking
tests/object-locking-files.txt
tests/object-locking.cmi
tests/object-locking.cmx
tests/qemuxml2argvtest
tests/qemuxml2xmltest
tests/qparamtest
......
Tue May 19 11:10:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
Add an optional OCaml+CIL mutex lock checker
* .hgignore, src/.cvsignore, src/.gitignore, tests/.gitignore,
tests/.cvsignore: Ignore binary files from ocaml build. Ignore
.i and .s files from gcc -save-temps
* configure.in: Add --enable-test-locking arg to turn on build
of OCaml/CIL mutex locking test
* src/Makefile.am: Add $(LOCK_CHECKING_CFLAGS) used when lock
checking tests are enabled.
* tests/Makefile.am, tests/object-locking.ml: Add OCaml/CIL
program for validating mutex locking correctness
Mon May 18 16:10:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
* src/qemu_conf.c: Declare support for migration in capabilities
......
......@@ -1132,6 +1132,22 @@ if test "${enable_oom}" = yes; then
AC_DEFINE([TEST_OOM], 1, [Whether malloc OOM checking is enabled])
fi
AC_ARG_ENABLE([test-locking],
[ --enable-test-locking thread locking tests using CIL],
[case "${enableval}" in
yes|no) ;;
*) AC_MSG_ERROR([bad value ${enableval} for test-locking option]) ;;
esac],
[enableval=no])
enable_locking=$enableval
if test "$enable_locking" = "yes"; then
LOCK_CHECKING_CFLAGS="-Dbool=char -D_Bool=char -save-temps"
AC_SUBST([LOCK_CHECKING_CFLAGS])
fi
AM_CONDITIONAL([WITH_CIL],[test "$enable_locking" = "yes"])
dnl Enable building the proxy?
AC_ARG_WITH([xen-proxy],
......
......@@ -16,3 +16,5 @@ libvirt_lxc
virsh-net-edit.c
virsh-pool-edit.c
libvirt.syms
*.i
*.s
......@@ -16,3 +16,5 @@ libvirt_lxc
virsh-net-edit.c
virsh-pool-edit.c
libvirt.syms
*.i
*.s
......@@ -16,7 +16,8 @@ INCLUDES = \
-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
-DLOCAL_STATE_DIR=\""$(localstatedir)"\" \
-DGETTEXT_PACKAGE=\"$(PACKAGE)\" \
$(WARN_CFLAGS)
$(WARN_CFLAGS) \
$(LOCK_CHECKING_CFLAGS)
confdir = $(sysconfdir)/libvirt/
conf_DATA = qemu.conf
......@@ -662,5 +663,5 @@ if WITH_NETWORK
endif
CLEANFILES = *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda
CLEANFILES = *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.i *.s
DISTCLEANFILES = $(BUILT_SOURCES)
......@@ -20,3 +20,7 @@ eventtest
*.gcda
*.gcno
*.exe
object-locking
object-locking.cmi
object-locking.cmx
object-locking-files.txt
......@@ -20,3 +20,7 @@ eventtest
*.gcda
*.gcno
*.exe
object-locking
object-locking.cmi
object-locking.cmx
object-locking-files.txt
......@@ -68,6 +68,10 @@ if WITH_SECDRIVER_SELINUX
noinst_PROGRAMS += seclabeltest
endif
if WITH_CIL
noinst_PROGRAMS += object-locking
endif
noinst_PROGRAMS += nodedevxml2xmltest
test_scripts = \
......@@ -234,4 +238,25 @@ eventtest_SOURCES = \
eventtest_LDADD = -lrt $(LDADDS)
endif
CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda
if WITH_CIL
CILOPTFLAGS =
CILOPTINCS =
CILOPTPACKAGES = -package unix,str,cil
CILOPTLIBS = -linkpkg
object_locking_SOURCES = object-locking.ml
%.cmx: %.ml
ocamlfind ocamlopt $(CILOPTFLAGS) $(CILOPTINCS) $(CILOPTPACKAGES) -c $<
object-locking: object-locking.cmx object-locking-files.txt
ocamlfind ocamlopt $(CILOPTFLAGS) $(CILOPTINCS) $(CILOPTPACKAGES) $(CILOPTLIBS) $< -o $@
object-locking-files.txt:
find $(top_builddir)/src/ -name '*.i' > $@
else
EXTRA_DIST += object-locking.ml
endif
CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda object-locking-files.txt
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册