Replace error variable names in test suite with enum error codes

This commit is contained in:
Dan Čermák 2018-02-18 10:44:05 +01:00
parent a15f090f81
commit 3965a44df2
7 changed files with 9 additions and 10 deletions

View File

@ -11,6 +11,6 @@ class TestPoC(system_tests.Case):
commands = ["{exiv2} " + filename]
stdout = [""]
stderr = ["""{exiv2_exception_msg} """ + filename + """:
{error_57_message}
{kerInvalidMalloc}
"""]
retval = [1]

View File

@ -12,6 +12,6 @@ class CVE_2017_14680(system_tests.Case):
commands = ["{exiv2} " + filename]
stdout = [""]
stderr = ["""{exiv2_exception_msg} """ + filename + """:
{error_58_message}
{kerCorruptedMetadata}
"""]
retval = [1]

View File

@ -11,5 +11,5 @@ class CVE_2017_14857(system_tests.Case):
stdout = [""]
stderr = [
"""{exiv2_exception_msg} """ + filename + """:
{error_57_message}
{kerInvalidMalloc}
"""]

View File

@ -11,6 +11,6 @@ class RunPocFile(system_tests.Case):
stdout = [""]
stderr = [
"""{exiv2_exception_msg} """ + filename + """:
{error_14_message}
{kerFailedToReadImageData}
"""
]

View File

@ -13,6 +13,6 @@ class TestCvePoC(system_tests.Case):
commands = ["{exiv2} " + filename]
stdout = [""]
stderr = ["""{exiv2_exception_msg} """ + filename + """:
{error_58_message}
{kerCorruptedMetadata}
"""]
retval = [1]

View File

@ -11,6 +11,5 @@ class CVE_2017_14857(system_tests.Case):
stdout = [""]
stderr = [
"""{exiv2_exception_msg} """ + filename + """:
{error_58_message}
{kerCorruptedMetadata}
"""]

View File

@ -15,7 +15,7 @@ data_path: ../test/data
tiff-test: ${ENV:exiv2_path}/tiff-test${ENV:binary_extension}
[variables]
error_14_message: Failed to read image data
error_58_message: corrupted image metadata
error_57_message: invalid memory allocation request
kerFailedToReadImageData: Failed to read image data
kerCorruptedMetadata: corrupted image metadata
kerInvalidMalloc: invalid memory allocation request
exiv2_exception_msg: Exiv2 exception in print action for file