|
|
@ -1,9 +1,9 @@
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
|
|
|
|
import system_tests
|
|
|
|
from system_tests import CaseMeta, path, check_no_ASAN_UBSAN_errors
|
|
|
|
import os.path
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TestFirstPoC(metaclass=system_tests.CaseMeta):
|
|
|
|
|
|
|
|
|
|
|
|
class TestFirstPoC(metaclass=CaseMeta):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
Regression test for the bug described in:
|
|
|
|
Regression test for the bug described in:
|
|
|
|
https://github.com/Exiv2/exiv2/issues/283
|
|
|
|
https://github.com/Exiv2/exiv2/issues/283
|
|
|
@ -16,16 +16,15 @@ class TestFirstPoC(metaclass=system_tests.CaseMeta):
|
|
|
|
Here we want to also check that the two last lines of got_stderr have the expected_stderr
|
|
|
|
Here we want to also check that the two last lines of got_stderr have the expected_stderr
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
system_tests.check_no_ASAN_UBSAN_errors(self, i, command, got_stderr, expected_stderr)
|
|
|
|
check_no_ASAN_UBSAN_errors(self, i, command, got_stderr, expected_stderr)
|
|
|
|
self.assertListEqual(expected_stderr.splitlines(), got_stderr.splitlines()[-2:])
|
|
|
|
self.assertListEqual(expected_stderr.splitlines(), got_stderr.splitlines()[-2:])
|
|
|
|
|
|
|
|
|
|
|
|
filename = os.path.join("$data_path", "pocIssue283.jpg")
|
|
|
|
filename = path("$data_path/pocIssue283.jpg")
|
|
|
|
commands = ["$exiv2 $filename"]
|
|
|
|
commands = ["$exiv2 $filename"]
|
|
|
|
stdout = [""]
|
|
|
|
stdout = [""]
|
|
|
|
stderr = [
|
|
|
|
stderr = [
|
|
|
|
"""$exiv2_exception_message """ + filename + """:
|
|
|
|
"""$exiv2_exception_message $filename:
|
|
|
|
$kerCorruptedMetadata
|
|
|
|
$kerCorruptedMetadata
|
|
|
|
"""]
|
|
|
|
"""]
|
|
|
|
compare_stderr = check_no_ASAN_UBSAN_errors
|
|
|
|
compare_stderr = check_no_ASAN_UBSAN_errors
|
|
|
|
retval = [1]
|
|
|
|
retval = [1]
|
|
|
|
|
|
|
|
|
|
|
|