patterns['free2'] = gen.free[r]("2")
# Generate the correct code
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Correct matching'
- replace['longdesc'] = f'No error'
+ replace['longdesc'] = 'No error'
replace['outcome'] = 'OK'
replace['errormsg'] = 'OK'
gen.make_file(template, f'ReqLifecycle_{s}_{r}_ok.c', replace)
# Generate the code with a missing wait
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Missing wait'
replace['longdesc'] = 'Missing Wait. @{s}@ at @{filename}@:@{line:MBIERROR}@ has no completion.'
replace['outcome'] = 'ERROR: MissingWait'
if s in gen.psend:
# Generate the code with a missing start - persistent only
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Missing start'
replace['longdesc'] = 'Missing start. @{s}@ at @{filename}@:@{line:MBIERROR}@ has no start'
replace['outcome'] = 'ERROR: MissingStart'
replace['start1'] = ' /* MBIERROR MISSING: ' + startPers + ' */'
gen.make_file(template, f'ReqLifecycle_MissingStart_{s}_{r}_nok.c', replace)
# Generate the code with a missing free - persistent only
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Missing free'
replace['longdesc'] = 'Missing free. @{s}@ at @{filename}@:@{line:MBIERROR}@ has no free'
replace['outcome'] = 'ERROR: RequestLeak'
patterns['free2'] = ""
# Generate the code with a missing wait
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Missing wait'
replace['longdesc'] = 'Missing Wait. @{c}@ at @{filename}@:@{line:MBIERROR}@ has no completion'
replace['outcome'] = 'ERROR: MissingWait'
if c in gen.pcoll:
# Generate the code with a missing start - persistent only
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Missing start functio'
replace['longdesc'] = 'Missing Start. @{c}@ at @{filename}@:@{line:MBIERROR}@ has no start'
replace['outcome'] = 'ERROR: MissingStart'
gen.make_file(template, f'ReqLifecycle_MissingStart_{c}_nok.c', replace)
# Generate the code with a resleak (no free) - persistent only
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Missing free'
replace['longdesc'] = 'Missing free. @{c}@ at @{filename}@:@{line:MBIERROR}@ has no free'
replace['outcome'] = 'ERROR: RequestLeak'