X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/775a95a652df719afe73a091d3de03aefdd07211..068691c901bbd4875aebf81fa69c60ff6b0db623:/teshsuite/smpi/MBI/RMAWinBufferGenerator.py?ds=sidebyside diff --git a/teshsuite/smpi/MBI/RMAWinBufferGenerator.py b/teshsuite/smpi/MBI/RMAWinBufferGenerator.py index 4d62beebda..8ad4a4f501 100755 --- a/teshsuite/smpi/MBI/RMAWinBufferGenerator.py +++ b/teshsuite/smpi/MBI/RMAWinBufferGenerator.py @@ -1,7 +1,7 @@ #! /usr/bin/python3 import os import sys -from generator_utils import * +import generator_utils as gen template = """// @{generatedby}@ /* ///////////////////////// The MPI Bugs Initiative //////////////////////// @@ -90,7 +90,7 @@ for b in ['missing', 'null', 'malloc', 'bufferSize']: patterns['generatedby'] = f'DO NOT EDIT: this file was generated by {os.path.basename(sys.argv[0])}. DO NOT EDIT.' patterns['rmafeature'] = 'Yes' - replace = patterns + replace = patterns.copy() replace['shortdesc'] = 'Invalid buffer in window creation.' replace['longdesc'] = 'Invalid buffer in window creation.' replace['outcome'] = 'ERROR: InvalidBuffer' @@ -107,15 +107,15 @@ for b in ['missing', 'null', 'malloc', 'bufferSize']: replace['bufferalloc'] = 'buffer = NULL; /* MBIERROR1 */' replace['longdesc'] = 'Use NULL buffer in window creation.' elif b == 'bufferSize': - replace['bufferalloc'] = 'buffer = malloc((N/2) * sizeof(int)); /* MBIERROR1 */' + replace['bufferalloc'] = 'buffer = (int *)malloc((N/2) * sizeof(int)); /* MBIERROR1 */' replace['bufferfree'] = 'free(buffer);' replace['longdesc'] = 'Unmatched size of buffer in window creation.' else: - replace['bufferalloc'] = 'buffer = malloc(N * sizeof(int));' + replace['bufferalloc'] = 'buffer = (int *)malloc(N * sizeof(int));' replace['bufferfree'] = 'free(buffer);' replace['longdesc'] = 'Correct initialized buffer in window creation.' replace['outcome'] = 'OK' replace['errormsg'] = '' ok = 'ok' - make_file(template, f'InvalidParam_WinBuffer_{b}_{ok}.c', replace) + gen.make_file(template, f'InvalidParam_WinBuffer_{b}_{ok}.c', replace)