X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ae3f559b2615a7128dfab2ad8c27404e1edcbb31..5843ccab4e336d47ca34f54e68760ac78d242f36:/teshsuite/smpi/MBI/CollP2PMessageRaceGenerator.py diff --git a/teshsuite/smpi/MBI/CollP2PMessageRaceGenerator.py b/teshsuite/smpi/MBI/CollP2PMessageRaceGenerator.py index aa9e78ed6a..4ca22b9d0d 100755 --- a/teshsuite/smpi/MBI/CollP2PMessageRaceGenerator.py +++ b/teshsuite/smpi/MBI/CollP2PMessageRaceGenerator.py @@ -40,6 +40,7 @@ int main(int argc, char **argv) { int nprocs = -1; int rank = -1; int dest, src; + int i=0; int root = 0; int stag = 0, rtag = 0; int buff_size = 1; @@ -80,7 +81,7 @@ int main(int argc, char **argv) { @{operation3}@ /* MBIERROR1 */ @{operation1}@ @{fini1}@ - src = 0; + @{changesrc}@ @{operation4}@ /* MBIERROR2 */ @{fini3}@ @{fini4}@ @@ -129,11 +130,22 @@ for s in gen.send + gen.isend: patterns['operation2'] = gen.operation[s]("2") patterns['operation3'] = gen.operation[r]("3") patterns['operation4'] = gen.operation[r]("4") + patterns['changesrc'] = '' + + # Generate the correct matching because of the conditional + replace = patterns.copy() + replace['shortdesc'] = 'Message race' + replace['longdesc'] = 'Message race without problem in @{r}@ with @{c}@.' + replace['outcome'] = 'OK' + replace['errormsg'] = 'OK' + replace['changesrc'] = '' + gen.make_file(template, f'MessageRace_{c}_{s}_{r}_ok.c', replace) # Generate the incorrect matching because of the conditional - replace = patterns + replace = patterns.copy() replace['shortdesc'] = 'Message race' replace['longdesc'] = 'Message race in @{r}@ with @{c}@.' replace['outcome'] = 'ERROR: MessageRace' replace['errormsg'] = 'Message race. The use of wildcard receive calls (@{r}@ at @{filename}@:@{line:MBIERROR1}@ and @{r}@ at @{filename}@:@{line:MBIERROR2}@) leads to nondeterministic matching.' + replace['changesrc'] = 'src = 0;' gen.make_file(template, f'MessageRace_{c}_{s}_{r}_nok.c', replace)