Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL)
Description
The main concern here is that the comparison might be used in regression tests, and the wrong behavior will cause false negatives – that is, regressions might stay unnoticed.
Run the test as
CHECK_NUMBER=<number of your choosing> perl ./mtr testname
|
MTR test |
if ($CHECK_NUMBER < 1) |
{
|
echo # $CHECK_NUMBER is less than 1; |
}
|
if ($CHECK_NUMBER > 1) |
{
|
echo # $CHECK_NUMBER is greater than 1; |
}
|
if ($CHECK_NUMBER == 1) |
{
|
echo # $CHECK_NUMBER is equal to 1; |
}
|
Results (on 10.2, but they appear the same everywhere):
# 2147483647 is greater than 1
|
# 2147483648 is less than 1
|
# 100000000000 is greater than 1
|
# 1000000000000 is less than 1
|
This is due to INT data type overflow. I am just confirming if it is expected to change the MTR .test files to use a larger range data type wherever needed, or a CLI option is required in running the tests?