Tcl Source Code

View Ticket
Login
Ticket UUID: bbe7c6ff9ee5e4d3e6d908f0d2c4833656079a4
Title: zipfs failures on MacOS with password protected zip files
Type: Bug Created on: 2023-09-21 10:34:41
Submitter: apnadkarni Assigned to: nobody
Subsystem: - New Builtin Commands Severity: Important
Priority: 5 Medium Last modified: 2023-09-21 10:59:18
Status: Open Closed by: nobody
Resolution: None Closed on:
Version: 8.7
Description:

github actions shows the following test failures but only for MacOS. Linux and Windows (both msvc and gcc) builds work fine. I don't have the means to debug on macos and visual inspection of the code does not show anything obvious.

Someone with a macos platform will need to take a look. For now disabling those tests for MacOS.

==== zipfs-mount-password-4 mount - verify uncompressed cipher readable with password FAILED
==== Contents of test case:

        zipfs mount [zippath test-password.zip] $defaultMountPoint password
        readbin [file join $defaultMountPoint cipher.bin]
    
---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: invalid CRC
    while executing
"open $path rb"
    (procedure "readbin" line 2)
    invoked from within
"readbin [file join $defaultMountPoint cipher.bin]"
    ("uplevel" body line 3)
    invoked from within
"uplevel 1 $script"
---- errorCode: TCL ZIPFS CRC_FAILED
==== zipfs-mount-password-4 FAILED



==== zipfs-mount-password-5 mount - verify compressed cipher readable with password FAILED
==== Contents of test case:

        zipfs mount [zippath test-password.zip] $defaultMountPoint password
        readbin [file join $defaultMountPoint cipher-deflate.bin]
    
---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: decompression error
    while executing
"open $path rb"
    (procedure "readbin" line 2)
    invoked from within
"readbin [file join $defaultMountPoint cipher-deflate.bin]"
    ("uplevel" body line 3)
    invoked from within
"uplevel 1 $script"
---- errorCode: TCL ZIPFS CORRUPT
==== zipfs-mount-password-5 FAILED



==== zipfs-password-read-cipher zipfs password read cipher FAILED
==== Contents of test case:

            set fd [open [file join $defaultMountPoint $filename]]
            gets $fd
        
---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: invalid CRC
    while executing
"open [file join $defaultMountPoint $filename]"
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $script"
---- errorCode: TCL ZIPFS CRC_FAILED
==== zipfs-password-read-cipher FAILED



==== zipfs-password-read-cipher-deflate zipfs password read cipher-deflate FAILED
==== Contents of test case:

            set fd [open [file join $defaultMountPoint $filename]]
            gets $fd
        
---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: decompression error
    while executing
"open [file join $defaultMountPoint $filename]"
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $script"
---- errorCode: TCL ZIPFS CORRUPT
==== zipfs-password-read-cipher-deflate FAILED
User Comments:
apnadkarni added on 2023-09-21 10:59:18:

One other note -

github actions show zipfs password failures for MacOS. Linux and Windows build fine. The configure log for MacOs shows

2:29 checking for building with zipfs... no

while it shows "yes" for Linux. This configure difference might be a red herring since the compile line itself shows -DHAVE_ZLIB and moreover, only those tests that require a password are failing.