From 79e30a33db8c596e304b812671ad6ab569676baa Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 6 Nov 2023 19:34:52 +0100 Subject: [PATCH] Change most mcmini tests to odpor reduction; the unchanged one fails to find the deadlock with odpor... --- teshsuite/mc/mcmini/barber_shop_deadlock.tesh | 5 +++-- teshsuite/mc/mcmini/barber_shop_ok.c | 6 ++++-- teshsuite/mc/mcmini/barber_shop_ok.tesh | 11 ++++------- teshsuite/mc/mcmini/philosophers_mutex_deadlock.tesh | 7 ++++--- teshsuite/mc/mcmini/philosophers_mutex_ok.tesh | 7 ++++--- teshsuite/mc/mcmini/philosophers_semaphores_ok.tesh | 7 ++++--- teshsuite/mc/mcmini/producer_consumer_deadlock.tesh | 5 +++-- teshsuite/mc/mcmini/producer_consumer_ok.tesh | 7 ++++--- 8 files changed, 30 insertions(+), 25 deletions(-) diff --git a/teshsuite/mc/mcmini/barber_shop_deadlock.tesh b/teshsuite/mc/mcmini/barber_shop_deadlock.tesh index e8c0592434..e3420c97d7 100644 --- a/teshsuite/mc/mcmini/barber_shop_deadlock.tesh +++ b/teshsuite/mc/mcmini/barber_shop_deadlock.tesh @@ -2,8 +2,9 @@ ! ignore .*LD_PRELOAD.* ! expect return 3 -$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../bin/simgrid-mc --cfg=model-check/setenv:LD_PRELOAD=${libdir:=.}/libsthread.so ${bindir:=.}/mcmini/mcmini-barber_shop_deadlock 5 3 0 0 -> [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: dpor. +$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../bin/simgrid-mc --cfg=model-check/reduction:odpor --cfg=model-check/setenv:LD_PRELOAD=${libdir:=.}/libsthread.so ${bindir:=.}/mcmini/mcmini-barber_shop_deadlock 5 3 0 0 +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check/reduction' to 'odpor' +> [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: odpor. > [0.000000] [mc_global/INFO] ************************** > [0.000000] [mc_global/INFO] *** DEADLOCK DETECTED *** > [0.000000] [mc_global/INFO] ************************** diff --git a/teshsuite/mc/mcmini/barber_shop_ok.c b/teshsuite/mc/mcmini/barber_shop_ok.c index b0f17ca859..827b8db873 100644 --- a/teshsuite/mc/mcmini/barber_shop_ok.c +++ b/teshsuite/mc/mcmini/barber_shop_ok.c @@ -145,8 +145,10 @@ int main(int argc, char* argv[]) exit(-1); } - printf("\nSleepBarber.c\n\n"); - printf("A solution to the sleeping barber problem using semaphores.\n"); + if (DEBUG) { + printf("\nSleepBarber.c\n\n"); + printf("A solution to the sleeping barber problem using semaphores.\n"); + } // Initialize the random number generator with a new seed. srand48(RandSeed); diff --git a/teshsuite/mc/mcmini/barber_shop_ok.tesh b/teshsuite/mc/mcmini/barber_shop_ok.tesh index abe933b123..8745d38085 100644 --- a/teshsuite/mc/mcmini/barber_shop_ok.tesh +++ b/teshsuite/mc/mcmini/barber_shop_ok.tesh @@ -1,10 +1,7 @@ # We ignore the LD_PRELOAD lines from the expected output because they contain the build path ! ignore .*LD_PRELOAD.* -$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../bin/simgrid-mc --cfg=model-check/setenv:LD_PRELOAD=${libdir:=.}/libsthread.so ${bindir:=.}/mcmini/mcmini-barber_shop_ok 3 2 0 0 -> -> SleepBarber.c -> -> A solution to the sleeping barber problem using semaphores. -> [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: dpor. -> [0.000000] [mc_dfs/INFO] DFS exploration ended. 5169 unique states visited; 959 backtracks (21531 transition replays, 27659 states visited overall) +$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../bin/simgrid-mc --cfg=model-check/reduction:odpor --cfg=model-check/setenv:LD_PRELOAD=${libdir:=.}/libsthread.so ${bindir:=.}/mcmini/mcmini-barber_shop_ok 4 2 0 0 +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check/reduction' to 'odpor' +> [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: odpor. +> [0.000000] [mc_dfs/INFO] DFS exploration ended. 1266 unique states visited; 23 backtracks (271 transition replays, 1560 states visited overall) diff --git a/teshsuite/mc/mcmini/philosophers_mutex_deadlock.tesh b/teshsuite/mc/mcmini/philosophers_mutex_deadlock.tesh index bfa2194b33..9092bf9c7e 100644 --- a/teshsuite/mc/mcmini/philosophers_mutex_deadlock.tesh +++ b/teshsuite/mc/mcmini/philosophers_mutex_deadlock.tesh @@ -2,8 +2,9 @@ ! ignore .*LD_PRELOAD.* ! expect return 3 -$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../bin/simgrid-mc --cfg=model-check/setenv:LD_PRELOAD=${libdir:=.}/libsthread.so ${bindir:=.}/mcmini/mcmini-philosophers_mutex_deadlock 5 0 -> [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: dpor. +$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../bin/simgrid-mc --cfg=model-check/reduction:odpor --cfg=model-check/setenv:LD_PRELOAD=${libdir:=.}/libsthread.so ${bindir:=.}/mcmini/mcmini-philosophers_mutex_deadlock 5 0 +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check/reduction' to 'odpor' +> [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: odpor. > [0.000000] [mc_global/INFO] ************************** > [0.000000] [mc_global/INFO] *** DEADLOCK DETECTED *** > [0.000000] [mc_global/INFO] ************************** @@ -32,4 +33,4 @@ $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../bin/simgrid-mc --cfg=model-chec > [0.000000] [mc_global/INFO] Actor 6 in simcall MUTEX_WAIT(mutex: 4, owner: 6) > [0.000000] [mc_global/INFO] Actor 6 in simcall MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) > [0.000000] [mc_Session/INFO] You can debug the problem (and see the whole details) by rerunning out of simgrid-mc with --cfg=model-check/replay:'2;2;3;2;3;4;3;4;5;4;5;6;5;6;6' -> [0.000000] [mc_dfs/INFO] DFS exploration ended. 1298 unique states visited; 199 backtracks (3432 transition replays, 4929 states visited overall) \ No newline at end of file +> [0.000000] [mc_dfs/INFO] DFS exploration ended. 317 unique states visited; 15 backtracks (224 transition replays, 556 states visited overall) \ No newline at end of file diff --git a/teshsuite/mc/mcmini/philosophers_mutex_ok.tesh b/teshsuite/mc/mcmini/philosophers_mutex_ok.tesh index d25d92bb35..6a93b85730 100644 --- a/teshsuite/mc/mcmini/philosophers_mutex_ok.tesh +++ b/teshsuite/mc/mcmini/philosophers_mutex_ok.tesh @@ -1,6 +1,7 @@ # We ignore the LD_PRELOAD lines from the expected output because they contain the build path ! ignore .*LD_PRELOAD.* -$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../bin/simgrid-mc --cfg=model-check/setenv:LD_PRELOAD=${libdir:=.}/libsthread.so ${bindir:=.}/mcmini/mcmini-philosophers_mutex_ok 5 0 -> [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: dpor. -> [0.000000] [mc_dfs/INFO] DFS exploration ended. 14170 unique states visited; 2087 backtracks (45202 transition replays, 61459 states visited overall) \ No newline at end of file +$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../bin/simgrid-mc --cfg=model-check/reduction:odpor --cfg=model-check/setenv:LD_PRELOAD=${libdir:=.}/libsthread.so ${bindir:=.}/mcmini/mcmini-philosophers_mutex_ok 5 0 +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check/reduction' to 'odpor' +> [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: odpor. +> [0.000000] [mc_dfs/INFO] DFS exploration ended. 4190 unique states visited; 119 backtracks (1811 transition replays, 6120 states visited overall) \ No newline at end of file diff --git a/teshsuite/mc/mcmini/philosophers_semaphores_ok.tesh b/teshsuite/mc/mcmini/philosophers_semaphores_ok.tesh index 5a56d8798c..84b5876bc9 100644 --- a/teshsuite/mc/mcmini/philosophers_semaphores_ok.tesh +++ b/teshsuite/mc/mcmini/philosophers_semaphores_ok.tesh @@ -1,6 +1,7 @@ # We ignore the LD_PRELOAD lines from the expected output because they contain the build path ! ignore .*LD_PRELOAD.* -$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../bin/simgrid-mc --cfg=model-check/setenv:LD_PRELOAD=${libdir:=.}/libsthread.so ${bindir:=.}/mcmini/mcmini-philosophers_semaphores_ok 3 0 -> [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: dpor. -> [0.000000] [mc_dfs/INFO] DFS exploration ended. 2268 unique states visited; 233 backtracks (3314 transition replays, 5815 states visited overall) \ No newline at end of file +$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../bin/simgrid-mc --cfg=model-check/reduction:odpor --cfg=model-check/setenv:LD_PRELOAD=${libdir:=.}/libsthread.so ${bindir:=.}/mcmini/mcmini-philosophers_semaphores_ok 5 0 +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check/reduction' to 'odpor' +> [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: odpor. +> [0.000000] [mc_dfs/INFO] DFS exploration ended. 4979 unique states visited; 119 backtracks (1022 transition replays, 6120 states visited overall) \ No newline at end of file diff --git a/teshsuite/mc/mcmini/producer_consumer_deadlock.tesh b/teshsuite/mc/mcmini/producer_consumer_deadlock.tesh index 96fd809748..0db5bb8430 100644 --- a/teshsuite/mc/mcmini/producer_consumer_deadlock.tesh +++ b/teshsuite/mc/mcmini/producer_consumer_deadlock.tesh @@ -2,8 +2,9 @@ ! ignore .*LD_PRELOAD.* ! expect return 3 -$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../bin/simgrid-mc --cfg=model-check/setenv:LD_PRELOAD=${libdir:=.}/libsthread.so ${bindir:=.}/mcmini/mcmini-producer_consumer_deadlock 5 3 0 -> [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: dpor. +$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../bin/simgrid-mc --cfg=model-check/reduction:odpor --cfg=model-check/setenv:LD_PRELOAD=${libdir:=.}/libsthread.so ${bindir:=.}/mcmini/mcmini-producer_consumer_deadlock 5 3 0 +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check/reduction' to 'odpor' +> [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: odpor. > [0.000000] [mc_global/INFO] ************************** > [0.000000] [mc_global/INFO] *** DEADLOCK DETECTED *** > [0.000000] [mc_global/INFO] ************************** diff --git a/teshsuite/mc/mcmini/producer_consumer_ok.tesh b/teshsuite/mc/mcmini/producer_consumer_ok.tesh index 1d879be43d..4cac945047 100644 --- a/teshsuite/mc/mcmini/producer_consumer_ok.tesh +++ b/teshsuite/mc/mcmini/producer_consumer_ok.tesh @@ -1,6 +1,7 @@ # We ignore the LD_PRELOAD lines from the expected output because they contain the build path ! ignore .*LD_PRELOAD.* -$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../bin/simgrid-mc --cfg=model-check/setenv:LD_PRELOAD=${libdir:=.}/libsthread.so ${bindir:=.}/mcmini/mcmini-producer_consumer_ok 2 2 2 1 0 -> [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: dpor. -> [0.000000] [mc_dfs/INFO] DFS exploration ended. 1953 unique states visited; 491 backtracks (12324 transition replays, 14768 states visited overall) \ No newline at end of file +$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../bin/simgrid-mc --cfg=model-check/reduction:odpor --cfg=model-check/setenv:LD_PRELOAD=${libdir:=.}/libsthread.so ${bindir:=.}/mcmini/mcmini-producer_consumer_ok 2 2 2 1 0 +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check/reduction' to 'odpor' +> [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: odpor. +> [0.000000] [mc_dfs/INFO] DFS exploration ended. 1388 unique states visited; 35 backtracks (485 transition replays, 1908 states visited overall) \ No newline at end of file -- 2.20.1