View Ticket
Not logged in
2024-03-24
00:28 Closed ticket [f68a8fcab8]: safe-stock.test errors plus 8 other changes artifact: fc7b6c2035 user: griffin
2024-03-23
20:32 New ticket [f68a8fcab8]. artifact: ae076c9da1 user: griffin

Ticket UUID: f68a8fcab83f0f731a6005bc5150a6fe10849f0e
Title: safe-stock.test errors
Type: Bug Version: main
Submitter: griffin Created on: 2024-03-23 20:32:30
Subsystem: 69. Other Assigned To: griffin
Priority: 5 Medium Severity: Important
Status: Closed Last Modified: 2024-03-24 00:28:07
Resolution: Invalid Closed By: griffin
    Closed on: 2024-03-24 00:28:07
Description:
I'm getting the following 3 failing tests on linux. The same tests pass on MacOS. I haven't been able to determine if it's something in my setup, or a real problem.

safe-stock.test


==== safe-stock-7.4 tests specific path and positive search with conventional AutoPathSync, use pkg opt FAILED
==== Contents of test case:

    set i [safe::interpCreate -nostat -nested 1 -accessPath [list [info library]]]
    # should not add anything (p0)
    set token1 [safe::interpAddToAccessPath $i [info library]]
    # should add as p* (not p1 if parent has a module path)
    set token2 [safe::interpAddToAccessPath $i [file join [info library] $pkgOptDir]]
    set confA [safe::interpConfigure $i]
    set mappA [mapList $PathMapp [dict get $confA -accessPath]]
    # this time, unlike test safe-stock-7.2, opt should be found
    list $token1 $token2 --  [catch {interp eval $i {package require opt}} msg] $msg --  $mappA -- [safe::interpDelete $i]
    # Note that the glob match elides directories (those from the module path)
    # other than the first and last in the access path.

