Skip to content

Commit

Permalink
feat(testing): add a new extensive regression test that runs exiv2 ov…
Browse files Browse the repository at this point in the history
…er every test file we have
  • Loading branch information
hassec committed Feb 12, 2022
1 parent 631de9d commit dc98528
Show file tree
Hide file tree
Showing 286 changed files with 29,518 additions and 250 deletions.
11 changes: 11 additions & 0 deletions test/data/test_reference_files/1-string-format.jpg.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Error: Directory Image: IFD entry 3 lies outside of the data buffer.
Error: Directory Photo: IFD entry 2 lies outside of the data buffer.
Warning: Directory Photo, entry 0x3030 has unknown Exif (TIFF) type 12336; setting type size 1.
Error: Directory Photo, entry 0x3030 has invalid size 2147483648*1; skipping entry.
Warning: Directory Image, entry 0x3030 has unknown Exif (TIFF) type 12336; setting type size 1.
Error: Directory Image, entry 0x3030 has invalid size 2450063408*1; skipping entry.
Warning: Directory Image, entry 0x0000 has unknown Exif (TIFF) type 44; setting type size 1.
Error: Directory Image, entry 0x0000 has invalid size 808452096*1; skipping entry.
Warning: JPEG format error, rc = 5
Exif.Image.ExifTag Long 1 26 26
Exif.Photo.Flash SRational 1 -2147483648/-1 No flash
5 changes: 5 additions & 0 deletions test/data/test_reference_files/1343_exif.png.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Exif.Image.ImageDescription Ascii 17 Can you read me? Can you read me?
Exif.Image.XResolution Rational 1 72/1 72
Exif.Image.YResolution Rational 1 72/1 72
Exif.Image.ResolutionUnit Short 1 2 inch
Exif.Image.YCbCrPositioning Short 1 1 Centered
55 changes: 55 additions & 0 deletions test/data/test_reference_files/20110626_213900.exv.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Exif.Image.ImageWidth Short 1 150 150
Exif.Image.ImageLength Short 1 91 91
Exif.Image.BitsPerSample Short 3 8 8 8 8 8 8
Exif.Image.Orientation Short 1 1 top, left
Exif.Image.SamplesPerPixel Short 1 3 3
Exif.Image.XResolution Rational 1 720000/10000 72
Exif.Image.YResolution Rational 1 720000/10000 72
Exif.Image.ResolutionUnit Short 1 2 inch
Exif.Image.Software Ascii 30 Adobe Photoshop CS5 Macintosh Adobe Photoshop CS5 Macintosh
Exif.Image.DateTime Ascii 20 2011:06:26 21:39:00 2011:06:26 21:39:00
Exif.Image.ExifTag Long 1 218 218
Exif.Photo.ExifVersion Undefined 4 48 50 50 49 2.21
Exif.Photo.ColorSpace Short 1 65535 Uncalibrated
Exif.Photo.PixelXDimension Long 1 150 150
Exif.Photo.PixelYDimension Long 1 91 91
Exif.Thumbnail.Compression Short 1 6 JPEG (old-style)
Exif.Thumbnail.XResolution Rational 1 72/1 72
Exif.Thumbnail.YResolution Rational 1 72/1 72
Exif.Thumbnail.ResolutionUnit Short 1 2 inch
Exif.Thumbnail.JPEGInterchangeFormat Long 1 366 366
Exif.Thumbnail.JPEGInterchangeFormatLength Long 1 0 0
Iptc.Envelope.CharacterSet String 3 %G %G
Iptc.Application2.RecordVersion Short 1 0 0
Xmp.crs.AlreadyApplied XmpText 4 True True
Xmp.photoshop.ColorMode XmpText 1 3 3
Xmp.xmp.CreateDate XmpText 25 2011-06-27T21:35:33+02:00 2011-06-27T21:35:33+02:00
Xmp.xmp.ModifyDate XmpText 25 2011-06-27T21:41:02+02:00 2011-06-27T21:41:02+02:00
Xmp.xmp.MetadataDate XmpText 25 2011-06-27T21:41:02+02:00 2011-06-27T21:41:02+02:00
Xmp.dc.format XmpText 31 application/vnd.adobe.photoshop application/vnd.adobe.photoshop
Xmp.xmpMM.InstanceID XmpText 40 xmp.iid:02801174072068119A95CE0AAC0F98BE xmp.iid:02801174072068119A95CE0AAC0F98BE
Xmp.xmpMM.DocumentID XmpText 40 xmp.did:01801174072068119A95CE0AAC0F98BE xmp.did:01801174072068119A95CE0AAC0F98BE
Xmp.xmpMM.OriginalDocumentID XmpText 40 xmp.did:01801174072068119A95CE0AAC0F98BE xmp.did:01801174072068119A95CE0AAC0F98BE
Xmp.xmpMM.History XmpText 0 type="Seq"
Xmp.xmpMM.History[1] XmpText 0 type="Struct"
Xmp.xmpMM.History[1]/stEvt:action XmpText 5 saved saved
Xmp.xmpMM.History[1]/stEvt:instanceID XmpText 40 xmp.iid:01801174072068119A95CE0AAC0F98BE xmp.iid:01801174072068119A95CE0AAC0F98BE
Xmp.xmpMM.History[1]/stEvt:when XmpText 25 2011-06-27T21:41:02+02:00 2011-06-27T21:41:02+02:00
Xmp.xmpMM.History[1]/stEvt:softwareAgent XmpText 29 Adobe Photoshop CS5 Macintosh Adobe Photoshop CS5 Macintosh
Xmp.xmpMM.History[1]/stEvt:changed XmpText 1 / /
Xmp.xmpMM.History[2] XmpText 0 type="Struct"
Xmp.xmpMM.History[2]/stEvt:action XmpText 9 converted converted
Xmp.xmpMM.History[2]/stEvt:parameters XmpText 50 from image/jpeg to application/vnd.adobe.photoshop from image/jpeg to application/vnd.adobe.photoshop
Xmp.xmpMM.History[3] XmpText 0 type="Struct"
Xmp.xmpMM.History[3]/stEvt:action XmpText 7 derived derived
Xmp.xmpMM.History[3]/stEvt:parameters XmpText 60 converted from image/jpeg to application/vnd.adobe.photoshop converted from image/jpeg to application/vnd.adobe.photoshop
Xmp.xmpMM.History[4] XmpText 0 type="Struct"
Xmp.xmpMM.History[4]/stEvt:action XmpText 5 saved saved
Xmp.xmpMM.History[4]/stEvt:instanceID XmpText 40 xmp.iid:02801174072068119A95CE0AAC0F98BE xmp.iid:02801174072068119A95CE0AAC0F98BE
Xmp.xmpMM.History[4]/stEvt:when XmpText 25 2011-06-27T21:41:02+02:00 2011-06-27T21:41:02+02:00
Xmp.xmpMM.History[4]/stEvt:softwareAgent XmpText 29 Adobe Photoshop CS5 Macintosh Adobe Photoshop CS5 Macintosh
Xmp.xmpMM.History[4]/stEvt:changed XmpText 1 / /
Xmp.xmpMM.DerivedFrom XmpText 0 type="Struct"
Xmp.xmpMM.DerivedFrom/stRef:instanceID XmpText 40 xmp.iid:01801174072068119A95CE0AAC0F98BE xmp.iid:01801174072068119A95CE0AAC0F98BE
Xmp.xmpMM.DerivedFrom/stRef:documentID XmpText 40 xmp.did:01801174072068119A95CE0AAC0F98BE xmp.did:01801174072068119A95CE0AAC0F98BE
Xmp.xmpMM.DerivedFrom/stRef:originalDocumentID XmpText 40 xmp.did:01801174072068119A95CE0AAC0F98BE xmp.did:01801174072068119A95CE0AAC0F98BE
55 changes: 55 additions & 0 deletions test/data/test_reference_files/20110626_213900.psd.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Exif.Image.ImageWidth Short 1 150 150
Exif.Image.ImageLength Short 1 91 91
Exif.Image.BitsPerSample Short 3 8 8 8 8 8 8
Exif.Image.Orientation Short 1 1 top, left
Exif.Image.SamplesPerPixel Short 1 3 3
Exif.Image.XResolution Rational 1 720000/10000 72
Exif.Image.YResolution Rational 1 720000/10000 72
Exif.Image.ResolutionUnit Short 1 2 inch
Exif.Image.Software Ascii 30 Adobe Photoshop CS5 Macintosh Adobe Photoshop CS5 Macintosh
Exif.Image.DateTime Ascii 20 2011:06:26 21:39:00 2011:06:26 21:39:00
Exif.Image.ExifTag Long 1 218 218
Exif.Photo.ExifVersion Undefined 4 48 50 50 49 2.21
Exif.Photo.ColorSpace Short 1 65535 Uncalibrated
Exif.Photo.PixelXDimension Long 1 150 150
Exif.Photo.PixelYDimension Long 1 91 91
Exif.Thumbnail.Compression Short 1 6 JPEG (old-style)
Exif.Thumbnail.XResolution Rational 1 72/1 72
Exif.Thumbnail.YResolution Rational 1 72/1 72
Exif.Thumbnail.ResolutionUnit Short 1 2 inch
Exif.Thumbnail.JPEGInterchangeFormat Long 1 366 366
Exif.Thumbnail.JPEGInterchangeFormatLength Long 1 0 0
Iptc.Envelope.CharacterSet String 3 %G %G
Iptc.Application2.RecordVersion Short 1 0 0
Xmp.crs.AlreadyApplied XmpText 4 True True
Xmp.photoshop.ColorMode XmpText 1 3 3
Xmp.xmp.CreateDate XmpText 25 2011-06-27T21:35:33+02:00 2011-06-27T21:35:33+02:00
Xmp.xmp.ModifyDate XmpText 25 2011-06-27T21:41:02+02:00 2011-06-27T21:41:02+02:00
Xmp.xmp.MetadataDate XmpText 25 2011-06-27T21:41:02+02:00 2011-06-27T21:41:02+02:00
Xmp.dc.format XmpText 31 application/vnd.adobe.photoshop application/vnd.adobe.photoshop
Xmp.xmpMM.InstanceID XmpText 40 xmp.iid:02801174072068119A95CE0AAC0F98BE xmp.iid:02801174072068119A95CE0AAC0F98BE
Xmp.xmpMM.DocumentID XmpText 40 xmp.did:01801174072068119A95CE0AAC0F98BE xmp.did:01801174072068119A95CE0AAC0F98BE
Xmp.xmpMM.OriginalDocumentID XmpText 40 xmp.did:01801174072068119A95CE0AAC0F98BE xmp.did:01801174072068119A95CE0AAC0F98BE
Xmp.xmpMM.History XmpText 0 type="Seq"
Xmp.xmpMM.History[1] XmpText 0 type="Struct"
Xmp.xmpMM.History[1]/stEvt:action XmpText 5 saved saved
Xmp.xmpMM.History[1]/stEvt:instanceID XmpText 40 xmp.iid:01801174072068119A95CE0AAC0F98BE xmp.iid:01801174072068119A95CE0AAC0F98BE
Xmp.xmpMM.History[1]/stEvt:when XmpText 25 2011-06-27T21:41:02+02:00 2011-06-27T21:41:02+02:00
Xmp.xmpMM.History[1]/stEvt:softwareAgent XmpText 29 Adobe Photoshop CS5 Macintosh Adobe Photoshop CS5 Macintosh
Xmp.xmpMM.History[1]/stEvt:changed XmpText 1 / /
Xmp.xmpMM.History[2] XmpText 0 type="Struct"
Xmp.xmpMM.History[2]/stEvt:action XmpText 9 converted converted
Xmp.xmpMM.History[2]/stEvt:parameters XmpText 50 from image/jpeg to application/vnd.adobe.photoshop from image/jpeg to application/vnd.adobe.photoshop
Xmp.xmpMM.History[3] XmpText 0 type="Struct"
Xmp.xmpMM.History[3]/stEvt:action XmpText 7 derived derived
Xmp.xmpMM.History[3]/stEvt:parameters XmpText 60 converted from image/jpeg to application/vnd.adobe.photoshop converted from image/jpeg to application/vnd.adobe.photoshop
Xmp.xmpMM.History[4] XmpText 0 type="Struct"
Xmp.xmpMM.History[4]/stEvt:action XmpText 5 saved saved
Xmp.xmpMM.History[4]/stEvt:instanceID XmpText 40 xmp.iid:02801174072068119A95CE0AAC0F98BE xmp.iid:02801174072068119A95CE0AAC0F98BE
Xmp.xmpMM.History[4]/stEvt:when XmpText 25 2011-06-27T21:41:02+02:00 2011-06-27T21:41:02+02:00
Xmp.xmpMM.History[4]/stEvt:softwareAgent XmpText 29 Adobe Photoshop CS5 Macintosh Adobe Photoshop CS5 Macintosh
Xmp.xmpMM.History[4]/stEvt:changed XmpText 1 / /
Xmp.xmpMM.DerivedFrom XmpText 0 type="Struct"
Xmp.xmpMM.DerivedFrom/stRef:instanceID XmpText 40 xmp.iid:01801174072068119A95CE0AAC0F98BE xmp.iid:01801174072068119A95CE0AAC0F98BE
Xmp.xmpMM.DerivedFrom/stRef:documentID XmpText 40 xmp.did:01801174072068119A95CE0AAC0F98BE xmp.did:01801174072068119A95CE0AAC0F98BE
Xmp.xmpMM.DerivedFrom/stRef:originalDocumentID XmpText 40 xmp.did:01801174072068119A95CE0AAC0F98BE xmp.did:01801174072068119A95CE0AAC0F98BE
29 changes: 29 additions & 0 deletions test/data/test_reference_files/2018-01-09-exiv2-crash-002.tiff.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Error: Directory Image: Next pointer is out of bounds; ignored.
Warning: Directory Image, entry 0xc300 has unknown Exif (TIFF) type 40448; setting type size 1.
Error: Directory Image, entry 0xc300 has invalid size 3231620766*1; skipping entry.
Warning: Directory Image, entry 0x9e9e has unknown Exif (TIFF) type 40606; setting type size 1.
Error: Directory Image, entry 0x9e9e has invalid size 2661195422*1; skipping entry.
Warning: Directory Image, entry 0x9e9e has unknown Exif (TIFF) type 40620; setting type size 1.
Error: Offset of directory Image, entry 0x9e9e is out of bounds: Offset = 0x02020200; truncating the entry
Warning: Directory Image, entry 0x1902 has unknown Exif (TIFF) type 0; setting type size 1.
Error: Offset of directory Image, entry 0x1902 is out of bounds: Offset = 0x02020203; truncating the entry
Warning: Directory Image, entry 0x02c4 has unknown Exif (TIFF) type 514; setting type size 1.
Warning: Directory Image, entry 0x0080 has unknown Exif (TIFF) type 8448; setting type size 1.
Error: Offset of directory Image, entry 0x0080 is out of bounds: Offset = 0x00004600; truncating the entry
Warning: Directory Image, entry 0x0000 has unknown Exif (TIFF) type 32768; setting type size 1.
Error: Offset of directory Image, entry 0x0000 is out of bounds: Offset = 0x11000003; truncating the entry
Error: Offset of directory Image, entry 0x0106 is out of bounds: Offset = 0x02f902ff; truncating the entry
Warning: Directory Image, entry 0x0000 has unknown Exif (TIFF) type 18761; setting type size 1.
Error: Offset of directory Image, entry 0x0000 is out of bounds: Offset = 0x00130000; truncating the entry
Warning: Directory Image, entry 0x0101 has unknown Exif (TIFF) type 64515; setting type size 1.
Error: Offset of directory Image, entry 0x0101 is out of bounds: Offset = 0x02011000; truncating the entry
Error: Offset of directory Image, entry 0x0f58 is out of bounds: Offset = 0xf1470004; truncating the entry
Exif.Image.ImageWidth Short 1 1728 1728
Exif.Image.ImageLength Short 1 0 0
Exif.Image.BitsPerSample Short 1 1 1
Exif.Image.Compression Short 1 3 T4/Group 3 Fax
Exif.Image.PhotometricInterpretation Short 1 0 White Is Zero
Exif.Image.FillOrder Short 1 2 2
Exif.Image.IPTCNAA Ascii 22  
Exif.Image.PhotometricInterpretation Short 0
Exif.Image.ImageLength 0xfc03 0
25 changes: 25 additions & 0 deletions test/data/test_reference_files/2018-01-09-exiv2-crash-003.tiff.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Error: Directory Image: Next pointer is out of bounds; ignored.
Error: Offset of directory Image, entry 0x0146 is out of bounds: Offset = 0xbb000002; truncating the entry
Error: Offset of directory Image, entry 0x83bb is out of bounds: Offset = 0x0000e120; truncating the entry
Error: Offset of directory Image, entry 0x0146 is out of bounds: Offset = 0x00000000; truncating the entry
Error: Offset of directory Image, entry 0x0146 is out of bounds: Offset = 0xbb000002; truncating the entry
Error: Offset of directory Image, entry 0x83c2 is out of bounds: Offset = 0xf4000121; truncating the entry
Error: Offset of directory Image, entry 0x0145 is out of bounds: Offset = 0x03000301; truncating the entry
Warning: Directory Image, entry 0x0100 has unknown Exif (TIFF) type 266; setting type size 1.
Error: Offset of directory Image, entry 0x0100 is out of bounds: Offset = 0x00030106; truncating the entry
Warning: Directory Image, entry 0x1000 has unknown Exif (TIFF) type 8192; setting type size 1.
Error: Directory Image, entry 0x1000 has invalid size 4110482176*1; skipping entry.
Warning: Directory Image, entry 0x271c has unknown Exif (TIFF) type 0; setting type size 1.
Error: Offset of directory Image, entry 0x271c is out of bounds: Offset = 0x0003010a; truncating the entry
Warning: Directory Image, entry 0x0a01 has unknown Exif (TIFF) type 0; setting type size 1.
Error: Directory Image, entry 0x0a01 has invalid size 268435458*1; skipping entry.
Exif.Image.ImageWidth SShort 1 1728 1728
Exif.Image.ImageLength Short 1 0 0
Exif.Image.BitsPerSample Short 1 1 1
Exif.Image.Compression Short 1 3 T4/Group 3 Fax
Exif.Image.PhotometricInterpretation Short 1 0 White Is Zero
Exif.Image.IPTCNAA Ascii 22
Exif.Image.IPTCNAA Ascii 0
Exif.Image.IPTCNAA Ascii 22
Exif.Image.TileByteCounts Rational 0
Exif.Image.ImageWidth 0x010a 0
Loading

0 comments on commit dc98528

Please sign in to comment.