From: Gabriel Corona Date: Thu, 9 Jul 2015 10:53:21 +0000 (+0200) Subject: Fix the host-on-off refcount test X-Git-Tag: v3_12~535 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d7d25ee1e33a01d3655723cbe4c8e0a77ea60712?hp=5ded2071c37dc28669c79ff593159aea355b2538 Fix the host-on-off refcount test --- diff --git a/src/simix/smx_process.c b/src/simix/smx_process.c index f645d20c24..02e70b43f3 100644 --- a/src/simix/smx_process.c +++ b/src/simix/smx_process.c @@ -356,6 +356,7 @@ void SIMIX_process_kill(smx_process_t process, smx_process_t issuer) { case SIMIX_SYNC_COMMUNICATE: xbt_fifo_remove(process->comms, process->waiting_synchro); SIMIX_comm_cancel(process->waiting_synchro); + xbt_fifo_remove(process->waiting_synchro->simcalls, &process->simcall); SIMIX_comm_destroy(process->waiting_synchro); break; 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 299e8500c0..b70ec25370 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 @@ -54,12 +54,6 @@ $ ./host_on_off_processes ${srcdir:=.}/../../../examples/platforms/small_platfor > [Tremblay:commRX:(2) 20.000000] [msg_test/INFO] RX Done > [20.000000] [msg_test/INFO] Simulation time 20 -# This test is broken (refcount error): -# Warning! I think this test is completely broken and it was revealed by -# exception/exception test. At time 20, Jupiter should wake up with a -# HOST_FAILURE and it gets a TRANSFERT_FAILURE. This is because when turning -# off Jupiter, its processes are killed, which cancels/destroys the -# corresponding surf communication instead of canceling a src_ or dst_timeout. $ ./host_on_off_processes ${srcdir:=.}/../../../examples/platforms/small_platform.xml ${srcdir:=.}/host_on_off_processes_d.xml 5 --log=no_loc --log=msg.thresh:error --log=surf_maxmin.thresh:error > [Tremblay:test_launcher:(1) 0.000000] [msg_test/INFO] Test 5 (turn off dest during a communication : Create a Process/task to make a communication between Tremblay and Jupiter and turn off Jupiter during the communication > [Jupiter:commRX:(2) 10.000000] [msg_test/INFO] Start RX @@ -68,8 +62,6 @@ $ ./host_on_off_processes ${srcdir:=.}/../../../examples/platforms/small_platfor > [Tremblay:test_launcher:(1) 20.000000] [msg_test/INFO] Turn Jupiter off > [Tremblay:test_launcher:(1) 20.000000] [msg_test/INFO] Test 5 seems ok, cool !(number of Process : 2, it should be 2 > [Tremblay:test_launcher:(1) 20.000000] [msg_test/INFO] Test done. See you! -> [Jupiter:commRX:(2) 20.000000] [msg_test/INFO] Receive message: HOST_FAILURE -> [Jupiter:commRX:(2) 20.000000] [msg_test/INFO] RX Done > [Tremblay:commTX:(3) 40.000000] [msg_test/INFO] TX done > [40.000000] [msg_test/INFO] Simulation time 40