X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cc309f0bc25802386a5f6d8bf2cfc487139ca1e3..5843ccab4e336d47ca34f54e68760ac78d242f36:/teshsuite/smpi/MBI/CollP2PMessageRaceGenerator.py?ds=sidebyside diff --git a/teshsuite/smpi/MBI/CollP2PMessageRaceGenerator.py b/teshsuite/smpi/MBI/CollP2PMessageRaceGenerator.py index 8709da593f..4ca22b9d0d 100755 --- a/teshsuite/smpi/MBI/CollP2PMessageRaceGenerator.py +++ b/teshsuite/smpi/MBI/CollP2PMessageRaceGenerator.py @@ -81,7 +81,7 @@ int main(int argc, char **argv) { @{operation3}@ /* MBIERROR1 */ @{operation1}@ @{fini1}@ - src = 0; + @{changesrc}@ @{operation4}@ /* MBIERROR2 */ @{fini3}@ @{fini4}@ @@ -130,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)