提交 db272ebf 编写于 作者: M Martin Kletzander

tests: cleanup object-locking test

When ran, cil is throwing out some errors and warnings for obsolete
'or' unused variables and wrong module name (it should not contain a
hyphen; hence the rename).
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
上级 ef8f4761
...@@ -149,9 +149,9 @@ ...@@ -149,9 +149,9 @@
/tests/*test /tests/*test
!/tests/*schematest !/tests/*schematest
!/tests/virt-aa-helper-test !/tests/virt-aa-helper-test
/tests/object-locking /tests/objectlocking
/tests/object-locking-files.txt /tests/objectlocking-files.txt
/tests/object-locking.cm[ix] /tests/objectlocking.cm[ix]
/tests/reconnect /tests/reconnect
/tests/ssh /tests/ssh
/tests/test_conf /tests/test_conf
......
...@@ -228,7 +228,7 @@ test_programs += vmwarevertest ...@@ -228,7 +228,7 @@ test_programs += vmwarevertest
endif WITH_VMWARE endif WITH_VMWARE
if WITH_CIL if WITH_CIL
test_programs += object-locking test_programs += objectlocking
endif WITH_CIL endif WITH_CIL
if WITH_YAJL if WITH_YAJL
...@@ -1016,21 +1016,21 @@ CILOPTINCS = ...@@ -1016,21 +1016,21 @@ CILOPTINCS =
CILOPTPACKAGES = -package unix,str,cil CILOPTPACKAGES = -package unix,str,cil
CILOPTLIBS = -linkpkg CILOPTLIBS = -linkpkg
object_locking_SOURCES = object-locking.ml object_locking_SOURCES = objectlocking.ml
%.cmx: %.ml %.cmx: %.ml
ocamlfind ocamlopt $(CILOPTFLAGS) $(CILOPTINCS) $(CILOPTPACKAGES) -c $< ocamlfind ocamlopt $(CILOPTFLAGS) $(CILOPTINCS) $(CILOPTPACKAGES) -c $<
object-locking: object-locking.cmx object-locking-files.txt objectlocking: objectlocking.cmx objectlocking-files.txt
ocamlfind ocamlopt $(CILOPTFLAGS) $(CILOPTINCS) $(CILOPTPACKAGES) \ ocamlfind ocamlopt $(CILOPTFLAGS) $(CILOPTINCS) $(CILOPTPACKAGES) \
$(CILOPTLIBS) $< -o $@ $(CILOPTLIBS) $< -o $@
object-locking-files.txt: objectlocking-files.txt:
find $(top_builddir)/src/ -name '*.i' > $@ find $(top_builddir)/src/ -name '*.i' > $@
else ! WITH_CIL else ! WITH_CIL
EXTRA_DIST += object-locking.ml EXTRA_DIST += objectlocking.ml
endif ! WITH_CIL endif ! WITH_CIL
CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.cmi *.cmx \ CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.cmi *.cmx \
object-locking-files.txt objectlocking-files.txt
(* (*
* Analyse libvirt driver API methods for mutex locking mistakes * Analyse libvirt driver API methods for mutex locking mistakes
* *
* Copyright (C) 2008-2010, 2012 Red Hat, Inc. * Copyright (C) 2008-2010, 2012, 2014 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -623,7 +623,7 @@ module L = DF.ForwardsDataFlow(Locking) ...@@ -623,7 +623,7 @@ module L = DF.ForwardsDataFlow(Locking)
let () = let () =
(* Read the list of files from "libvirt-files". *) (* Read the list of files from "libvirt-files". *)
let files = input_file "object-locking-files.txt" in let files = input_file "objectlocking-files.txt" in
(* Load & parse each input file. *) (* Load & parse each input file. *)
let files = let files =
...@@ -645,7 +645,6 @@ let () = ...@@ -645,7 +645,6 @@ let () =
let driverVars = List.filter ( let driverVars = List.filter (
function function
| GVar (varinfo, initinfo, loc) -> (* global variable *) | GVar (varinfo, initinfo, loc) -> (* global variable *)
let name = varinfo.vname in
if isDriverTable varinfo then if isDriverTable varinfo then
true true
else else
...@@ -656,7 +655,6 @@ let () = ...@@ -656,7 +655,6 @@ let () =
let driverVarFuncs = List.map ( let driverVarFuncs = List.map (
function function
| GVar (varinfo, initinfo, loc) -> (* global variable *) | GVar (varinfo, initinfo, loc) -> (* global variable *)
let name = varinfo.vname in
if isDriverTable varinfo then if isDriverTable varinfo then
getDriverFuncNames initinfo getDriverFuncNames initinfo
else else
...@@ -752,7 +750,7 @@ let () = ...@@ -752,7 +750,7 @@ let () =
IH.find Locking.stmtStartData st.sid in IH.find Locking.stmtStartData st.sid in
let leakDrivers = not (VS.is_empty ld) in let leakDrivers = not (VS.is_empty ld) in
let leakObjects = not (VS.is_empty lo) in let leakObjects = not (VS.is_empty lo) in
leakDrivers or leakObjects leakDrivers || leakObjects
) exitPoints in ) exitPoints in
let mistakes = List.filter ( let mistakes = List.filter (
...@@ -767,7 +765,7 @@ let () = ...@@ -767,7 +765,7 @@ let () =
let deadLocked = (List.length dead) > 0 in let deadLocked = (List.length dead) > 0 in
lockDriverOrdering or lockObjectOrdering or useDriverUnlocked or useObjectUnlocked or deadLocked lockDriverOrdering || lockObjectOrdering || useDriverUnlocked || useObjectUnlocked || deadLocked
) fundec.sallstmts in ) fundec.sallstmts in
if (List.length leaks) > 0 || (List.length mistakes) > 0 then ( if (List.length leaks) > 0 || (List.length mistakes) > 0 then (
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册