Fix race condition in SError inject test
tftf/tests/misc_tests/inject_serror.S clears a flag, serror_received,
then waits for it to be set by an error handler. However, it
currently clears the flag after having started the count down timer
to generate the error, so there is a data race between it and
the error handler.
This can cause the test to fail, if the error is generated and the
flag set before it is first cleared.
Fix this by clearing the serror_received flag before starting the
count down timer.
Change-Id: I919ef2a1bba66b19f47bccfcdbee944357881e8f
Signed-off-by: David Horstmann <david.horstmann@arm.com>
1 file changed