Skip to content

Add regression test - #9397

Open
kevinbackhouse wants to merge 2 commits into
Exiv2:mainfrom
kevinbackhouse:pr-9320-test
Open

Add regression test#9397
kevinbackhouse wants to merge 2 commits into
Exiv2:mainfrom
kevinbackhouse:pr-9320-test

Conversation

@kevinbackhouse

Copy link
Copy Markdown
Collaborator

Add a regression test for #9320

@kevinbackhouse

Copy link
Copy Markdown
Collaborator Author

@mergify backport 0.28.x

@mergify

mergify Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

backport 0.28.x

🟠 Waiting for conditions to match

Details
  • merged [📌 backport requirement]

@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.51%. Comparing base (feb9468) to head (03142c9).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9397      +/-   ##
==========================================
+ Coverage   65.48%   65.51%   +0.02%     
==========================================
  Files         116      116              
  Lines       21534    21535       +1     
  Branches    10712    10712              
==========================================
+ Hits        14102    14108       +6     
+ Misses       5141     5134       -7     
- Partials     2291     2293       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kevinbackhouse
kevinbackhouse marked this pull request as ready for review July 25, 2026 15:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds regression coverage for the Canon MakerNote std::stoul exception-handling fix introduced in PR #9320, ensuring exiv2 -pa output remains stable and does not crash on crafted non-numeric Canon SerialNumber values.

Changes:

  • Added a new system test that prints Exif.Canon.SerialNumber from pr_9320.jpg and asserts clean execution/output.
  • Added a reference -pa output file for pr_9320.jpg under test_reference_files.
Show a summary per file
File Description
tests/bugfixes/github/test_pr_9320.py New regression test covering exiv2 -pa -K Exif.Canon.SerialNumber for PR #9320.
test/data/test_reference_files/pr_9320.jpg.out Adds the expected -pa reference output for the pr_9320.jpg fixture.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/3 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment on lines +3 to +5
import system_tests

class TestCanonException0x000c(metaclass=system_tests.CaseMeta):
kmilos
kmilos previously approved these changes Jul 27, 2026
@mergify

mergify Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 2/3 changed files
  • Comments generated: 5
  • Review effort level: Low

Comment on lines +6 to +8
class TestCanonException0x000c(metaclass=system_tests.CaseMeta):
"""Regression test for this PR: pr_9320.jpg"""
url = "https://github.com/Exiv2/exiv2/pull/9320"
Comment on lines +11 to +16
commands = [
"$exiv2 -pa -K Exif.Canon.SerialNumber $filename",
]
stdout = [
"Exif.Canon.SerialNumber Ascii 6 bogus\n",
]
@@ -0,0 +1,118 @@
Exif.Image.Make Ascii 6 Canon Canon
Exif.CanonSi.BulbDuration Short 1 0 0
Exif.Canon.ImageType Ascii 32 IMG:EOS D30 JPEG IMG:EOS D30 JPEG
Exif.Canon.FirmwareVersion Ascii 24 Firmware Version Alpha Firmware Version Alpha
Exif.Canon.SerialNumber Ascii 6 bogus bogus
Exif.Thumbnail.YResolution Rational 1 180/1 180
Exif.Thumbnail.ResolutionUnit Short 1 2 inch
Exif.Thumbnail.JPEGInterchangeFormat Long 1 1652 1652
Exif.Thumbnail.JPEGInterchangeFormatLength Long 1 13824 13824
@mergify
mergify Bot dismissed kmilos’s stale review July 27, 2026 14:26

Pull request has been modified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants