| Ticket UUID: | 1272730 | |||
| Title: | asn - failed tests with Tcl 8.5 | |||
| Type: | Bug | Version: | None | |
| Submitter: | dgp | Created on: | 2005-08-25 16:45:10 | |
| Subsystem: | asn | Assigned To: | dgp | |
| Priority: | 5 Medium | Severity: | ||
| Status: | Closed | Last Modified: | 2005-08-27 03:09:23 | |
| Resolution: | Invalid | Closed By: | dgp | |
| Closed on: | 2005-08-26 20:09:23 | |||
| Description: |
With HEAD (Tcl 8.5a4):
tclsh8.5 sak.tcl test asn
shows failures on Solaris:
==== asn-2.19 integer FAILED
==== Contents of test case:
binary scan [asn::asnInteger $i] H* result
list $i [string toupper $result]
---- Result was:
8388608 02050000800000
---- Result should have been (exact matching):
8388608 020400800000
==== asn-2.19 FAILED
==== asn-4.19 enum FAILED
==== Contents of test case:
binary scan [asn::asnEnumeration $i] H* result
list $i [string toupper $result]
---- Result was:
8388608 0A050000800000
---- Result should have been (exact matching):
8388608 0A0400800000
==== asn-4.19 FAILED
==== asn-2.20 integer FAILED
==== Contents of test case:
binary scan [asn::asnInteger $i] H* result
list $i [string toupper $result]
---- Result was:
8388609 02050000800001
---- Result should have been (exact matching):
8388609 020400800001
==== asn-2.20 FAILED
==== asn-4.20 enum FAILED
==== Contents of test case:
binary scan [asn::asnEnumeration $i] H* result
list $i [string toupper $result]
---- Result was:
8388609 0A050000800001
---- Result should have been (exact matching):
8388609 0A0400800001
==== asn-4.20 FAILED
==== asn-2.21 integer FAILED
==== Contents of test case:
binary scan [asn::asnInteger $i] H* result
list $i [string toupper $result]
---- Result was:
16777216 02050001000000
---- Result should have been (exact matching):
16777216 020401000000
==== asn-2.21 FAILED
==== asn-4.21 enum FAILED
==== Contents of test case:
binary scan [asn::asnEnumeration $i] H* result
list $i [string toupper $result]
---- Result was:
16777216 0A050001000000
---- Result should have been (exact matching):
16777216 0A0401000000
==== asn-4.21 FAILED
==== asn-2.24 integer FAILED
==== Contents of test case:
binary scan [asn::asnInteger $i] H* result
list $i [string toupper $result]
---- Result was:
-8388609 0205FFFF7FFFFF
---- Result should have been (exact matching):
-8388609 0204FF7FFFFF
==== asn-2.24 FAILED
==== asn-4.24 enum FAILED
==== Contents of test case:
binary scan [asn::asnEnumeration $i] H* result
list $i [string toupper $result]
---- Result was:
-8388609 0A05FFFF7FFFFF
---- Result should have been (exact matching):
-8388609 0A04FF7FFFFF
==== asn-4.24 FAILED
==== asn-2.26 integer FAILED
==== Contents of test case:
binary scan [asn::asnInteger $i] H* result
list $i [string toupper $result]
---- Result was:
-2147483648 0205FF80000000
---- Result should have been (exact matching):
-2147483648 020480000000
==== asn-2.26 FAILED
==== asn-4.26 enum FAILED
==== Contents of test case:
binary scan [asn::asnEnumeration $i] H* result
list $i [string toupper $result]
---- Result was:
-2147483648 0A05FF80000000
---- Result should have been (exact matching):
-2147483648 0A0480000000
==== asn-4.26 FAILED
==== asn-2.27 integer FAILED
==== Contents of test case:
binary scan [asn::asnInteger $i] H* result
list $i [string toupper $result]
---- Result was:
2147483647 0205007FFFFFFF
---- Result should have been (exact matching):
2147483647 02047FFFFFFF
==== asn-2.27 FAILED
==== asn-4.27 enum FAILED
==== Contents of test case:
binary scan [asn::asnEnumeration $i] H* result
list $i [string toupper $result]
---- Result was:
2147483647 0A05007FFFFFFF
---- Result should have been (exact matching):
2147483647 0A047FFFFFFF
==== asn-4.27 FAILED
| |||
| User Comments: |
dgp added on 2005-08-27 03:09:23:
Logged In: YES user_id=80530 Thanks for looking into it. The bug is in Tcl 8.5a4, now reported as 1274287. You'll want to keep an eye on it. mic42 added on 2005-08-27 02:05:42: Logged In: YES
user_id=302287
The tests check these branches. The if branches seem to not
trigger correctly and the value is formatted by the next
larger range with the wrong extra padding.
if {($number >= -8388608) && ($number < 8388608)} {
set numberb [expr {$number & 0xFFFF}]
set numbera [expr {($number >> 16) & 0xFF}]
return [binary format H2H2cS $tag 03 $numbera $numberb]
}
if {($number >= -2147483648) && ($number < 2147483648)} {
return [binary format H2H2I $tag 04 $number]
}
if {($number >= -549755813888) && ($number <
549755813888)} {
set numberb [expr {$number & 0xFFFFFFFF}]
set numbera [expr {($number >> 32) & 0xFF}]
return [binary format H2H2cI $tag 05 $numbera $numberb]
}
This is entirely strange..., kann someone please check that
if is sane on solaris..., basically this check fails:
set number 8388608
if {($number >= -2147483648) && ($number < 2147483648)} {
puts "ok"
} else {
puts "bad"
}
I do not have a solaris box to test on...
dgp added on 2005-08-26 01:07:18: Logged In: YES user_id=80530 failures don't happen on 64-bit system | |||
Home
Blog
Docs
Downloads
Tickets
Timeline
Branches
Tags
Wiki