*BSD News Article 70328


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.mel.connect.com.au!news.mira.net.au!vic.news.telstra.net!act.news.telstra.net!psgrain!iafrica.com!pipex-sa.net!plug.news.pipex.net!pipex!weld.news.pipex.net!pipex!hole.news.pipex.net!pipex!tube.news.pipex.net!pipex!lade.news.pipex.net!pipex!news.be.innet.net!bofh.dot!INbe.net!news.nl.innet.net!INnl.net!hunter.premier.net!news.mathworks.com!newsfeed.internetmci.com!news.wwa.com!
news
From: najam@ingersoll.com (Haroon Najam)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: tcl on FreeBSD problems?
Date: 6 Jun 1996 16:30:58 GMT
Organization: Ingersoll Milling Machine Company
Lines: 150
Message-ID: <4p7142$9lf@kirin.wwa.com>
Reply-To: najam@ingersoll.com
NNTP-Posting-Host: pool1-002.rkfd.wwa.com
CC: najam@ingersoll.com
X-Newsreader: News X1.0-34 (Win32)

Hello All,
	I compiled tcl7.5 on FreeBSD2.0. A few tests related to event 
handling fail. I'm including the  error messages generated by
the test script.
	From what i've been able to deduce, file write events are being 
reported as read events, as you can see from the results. These 
procs are implemented using pipe(2). If pipe(2) wasn't working 
properly on FreeBSD2.0, I don't believe I would've been able to
get it do anything at all, let alone compile tcl. So it must be
a bug in tcl's implementation. Maybe ??
	Can somebody please help me. Thanks in advance.
Anyway here are the error messages:
---------------------------------------------------------------------------------------------------

==== event-1.3 Tcl_DeleteFileHandler
==== Contents of test case:

    testfilehandler close
    testfilehandler create 2 disabled disabled
    testfilehandler create 1 readable writable
    testfilehandler create 0 disabled disabled
    testfilehandler fillpartial 1
    set result ""
    testfilehandler oneevent
    lappend result [testfilehandler counts 1]
    testfilehandler oneevent
    lappend result [testfilehandler counts 1]
    testfilehandler oneevent
    lappend result [testfilehandler counts 1]
    testfilehandler create 1 off off
    testfilehandler oneevent
    lappend result [testfilehandler counts 1]
    testfilehandler close
    set result
    
==== Result was:
{1 0} {2 0} {3 0} {0 0}
---- Result should have been:
{0 1} {1 1} {1 2} {0 0}
---- event-1.3 FAILED


==== event-2.1 Tcl_DeleteFileHandler
==== Contents of test case:

    testfilehandler close
    testfilehandler create 2 disabled disabled
    testfilehandler create 1 readable writable
    testfilehandler fillpartial 1
    set result ""
    testfilehandler oneevent
    lappend result [testfilehandler counts 1]
    testfilehandler oneevent
    lappend result [testfilehandler counts 1]
    testfilehandler oneevent
    lappend result [testfilehandler counts 1]
    testfilehandler create 1 off off
    testfilehandler oneevent
    lappend result [testfilehandler counts 1]
    testfilehandler close
    set result
    
==== Result was:
{1 0} {2 0} {3 0} {0 0}
---- Result should have been:
{0 1} {1 1} {1 2} {0 0}
---- event-2.1 FAILED


==== event-2.2 Tcl_DeleteFileHandler, fd reused & events still pending
==== Contents of test case:

    testfilehandler close
    testfilehandler create 0 readable writable
    testfilehandler fillpartial 0
    set result ""
    testfilehandler oneevent
    lappend result [testfilehandler counts 0]
    testfilehandler close
    testfilehandler create 0 readable writable
    testfilehandler oneevent
    lappend result [testfilehandler counts 0]
    testfilehandler close
    set result
    
==== Result was:
{1 0} {0 1}
---- Result should have been:
{0 1} {0 0}
---- event-2.2 FAILED


==== event-4.1 FileHandlerEventProc, race between event and disabling 
==== Contents of test case:

    testfilehandler close
    testfilehandler create 2 disabled disabled
    testfilehandler create 1 readable writable
    testfilehandler fillpartial 1
    set result ""
    testfilehandler oneevent
    lappend result [testfilehandler counts 1]
    testfilehandler oneevent
    lappend result [testfilehandler counts 1]
    testfilehandler oneevent
    lappend result [testfilehandler counts 1]
    testfilehandler create 1 disabled disabled
    testfilehandler oneevent
    lappend result [testfilehandler counts 1]
    testfilehandler close
    set result
    
==== Result was:
{1 0} {2 0} {3 0} {0 0}
---- Result should have been:
{0 1} {1 1} {1 2} {0 0}
---- event-4.1 FAILED


==== event-4.2 FileHandlerEventProc, TCL_FILE_EVENTS off 
==== Contents of test case:

    testfilehandler close
    testfilehandler create 1 readable writable
    testfilehandler create 2 readable writable
    testfilehandler fillpartial 1
    testfilehandler fillpartial 2
    testfilehandler oneevent
    set result ""
    lappend result [testfilehandler counts 1] [testfilehandler counts 
2]
    testfilehandler windowevent
    lappend result [testfilehandler counts 1] [testfilehandler counts 
2]
    testfilehandler close
    set result
    
==== Result was:
{0 0} {1 0} {0 0} {1 0}
---- Result should have been:
{0 0} {0 1} {0 0} {0 1}
---- event-4.2 FAILED

-------------------------------------------------------------------------------------------------------


-Haroon Najam
Ingersoll Milling Machine Company
najam@ingersoll.com