Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix the host-on-off refcount test
authorGabriel Corona <gabriel.corona@loria.fr>
Thu, 9 Jul 2015 10:53:21 +0000 (12:53 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Thu, 9 Jul 2015 11:23:45 +0000 (13:23 +0200)
src/simix/smx_process.c
teshsuite/msg/host_on_off_processes/host_on_off_processes.tesh

index f645d20..02e70b4 100644 (file)
@@ -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;
 
index 299e850..b70ec25 100644 (file)
@@ -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