---- Result was:
{$p(:0:)} {$p(:5:)} -- 1 {permission denied} -- {TCLLIB /home/briang42/tcl_core/tcl/lib/tcl9/site-tcl /home/briang42/tcl_core/tcl/lib/tcl9/9.0 //zipfs:/lib/tcl/tcl9/site-tcl //zipfs:/lib/tcl/tcl9/9.0 TCLLIB/OPTDIR} -- {}
---- Result should have been (glob matching):
{$p(:0:)} {$p(:*:)} -- 0 0.4.* -- {TCLLIB * TCLLIB/OPTDIR} -- {}
==== safe-stock-7.4 FAILED



==== safe-stock-9.11 interpConfigure change the access path; pkgIndex.tcl packages unaffected by token rearrangement with conventional AutoPathSync, uses pkg opt and tcl::idna FAILED
==== Contents of test case:

    set i [safe::interpCreate -accessPath [list $tcl_library  [file join $tcl_library $pkgOptDir]  [file join $tcl_library $pkgJarDir]]]
    # Inspect.
    set confA [safe::interpConfigure $i]
    set mappA [mapList $PathMapp [dict get $confA -accessPath]]
    set path1 [::safe::interpFindInAccessPath $i [file join $tcl_library $pkgOptDir]]
    set path2 [::safe::interpFindInAccessPath $i [file join $tcl_library $pkgJarDir]]

    # Load pkgIndex.tcl data.
    catch {interp eval $i {package require NOEXIST}}

    # Rearrange access path.  Swap tokens {$p(:1:)} and {$p(:2:)}.
    # This has no effect because the records in Pkg of these directories were from access as children of {$p(:0:)}.
    safe::interpConfigure $i -accessPath [list $tcl_library  [file join $tcl_library $pkgJarDir]  [file join $tcl_library $pkgOptDir]]
    # Inspect.
    set confB [safe::interpConfigure $i]
    set mappB [mapList $PathMapp [dict get $confB -accessPath]]
    set path3 [::safe::interpFindInAccessPath $i [file join $tcl_library $pkgOptDir]]
    set path4 [::safe::interpFindInAccessPath $i [file join $tcl_library $pkgJarDir]]

    # Try to load the packages and run a command from each one.
    set code3 [catch {interp eval $i {package require tcl::idna}} msg3]
    set code4 [catch {interp eval $i {package require opt}} msg4]
    set code5 [catch {interp eval $i {::tcl::Lempty {a list}}} msg5]
    set code6 [catch {interp eval $i {::tcl::idna::IDNAencode example.com}} msg6]

    list $path1 $path2 -- $path3 $path4 -- $code3 $msg3 $code4 $msg4 --  $mappA -- $mappB -- $code5 $msg5 $code6 $msg6

---- Result was:
{$p(:1:)} {$p(:2:)} -- {$p(:2:)} {$p(:1:)} -- 0 1.0.1 1 {permission denied} -- {TCLLIB TCLLIB/OPTDIR TCLLIB/JARDIR /home/briang42/tcl_core/tcl/lib/tcl9/site-tcl /home/briang42/tcl_core/tcl/lib/tcl9/9.0 //zipfs:/lib/tcl/tcl9/site-tcl //zipfs:/lib/tcl/tcl9/9.0} -- {TCLLIB TCLLIB/JARDIR TCLLIB/OPTDIR /home/briang42/tcl_core/tcl/lib/tcl9/site-tcl /home/briang42/tcl_core/tcl/lib/tcl9/9.0 //zipfs:/lib/tcl/tcl9/site-tcl //zipfs:/lib/tcl/tcl9/9.0} -- 1 {invalid command name "::tcl::Lempty"} 0 example.com
---- Result should have been (glob matching):
{$p(:1:)} {$p(:2:)} -- {$p(:2:)} {$p(:1:)} -- 0 1.* 0 0.4.* -- {TCLLIB TCLLIB/OPTDIR TCLLIB/JARDIR*} -- {TCLLIB TCLLIB/JARDIR TCLLIB/OPTDIR*} -- 0 0 0 example.com
==== safe-stock-9.11 FAILED



==== safe-stock-18.4 cf. safe-stock-7.4opt - tests specific path and positive search and auto_path without conventional AutoPathSync, use pkg opt FAILED
==== Contents of test case:

    set i [safe::interpCreate -nostat -nested 1 -accessPath [list [info library]]]

    # should not have been set by Safe Base:
    set auto1 [interp eval $i {set ::auto_path}]

    # This will differ from the value -autoPath {}
    interp eval $i {set ::auto_path [list {$p(:0:)}]}

    # should not add anything (p0)
    set token1 [safe::interpAddToAccessPath $i [info library]]

    # should add as p* (not p1 if parent has a module path)
    set token2 [safe::interpAddToAccessPath $i [file join [info library] $pkgOptDir]]

    # should not have been changed by Safe Base:
    set auto2 [interp eval $i {set ::auto_path}]

    # This time, unlike test safe-stock-18.2opt and the try above, opt should be found:
    list $auto1 $auto2 $token1 $token2  [catch {interp eval $i {package require opt}} msg] $msg  [safe::interpConfigure $i] [safe::interpDelete $i]

---- Result was:
{} {{$p(:0:)}} {$p(:0:)} {$p(:5:)} 1 {permission denied} {-accessPath {//zipfs:/lib/tcl/tcl_library /home/briang42/tcl_core/tcl/lib/tcl9/site-tcl /home/briang42/tcl_core/tcl/lib/tcl9/9.0 //zipfs:/lib/tcl/tcl9/site-tcl //zipfs:/lib/tcl/tcl9/9.0 //zipfs:/lib/tcl/tcl_library/opt0.4} -statics 0 -nested 1 -deleteHook {} -autoPath {}} {}
---- Result should have been (glob matching):
{} {{$p(:0:)}} {$p(:0:)} {$p(:*:)} 0 0.4.* {-accessPath {//zipfs:/lib/tcl/tcl_library *//zipfs:/lib/tcl/tcl_library/opt0.4} -statics 0 -nested 1 -deleteHook {} -autoPath {}} {}
==== safe-stock-18.4 FAILED

safe-stock86.test
safe-zipfs.test
safe.test
User Comments: griffin added on 2024-03-24 00:28:07:
Never mind. 
I've determined that this was caused by several files that where removed
from the repository, but somehow remained in my checkout, and fossil just
ignored them. However, the build process did not ignore them.
Starting over with a new, pristine checkout, solved the problem. 
I'm just not sure how this happened.