OpenColorIO icon indicating copy to clipboard operation
OpenColorIO copied to clipboard

OCIOArchive unit test failing on minizip-bng 4.0.10

Open remia opened this issue 7 months ago • 2 comments

While building OCIO with the dependencies from up to date brew, I'm noticing new unit test failures related to OCIOArchive, specifically when extracting the Windows test archive.

FAILED: exception thrown from procConfigFromExtractedArchive = configFromExtractedArchive->getProcessor( "plain_lut1_cs", "shot1_lut1_cs" ): "The specified file reference 'shot1/lut1.clf' could not be located. The following attempts were made: '/tmp/OCIOTestTemp_context_test1/shot4/shot1/lut1.clf' : '/tmp/OCIOTestTemp_context_test1/shot1/shot1/lut1.clf' : '/tmp/OCIOTestTemp_context_test1/shot2/shot1/lut1.clf' : '/tmp/OCIOTestTemp_context_test1/shot3/shot1/lut1.clf' : '/tmp/OCIOTestTemp_context_test1/shot3/subdir/shot1/lut1.clf' : '/tmp/OCIOTestTemp_context_test1/shot1/lut1.clf'."

My understanding is that with this new minizip-ng version, backward compatibility with archives made from Windows with minzip version less than 3.0.7 is no longer maintained. Starting from 3.0.7, Windows backslash path separators are converted to forward (https://github.com/zlib-ng/minizip-ng/pull/644) and since version 4.0.10, the extracting code no longer consider backslash as a folder separator by default on Unix (https://github.com/zlib-ng/minizip-ng/pull/834). In the unit test failure, I can indeed see that we have files containing backslashes in their names being extracted, instead of producing folders, like macOS unzipper do from the Finder.app for example.

Simple fix would be to update our test Windows archive I guess, I'm not sure if people have been making .ocioz archive from Windows but these might eventually break in the current state of things.

remia avatar May 05 '25 19:05 remia

We bumped into the same issue when building the package for Alpine Linux:

======================================================================
ERROR: test_extract_config_and_compare_to_original (OCIOZArchiveTest.ArchiveAndExtractComparison.test_extract_config_and_compare_to_original)
Extract an OCIOZ archive that came from config X and create a new Config object Y with it,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ncopa/aports/community/opencolorio/src/OpenColorIO-2.4.2/tests/python/OCIOZArchiveTest.py", line 395, in test_extract_config_and_compare_to_original
    new_proc = new_config.getProcessor("plain_lut1_cs", "shot1_lut1_cs")
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PyOpenColorIO.PyOpenColorIO.ExceptionMissingFile: The specified file reference 'shot1/lut1.clf' could not be located. The following attempts were made: '/tmp/tmptngq5ali/shot4/shot1/lut1.clf' : '/tmp/tmptngq5ali/shot1/shot1/lut1.clf' : '/tmp/tmptngq5ali/shot2/shot1/lut1.clf' : '/tmp/tmptngq5ali/shot3/shot1/lut1.clf' : '/tmp/tmptngq5ali/shot3/subdir/shot1/lut1.clf' : '/tmp/tmptngq5ali/shot1/lut1.clf'.

----------------------------------------------------------------------
Ran 371 tests in 0.937s

FAILED (errors=1)


0% tests passed, 1 tests failed out of 1

Total Test time (real) =   1.13 sec

The following tests FAILED:
	  1 - test_python (Failed)
Errors while running CTest
ninja: job failed: cd /home/ncopa/aports/community/opencolorio/src/OpenColorIO-2.4.2/build && /usr/bin/ctest --force-new-ctest-process
ninja: subcommand failed

ncopa avatar May 22 '25 16:05 ncopa

We're finding the same in NixOS.

risicle avatar Jun 05 '25 20:06 risicle

This will be addressed by PR #2192.

Note that OCIOZ files created on Windows in OCIO 2.4.2 or earlier will need to be regenerated in order to work on other platforms due to a breaking change in minizip-ng 4 behavior.

doug-walker avatar Sep 22 '25 21:09 doug-walker