Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: ae076c9da143508aaa5836a5ab5ba4a8ee084dca692ab1831edf980fef8f0491
Ticket: f68a8fcab83f0f731a6005bc5150a6fe10849f0e
safe-stock.test errors
User & Date: griffin on 2024-03-23 20:32:30
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-plain"
  4. comment changed to:
    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
    
  5. foundin changed to: "main"
  6. is_private changed to: "0"
  7. login: "griffin"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "21780c4e03cc5884af69addd6efc1b71c50d9818"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "griffin"
  14. subsystem changed to: "- New Builtin Commands"
  15. title changed to: "safe-stock.test errors"
  16. type changed to: "Bug"