mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Merge development commit f352f7 into development-psa
This commit is contained in:
1788
tests/scripts/all.sh
1788
tests/scripts/all.sh
File diff suppressed because it is too large
Load Diff
@ -75,11 +75,10 @@ class TestDataParser(object):
|
||||
:param split_char: Split character
|
||||
:return: List of splits
|
||||
"""
|
||||
split_colon_fn = lambda x: re.sub(r'\\' + split_char, split_char, x)
|
||||
if len(split_char) > 1:
|
||||
raise ValueError('Expected split character. Found string!')
|
||||
out = re.sub(r'(\\.)|' + split_char,
|
||||
lambda m: m.group(1) or '\n', inp_str,
|
||||
len(inp_str)).split('\n')
|
||||
out = map(split_colon_fn, re.split(r'(?<!\\)' + split_char, inp_str))
|
||||
out = [x for x in out if x]
|
||||
return out
|
||||
|
||||
@ -112,8 +111,8 @@ class TestDataParser(object):
|
||||
args = parts[1:]
|
||||
args_count = len(args)
|
||||
if args_count % 2 != 0:
|
||||
raise TestDataParserError("Number of test arguments should "
|
||||
"be even: %s" % line)
|
||||
err_str_fmt = "Number of test arguments({}) should be even: {}"
|
||||
raise TestDataParserError(err_str_fmt.format(args_count, line))
|
||||
grouped_args = [(args[i * 2], args[(i * 2) + 1])
|
||||
for i in range(len(args)/2)]
|
||||
self.tests.append((name, function_name, dependencies,
|
||||
@ -163,6 +162,7 @@ class MbedTlsTest(BaseHostTest):
|
||||
self.tests = []
|
||||
self.test_index = -1
|
||||
self.dep_index = 0
|
||||
self.suite_passed = True
|
||||
self.error_str = dict()
|
||||
self.error_str[self.DEPENDENCY_SUPPORTED] = \
|
||||
'DEPENDENCY_SUPPORTED'
|
||||
@ -293,7 +293,7 @@ class MbedTlsTest(BaseHostTest):
|
||||
name, function_id, dependencies, args = self.tests[self.test_index]
|
||||
self.run_test(name, function_id, dependencies, args)
|
||||
else:
|
||||
self.notify_complete(True)
|
||||
self.notify_complete(self.suite_passed)
|
||||
|
||||
def run_test(self, name, function_id, dependencies, args):
|
||||
"""
|
||||
@ -353,6 +353,8 @@ class MbedTlsTest(BaseHostTest):
|
||||
self.log('{{__testcase_start;%s}}' % name)
|
||||
self.log('{{__testcase_finish;%s;%d;%d}}' % (name, int_val == 0,
|
||||
int_val != 0))
|
||||
if int_val != 0:
|
||||
self.suite_passed = False
|
||||
self.run_next_test()
|
||||
|
||||
@event_callback("F")
|
||||
|
@ -17,7 +17,7 @@
|
||||
# seem to be a mechanism to reliably check whether the zeroize calls are being
|
||||
# eliminated by compiler optimizations from within the compiled program. The
|
||||
# problem is that a compiler would typically remove what it considers to be
|
||||
# "unecessary" assignments as part of redundant code elimination. To identify
|
||||
# "unnecessary" assignments as part of redundant code elimination. To identify
|
||||
# such code, the compilar will create some form dependency graph between
|
||||
# reads and writes to variables (among other situations). It will then use this
|
||||
# data structure to remove redundant code that does not have an impact on the
|
||||
@ -41,8 +41,6 @@
|
||||
# number does not need to be updated often.
|
||||
|
||||
set confirm off
|
||||
# We don't need to turn off ASLR, so don't try.
|
||||
set disable-randomization off
|
||||
|
||||
file ./programs/test/zeroize
|
||||
break zeroize.c:100
|
||||
|
Reference in New Issue
Block a user