From 7d32da890b0739243c318b3611125b297afb74ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz=20M=C3=A1s?= Date: Mon, 10 Sep 2018 21:10:41 +0200 Subject: [PATCH] Add remaining pocs for the issue 428 and adapt the regression test --- test/data/issue_428_poc5.png | Bin 0 -> 1651 bytes test/data/issue_428_poc6.png | Bin 0 -> 456 bytes test/data/issue_428_poc7.png | Bin 0 -> 2598 bytes test/data/issue_428_poc8.png | Bin 0 -> 188 bytes tests/bugfixes/github/test_issue_428.py | 22 ++++++++++++++++------ 5 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 test/data/issue_428_poc5.png create mode 100644 test/data/issue_428_poc6.png create mode 100644 test/data/issue_428_poc7.png create mode 100644 test/data/issue_428_poc8.png diff --git a/test/data/issue_428_poc5.png b/test/data/issue_428_poc5.png new file mode 100644 index 0000000000000000000000000000000000000000..1623370d178acf0769b85b843a5f85055cedb01b GIT binary patch literal 1651 zcmeAS@N?(olHy`uVBq!ia0vp^xd0>&xz|ipjKS-R1;q8A=F%M$HihK~;9f%!}#HATo E0YvjeqW}N^ literal 0 HcmV?d00001 diff --git a/test/data/issue_428_poc6.png b/test/data/issue_428_poc6.png new file mode 100644 index 0000000000000000000000000000000000000000..154253201daa8266a24aecac8a49c4cc4123927d GIT binary patch literal 456 zcmeAS@N?(olHy`uVBq!iU|ecy+yam!gN=Qjt{-7<~g2ob!uP6-@Pvb(0MY4HeAH^b9*Gcaj#!NxMN#qQ9>c zB0#>v2#R2opfE!V3P-Req@Yj$gA@iOI|UmTQ!_I|9R(u;LnD0yATrZ6G_f)@vobP& M!OXw_QmAAH03B9y)c^nh literal 0 HcmV?d00001 diff --git a/test/data/issue_428_poc7.png b/test/data/issue_428_poc7.png new file mode 100644 index 0000000000000000000000000000000000000000..e2515fd1d7b8b5451d619c45c896cd7ddd13489d GIT binary patch literal 2598 zcmbtWTT4_?6kdDInBz2)Go}rs#Ib_(p%}-M7}6vLs+S0n2zu(GAxKII+Ea=*D!b5I z^wL|uAc!DvBIv~~5cDEQB|b<+z8H4%^sRmNIkV51ONv|O>~;29dtJV7?X$gc>g2I# zcxRZ1q9=}LIx+9ZuP(F&&lL*dNy*->GlQMyhRlI0{XM;X-R9u6fo`*VxVHyNL9`DO z95knshtjELv#BM0u!UvpY)U36l}vh7O(~M5?3)MP4NUMv6c^je>2`o<6~D>*=Vj<0&=S; zqXYhd09U8VX%>2p)u8suB9Jzj*i=K*#>xjodoZ=zOXkaVq9e*ahV=w&>eRcSF=~X& zE-)f+U>8Tzu==fDLSHQ_u4IEcP~BDnARLPU@fHXb)-vCS03it=`2%x8L?~npJ*%9( z^#1Rg=Y5mYX0k!dtzJlfic!6Fo#;u&^s8G-e^QYyv;XwNvX2yqyjXc;yuKS9I-IHg zH8v8?Q4)nmqJWbgWJAeitUwDP2d>pa5R<|^7CD;BnMPbnpm8Xn7*lDZ!O(>8$1T8> zafB@@8o%o;5C^TiHjhU_v#Akva-Dr~3~eyu2{6UmR425u?5+pNyorU{m~A7%)?$U^ zD+KI|K`#sOKyT4ycx@A5oEs69;U25dYq`*-C$wR)YLtQ%l5xn$s!Gqc#qRm)QRTDB zO`Cm!2Q;?VC(0S;aw->P4tATtm;*ahWWcmu0aW_%#DD@Z@*tBj6lBsjW6RlMR8OEo z;yw^KzQq4S*270yhz01hJ@w=O=kDW@h<&<5a`F^TxYnpkiCu?c~tH=PvToQq-T# zRpwL>V?3RXanv}Qc4H{gN;F2y{i-06KAa3RUP?B`f4*@`eBw)WyOX=yVBT*3Vr`%( ze0JUQYJX^Q=asTgB~71wz3DVj$$s|t(fWE5Q2Gvf0nUoljRsvmnYp@kCLtFjbCednip(^iB;zYo^#TOdGpGZ#fh;sKD5+#%02{&p5i}wR004jVCTaix literal 0 HcmV?d00001 diff --git a/tests/bugfixes/github/test_issue_428.py b/tests/bugfixes/github/test_issue_428.py index e161a527..9e72c72a 100644 --- a/tests/bugfixes/github/test_issue_428.py +++ b/tests/bugfixes/github/test_issue_428.py @@ -2,6 +2,10 @@ import system_tests +def stderr_exception (fname): + return """$exiv2_exception_message """ + fname + """: +$kerFailedToReadImageData +""" class PngReadRawProfile(metaclass=system_tests.CaseMeta): @@ -12,14 +16,20 @@ class PngReadRawProfile(metaclass=system_tests.CaseMeta): system_tests.path("$data_path/issue_428_poc2.png"), system_tests.path("$data_path/issue_428_poc3.png"), system_tests.path("$data_path/issue_428_poc4.png"), + system_tests.path("$data_path/issue_428_poc5.png"), + system_tests.path("$data_path/issue_428_poc8.png"), + + system_tests.path("$data_path/issue_428_poc6.png"), + system_tests.path("$data_path/issue_428_poc7.png"), ] commands = ["$exiv2 " + fname for fname in filenames] stdout = [""] * len(filenames) - stderr = [ - """$exiv2_exception_message """ + fname + """: -$kerFailedToReadImageData -""" - for fname in filenames - ] + stderr = [ stderr_exception(fname) for fname in filenames[0:6] ] + stderr.append("""Error: XMP Toolkit error 201: XML parsing failure +Warning: Failed to decode XMP metadata. +""" + stderr_exception(filenames[6])) + stderr.append("""Warning: Failed to decode Exif metadata. +""" + stderr_exception(filenames[7])) + retval = [1] * len(filenames)