Skip to content

Add some tests for the JBIG2 js decoder#20552

Merged
calixteman merged 1 commit intomozilla:masterfrom
calixteman:issue20529
Jan 9, 2026
Merged

Add some tests for the JBIG2 js decoder#20552
calixteman merged 1 commit intomozilla:masterfrom
calixteman:issue20529

Conversation

@calixteman
Copy link
Contributor

It fixes #20529.

The files come from:
https://github.com/SerenityOS/serenity/tree/master/Tests/LibGfx/test-inputs/jbig2/

Thank you to Nico Weber for offering these test files.

Copy link
Contributor

@timvandermeij timvandermeij left a comment

Choose a reason for hiding this comment

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

r=me, with the merge conflict fixed and passing tests. This should cover the JBIG2 JS decoder very well, so this is nice!

@timvandermeij
Copy link
Contributor

/botio test

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_test from @timvandermeij received. Current queue size: 0

Live output at: http://54.241.84.105:8877/1c050af74528539/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_test from @timvandermeij received. Current queue size: 0

Live output at: http://54.193.163.58:8877/e682d6356c4b7dc/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/1c050af74528539/output.txt

Total script time: 0.22 mins

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/e682d6356c4b7dc/output.txt

Total script time: 0.44 mins

@calixteman
Copy link
Contributor Author

/botio test

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_test from @calixteman received. Current queue size: 1

Live output at: http://54.241.84.105:8877/7c4081769f20ae8/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_test from @calixteman received. Current queue size: 1

Live output at: http://54.193.163.58:8877/4cd99bb737ec60f/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/7c4081769f20ae8/output.txt

Total script time: 60.00 mins

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/4cd99bb737ec60f/output.txt

Total script time: 82.62 mins

  • Unit tests: FAILED
  • Integration Tests: Passed
  • Regression tests: FAILED
  errors: 73
  different ref/snapshot: 1

Image differences available at: http://54.193.163.58:8877/4cd99bb737ec60f/reftest-analyzer.html#web=eq.log

@calixteman calixteman force-pushed the issue20529 branch 2 times, most recently from 67b52f0 to 81333a7 Compare January 7, 2026 13:35
@calixteman
Copy link
Contributor Author

/botio browsertest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_browsertest from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/360c133af499956/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_browsertest from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/6e85ae243f72ad9/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/360c133af499956/output.txt

Total script time: 18.85 mins

  • Regression tests: FAILED
  errors: 2
  different ref/snapshot: 1

Image differences available at: http://54.241.84.105:8877/360c133af499956/reftest-analyzer.html#web=eq.log

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/6e85ae243f72ad9/output.txt

Total script time: 34.33 mins

  • Regression tests: FAILED
  errors: 2
  different ref/snapshot: 1

Image differences available at: http://54.193.163.58:8877/6e85ae243f72ad9/reftest-analyzer.html#web=eq.log

@timvandermeij
Copy link
Contributor

The source of the two reported errors is:

TEST-UNEXPECTED-FAIL | test failed jbig2_bitmap_symbol_manyrefs | in firefox | page1 round 1 | The "pdfs/bitmap-symbol-manyrefs.pdf" file is identical to the previously used "pdfs/issue20439.pdf" file.
TEST-UNEXPECTED-FAIL | test failed jbig2_bitmap | in firefox | page1 round 1 | The "pdfs/bitmap.pdf" file is identical to the previously used "pdfs/bitmap-randomaccess.pdf" file.

We should remove one of the two files for both cases I guess.

@calixteman
Copy link
Contributor Author

/botio browsertest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_browsertest from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/b07a88971002787/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_browsertest from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/0557b36d9050768/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/b07a88971002787/output.txt

Total script time: 19.11 mins

  • Regression tests: FAILED
  different ref/snapshot: 1

Image differences available at: http://54.241.84.105:8877/b07a88971002787/reftest-analyzer.html#web=eq.log

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/0557b36d9050768/output.txt

Total script time: 34.18 mins

  • Regression tests: FAILED
  different ref/snapshot: 1

Image differences available at: http://54.193.163.58:8877/0557b36d9050768/reftest-analyzer.html#web=eq.log

@calixteman calixteman merged commit 6f5d5ac into mozilla:master Jan 9, 2026
8 checks passed
@calixteman
Copy link
Contributor Author

/botio makeref

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_makeref from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/addc6f2851d942e/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_makeref from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/7217971a2d45657/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/addc6f2851d942e/output.txt

Total script time: 18.94 mins

  • Make references: Passed
  • Check references: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/7217971a2d45657/output.txt

Total script time: 34.49 mins

  • Make references: Passed
  • Check references: Passed

@nico
Copy link

nico commented Jan 30, 2026

Very cool, thanks for merging! Sorry for the late reply, but two comments:

  1. There was also a bitmap.pdf I think. I'm guessing you did git add bitmap-*.pdf instead of bitmap*.pdf (…but bitmap.pdf tests a very basic case that's really included in the other test cases, so it's not a big loss) (addressed by Add some tests for the JBIG2 js decoder #20552 (comment))
  2. pdf.js cannot render quite a few of these correctly (e.g. bitmap-symbol-symhuffrefineone.pdf). I see you added a code skip-because-failing, but it's only used for a file where pdf.js hangs ([Bug]: pdf.js busy-loops forever on JBIG2 image that uses the symbol dictionary context retain/reuse feature #20461), not for the ones where output is incorrect. Are the incorrectly rendering files tracked somewhere? (I don't know how test_manifest.json works – is "md5" the hash of the expected output? If so, I would've expected all files that are rendered correctly to have the same md5, but no two tests have the same hash. And pdf.js does render most of them right…)

@nico
Copy link

nico commented Feb 4, 2026

@calixteman ^ :)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jbig2 test suite donation

4 participants