Bug 15421

Summary: AB-INT PTEST: tcl ptest failure: in chanio.test
Product: [QA/Testing] Package Testing (ptest) Reporter: João Marcos Costa <joaomarcos.costa>
Component: ptestAssignee: Ross Burton <ross.burton>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: randy.macleod, ross.burton
Version: unspecified   
Target Milestone: 5.99   
Hardware: x86   
OS: Multiple   
Whiteboard: AB-INT
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description João Marcos Costa 2024-03-06 13:06:51 UTC
https://autobuilder.yoctoproject.org/typhoon/#/builders/81/builds/6359/steps/12/logs/stdio

qemux86-64-ptest fedora38-ty-4

Failed ptests:
{'tcl': ['chanio.test']}
Comment 1 Ross Burton 2024-03-07 15:45:40 UTC
==== chan-io-46.1 Tcl event loop vs multiple interpreters FAILED
==== Contents of test case:

    testfevent create
    set script "set f \[[list open $path(foo) r]]\n"
    append script {
        set x "no event"
        chan event $f readable [namespace code {
            set x "f triggered: [chan gets $f]"
            chan event $f readable {}
        }]
    }
    set timer [after 10 lappend x timeout]
    testfevent cmd $script
    vwait x
    after cancel $timer
    testfevent cmd {chan close $f}
    list [testfevent cmd {set x}] [testfevent cmd {info commands after}]

---- Result was:
{no event} after
---- Result should have been (exact matching):
{f triggered: foo bar} after
==== chan-io-46.1 FAILED

Looks like a classic very small timeout.
Comment 2 Ross Burton 2024-03-21 20:12:19 UTC
Patch on the list.
Comment 3 Randy MacLeod 2024-04-24 20:30:25 UTC
Bulk move from 5.0* to 5.99 to indicate that there isn't any one available to work on this issue.
Comment 4 João Marcos Costa 2024-07-10 10:15:14 UTC
https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/6602/steps/13/logs/stdio

qemuarm64-ptest ubuntu1804-arm-1
Comment 5 João Marcos Costa 2024-07-22 08:32:57 UTC
https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/6652/steps/12/logs/stdio

qemuarm64-ptest ubuntu2204-arm-1
Comment 6 Ross Burton 2024-10-14 12:19:01 UTC
Fixed with 1617b98491c5293567674e4b9c49c2017fb5c8b2.
Comment 7 Ross Burton 2024-10-17 15:09:18 UTC
Actually closing.
Comment 8 João Marcos Costa 2025-02-07 11:26:51 UTC
Hello,

This failure happened again:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/680/steps/12/logs/stdio

qemux86-64-ptest

==== chan-io-13.6 TranslateInputEOL: auto mode: saw cr in last segment FAILED
==== Contents of test case:

    # (chanPtr->flags & INPUT_SAW_CR)
    # This test may fail on slower machines.
    set f [openpipe w+ $path(cat)]
    chan configure $f -blocking 0 -buffering none -translation {auto lf}
    chan event $f read [namespace code {
	lappend x [chan read $f] [testchannel queuedcr $f]
    }]
    chan puts -nonewline $f "abcdefghj\r"
    after 500 [namespace code {set y ok}]
    vwait [namespace which -variable y]
    chan puts -nonewline $f "\n01234"
    after 500 [namespace code {set y ok}]
    vwait [namespace which -variable y]
    return $x

---- Result was:
{abcdefghj
01234} 0
---- Result should have been (exact matching):
{abcdefghj
} 1 01234 0
==== chan-io-13.6 FAILED


Reopening.
Comment 9 Ross Burton 2025-08-25 08:38:34 UTC
Got a patch, will sent when I have email that works.
Comment 10 Ross Burton 2025-09-11 15:10:00 UTC
Fixed in oe-core e7686fbfb2cb630b33edce48bf1982044d0bf3ea.