From ac130609d509a631bc0b255c6d8e38b5b53e2652 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 9 May 2019 10:29:46 +0200 Subject: [PATCH] Enable some more test with memcheck, but with disabled leak-check. There are lots of unfree'd objects on assertion failure, but we want other kinds of memory error to be checked anyway. --- .../msg/host_on_off_processes/host_on_off_processes.tesh | 2 +- teshsuite/simdag/CMakeLists.txt | 4 ++-- teshsuite/simdag/flatifier/bogus_disk_attachment.tesh | 2 +- teshsuite/simdag/flatifier/bogus_missing_gateway.tesh | 4 ++-- teshsuite/simdag/flatifier/bogus_two_hosts_asymetric.tesh | 2 +- teshsuite/simix/CMakeLists.txt | 4 +--- tools/cmake/Tests.cmake | 1 + 7 files changed, 9 insertions(+), 10 deletions(-) diff --git a/teshsuite/msg/host_on_off_processes/host_on_off_processes.tesh b/teshsuite/msg/host_on_off_processes/host_on_off_processes.tesh index 309dbd4a8f..ebb928c467 100644 --- a/teshsuite/msg/host_on_off_processes/host_on_off_processes.tesh +++ b/teshsuite/msg/host_on_off_processes/host_on_off_processes.tesh @@ -13,7 +13,7 @@ $ ${bindir}/host_on_off_processes ${platfdir}/small_platform.xml 1 --log=no_loc > [13.000000] [msg_test/INFO] Simulation time 13 ! expect signal SIGIOT -$ ${bindir}/host_on_off_processes ${platfdir}/small_platform.xml 2 --log=no_loc +$ $VALGRIND_NO_LEAK_CHECK ${bindir}/host_on_off_processes ${platfdir}/small_platform.xml 2 --log=no_loc > [Tremblay:test_launcher:(1) 0.000000] [msg_test/INFO] Test 2: > [Tremblay:test_launcher:(1) 0.000000] [msg_test/INFO] Turn off Jupiter > [0.000000] [simix_process/WARNING] Cannot launch actor 'process_daemon' on failed host 'Jupiter' diff --git a/teshsuite/simdag/CMakeLists.txt b/teshsuite/simdag/CMakeLists.txt index 53fb1687eb..54cc945450 100644 --- a/teshsuite/simdag/CMakeLists.txt +++ b/teshsuite/simdag/CMakeLists.txt @@ -90,8 +90,8 @@ ADD_TEST(tesh-simdag-full-links01 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic- ADD_TEST(tesh-simdag-full-links02 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic-parsing-test/basic-parsing-test ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/two_clusters_one_name.xml FULL_LINK) ADD_TEST(tesh-simdag-one-link-g5k ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic-parsing-test/basic-parsing-test ${CMAKE_HOME_DIRECTORY}/examples/platforms/g5k.xml ONE_LINK) -if(enable_debug AND NOT enable_memcheck) - # these tests need assertions. Exclude them from memcheck, as they normally die, leaving lots of unfree'd objects +if(enable_debug) + # these tests need assertions ADD_TESH(tesh-parser-bogus-symmetric --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/flatifier --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/flatifier ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/flatifier/bogus_two_hosts_asymetric.tesh) ADD_TESH(tesh-parser-bogus-missing-gw --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/flatifier --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/flatifier ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/flatifier/bogus_missing_gateway.tesh) ADD_TESH(tesh-parser-bogus-disk-attachment --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/flatifier --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/flatifier ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/flatifier/bogus_disk_attachment.tesh) diff --git a/teshsuite/simdag/flatifier/bogus_disk_attachment.tesh b/teshsuite/simdag/flatifier/bogus_disk_attachment.tesh index f51b30fce8..ae49cdc6d2 100644 --- a/teshsuite/simdag/flatifier/bogus_disk_attachment.tesh +++ b/teshsuite/simdag/flatifier/bogus_disk_attachment.tesh @@ -1,5 +1,5 @@ ! expect signal SIGABRT -$ ${bindir:=.}/flatifier ../platforms/bogus_disk_attachment.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" +$ $VALGRIND_NO_LEAK_CHECK ${bindir:=.}/flatifier ../platforms/bogus_disk_attachment.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" > [ 0.000000] [0:maestro@] Switching to the L07 model to handle parallel tasks. > [ 0.000000] [0:maestro@] Parse error at ../platforms/bogus_disk_attachment.xml:19: Unable to attach storage cdisk: host plouf does not exist. > [ 0.000000] [0:maestro@] Exiting now diff --git a/teshsuite/simdag/flatifier/bogus_missing_gateway.tesh b/teshsuite/simdag/flatifier/bogus_missing_gateway.tesh index 832004a6aa..20f2519670 100644 --- a/teshsuite/simdag/flatifier/bogus_missing_gateway.tesh +++ b/teshsuite/simdag/flatifier/bogus_missing_gateway.tesh @@ -1,12 +1,12 @@ ! expect signal SIGABRT -$ ${bindir:=.}/flatifier ../platforms/bogus_missing_src_gateway.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" +$ $VALGRIND_NO_LEAK_CHECK ${bindir:=.}/flatifier ../platforms/bogus_missing_src_gateway.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" > [ 0.000000] [0:maestro@] Switching to the L07 model to handle parallel tasks. > [ 0.000000] [0:maestro@] Parse error at ../platforms/bogus_missing_src_gateway.xml:14: zoneRoute gw_src='nod-cluster_router.cluster.us' does name a node. Existing netpoints: > 'node-1.cluster.us','node-2.cluster.us','node-3.cluster.us','node-4.cluster.us','node-cluster_router.cluster.us','noeud-1.grappe.fr','noeud-2.grappe.fr','noeud-3.grappe.fr','noeud-4.grappe.fr','noeud-grappe_router.grappe.fr' > [ 0.000000] [0:maestro@] Exiting now ! expect signal SIGABRT -$ ${bindir:=.}/flatifier ../platforms/bogus_missing_dst_gateway.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" +$ $VALGRIND_NO_LEAK_CHECK ${bindir:=.}/flatifier ../platforms/bogus_missing_dst_gateway.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" > [ 0.000000] [0:maestro@] Switching to the L07 model to handle parallel tasks. > [ 0.000000] [0:maestro@] Parse error at ../platforms/bogus_missing_dst_gateway.xml:14: zoneRoute gw_dst='neud-grappe_router.grappe.fr' does name a node. Existing netpoints: > 'node-1.cluster.us','node-2.cluster.us','node-3.cluster.us','node-4.cluster.us','node-cluster_router.cluster.us','noeud-1.grappe.fr','noeud-2.grappe.fr','noeud-3.grappe.fr','noeud-4.grappe.fr','noeud-grappe_router.grappe.fr' diff --git a/teshsuite/simdag/flatifier/bogus_two_hosts_asymetric.tesh b/teshsuite/simdag/flatifier/bogus_two_hosts_asymetric.tesh index 8a77381fa3..27535d7d74 100644 --- a/teshsuite/simdag/flatifier/bogus_two_hosts_asymetric.tesh +++ b/teshsuite/simdag/flatifier/bogus_two_hosts_asymetric.tesh @@ -1,4 +1,4 @@ ! expect signal SIGABRT -$ ${bindir:=.}/flatifier ../platforms/bogus_two_hosts_asymetric.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --log=no_loc +$ $VALGRIND_NO_LEAK_CHECK ${bindir:=.}/flatifier ../platforms/bogus_two_hosts_asymetric.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --log=no_loc > [ 0.000000] [0:maestro@] Switching to the L07 model to handle parallel tasks. > [ 0.000000] [0:maestro@] The route between alice and bob already exists (Rq: routes are symmetrical by default). diff --git a/teshsuite/simix/CMakeLists.txt b/teshsuite/simix/CMakeLists.txt index 26919a1b6c..35216ce345 100644 --- a/teshsuite/simix/CMakeLists.txt +++ b/teshsuite/simix/CMakeLists.txt @@ -32,9 +32,7 @@ if (NOT enable_memcheck AND NOT enable_address_sanitizer) SET_TESH_PROPERTIES(stack-overflow "ucontext;raw;boost" WILL_FAIL true) endif() endif() -if (NOT enable_memcheck) - ADD_TESH_FACTORIES(generic-simcalls "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simix/generic-simcalls --setenv srcdir=${CMAKE_HOME_DIRECTORY} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simix/generic-simcalls generic-simcalls.tesh) -endif() +ADD_TESH_FACTORIES(generic-simcalls "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simix/generic-simcalls --setenv srcdir=${CMAKE_HOME_DIRECTORY} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simix/generic-simcalls generic-simcalls.tesh) foreach (factory raw thread boost ucontext) string (TOUPPER have_${factory}_contexts VARNAME) diff --git a/tools/cmake/Tests.cmake b/tools/cmake/Tests.cmake index f587730138..e85211a0aa 100644 --- a/tools/cmake/Tests.cmake +++ b/tools/cmake/Tests.cmake @@ -21,6 +21,7 @@ IF(enable_memcheck) if(enable_memcheck_xml) SET(TESH_WRAPPER ${TESH_WRAPPER}\ --xml=yes\ --xml-file=memcheck_test_%p.memcheck\ --child-silent-after-fork=yes\ ) endif() + set(TESH_OPTION ${TESH_OPTION} --setenv VALGRIND_NO_LEAK_CHECK=--leak-check=no\ --show-leak-kinds=none) # message(STATUS "tesh wrapper: ${TESH_WRAPPER}") -- 2.20.1