ioCmd-8.{11,12,13} failures
Closed / Fixed460993ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 25 years ago
Descriptionplain2001-09-12 19:45:12
$ ./configure --disbale-shared
$ make tcltest
$ ./tcltest ../tests/ioCmd.test
==== iocmd-8.11 fconfigure command FAILED
==== Contents of test case:
list [catch {fconfigure stdout -froboz blarfo} msg]
$msg
---- Result was:
1 {bad option "-froboz": should be one of -blocking,
-buffering, -buffersize, -encoding, -eofchar,
-translation, or -mode}
---- Result should have been (exact matching):
1 {bad option "-froboz": should be one of -blocking,
-buffering, -buffersize, -encoding, -eofchar, or
-translation}
==== iocmd-8.11 FAILED
==== iocmd-8.12 fconfigure command FAILED
==== Contents of test case:
list [catch {fconfigure stdout -b blarfo} msg] $msg
---- Result was:
1 {bad option "-b": should be one of -blocking,
-buffering, -buffersize, -encoding, -eofchar,
-translation, or -mode}
---- Result should have been (exact matching):
1 {bad option "-b": should be one of -blocking,
-buffering, -buffersize, -encoding, -eofchar, or
-translation}
==== iocmd-8.12 FAILED
==== iocmd-8.13 fconfigure command FAILED
==== Contents of test case:
list [catch {fconfigure stdout -buffer blarfo} msg]
$msg
---- Result was:
1 {bad option "-buffer": should be one of -blocking,
-buffering, -buffersize, -encoding, -eofchar,
-translation, or -mode}
---- Result should have been (exact matching):
1 {bad option "-buffer": should be one of -blocking,
-buffering, -buffersize, -encoding, -eofchar, or
-translation}
==== iocmd-8.13 FAILED
ioCmd.test: Total 105 Passed 99 Skipped
3 Failed 3
Number of tests skipped for each constraint:
3 nonPortable
andreas_kupriesplain2001-09-13 02:54:46
Logged In: YES user_id=75003 I guess "--disbale-shared" is a typo in the report. This is against head ? "-mode" ... Isn't that one of the serial options ... And for "stdout" ... what does [fconfigure stdout] returns when used interactively ? Do the same failures happen when the whole testsuite is executed via 'make test' ? Note that 'make test' sets up a number of variables (ok, disable-shared makes most of them irrelevant, but not TCL_LIBRARY).
dgpplain2001-09-13 03:50:13
Logged In: YES
user_id=80530
Caught me. When I sanitize my Unix prompt, I only
partially cut & paste. Some parts I re-type (and
mis-type).
Yes, 8.4a4. Didn't check earlier versions.
$ ./tcltest
% fconfigure stdout
-blocking 1 -buffering line -buffersize 4096 -encoding
iso8859-1 -eofchar {} -translation crlf -mode 9600,s,7,2
No, the same errors do not occur in a normal 'make test',
nor in a 'make test TESTFLAGS="-singleProc 1"', though
in the latter case I don't know why.
They do show up when you stick a [tcltest::singleProcess 1]
in test/all.tcl before the [runAllTests] call.
I see the same reported error on both Linux and Solaris.
andreas_kupriesplain2001-09-13 03:55:51
Logged In: YES user_id=75003 I suspect the following: In the multi-process case stdin/out/err of the subshell are connected to the main test driver via pipes => no tty, not serial => no "-mode". In the single-process case the stdout reported on is the stdout of the main and only tcltest, connected to the terminal you used to start the testsuite. This is a tty, hence we have serial options in the output of configure ... Do I make sense ?
dgpplain2001-09-13 03:58:13
Logged In: YES user_id=80530 Except for the TESTFLAGS="-singleProc 1" anamoly, yes you make sense.
andreas_kupriesplain2001-09-13 04:08:43
Logged In: YES user_id=75003 So, one possible solution would be to strip out the -mode out of the result (msg) before returning it to the test framework. Alternative: Create a standard result string using [fconfigure stdout] and use that to compose the expected results for the tests ... The alternative seems to me to be the better solution. As for the anomaly maybe -singleProc 1 is not handled correctly. Wasn't there another bug of yours which reported this ?
dgpplain2001-09-13 04:13:22
Logged In: YES user_id=80530 I also prefer your alternative. Bug 461000 also reports trouble with the [tcltest::singleProcess] command, but it doesn't explain this, I don't think. Test ioCmd-8.* do not reference the singleTestInterp constraint.
andreas_kupriesplain2001-09-13 04:35:28
File Added - 10716: 460993.diff Logged In: YES user_id=75003 Here is the patch.
dkfplain2001-09-13 15:59:08
Logged In: YES user_id=79902 I agree completely with the analysis. Perhaps it would be better to create and open a temporary file and then perform these [fconfigure] tests on that? It has to be a temporary file since we can't easily guarantee what the correct list of options will be on any pre-existing resource in the system (e.g. we might add things for pipes, named pipes, unix-domain sockets, selected devices, etc. in the future.)
andreas_kupriesplain2001-09-13 23:55:40
Logged In: YES user_id=75003 I will try that and post an alternate patch.
andreas_kupriesplain2001-09-14 00:06:10
File Added - 10746: 460993-alt.diff Logged In: YES user_id=75003 Here is the alternate patch. I like it better than the original one. Less hackish.
dgpplain2001-09-14 01:43:11
Logged In: YES user_id=80530 Latest patch is an effective fix and looks fine to me.
andreas_kupriesplain2001-09-14 02:11:14
Logged In: YES user_id=75003 Committed the alternate patch to head and core-8-3-1-branch.
Log in (anonymous is fine) to add a comment.
Attachments:
- 460993-alt.diff [download] added by andreas_kupries on 2001-09-14 00:06:10. [details]
- 460993.diff [download] added by andreas_kupries on 2001-09-13 04:35:28. [details]