From e1f3249285c8f1296a40f626c921f943f6a90daf Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 29 Jan 2025 14:41:15 +0100 Subject: [PATCH] Fix snmp_session_error.phpt for 32bit machines (GH-17611) For `$retries === PHP_INT_MAX` there is no exception on 32bit machines. To avoid splitting the tests, or even not running it on 32bit, we work around. --- ext/snmp/tests/snmp_session_error.phpt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/snmp/tests/snmp_session_error.phpt b/ext/snmp/tests/snmp_session_error.phpt index f5e46ee4d936..523d357dcff6 100644 --- a/ext/snmp/tests/snmp_session_error.phpt +++ b/ext/snmp/tests/snmp_session_error.phpt @@ -35,6 +35,7 @@ try { } try { new SNMP(SNMP::VERSION_1, "$hostname:$port", $community, $timeout, PHP_INT_MAX); + echo PHP_INT_SIZE, "\n"; // no exception on 32bit machines } catch (\ValueError $e) { echo $e->getMessage(), PHP_EOL; } @@ -60,7 +61,7 @@ SNMP::__construct(): Argument #2 ($hostname) remote port must be between 0 and 6 SNMP::__construct(): Argument #2 ($hostname) remote port must be between 0 and 65535 SNMP::__construct(): Argument #2 ($hostname) length must be lower than 128 SNMP::__construct(): Argument #4 ($timeout) must be between -1 and %d -SNMP::__construct(): Argument #5 ($retries) must be between -1 and %d +%r(SNMP::__construct\(\): Argument #5 \(\$retries\) must be between -1 and %d|4)%r SNMP::__construct(): Argument #2 ($hostname) must not contain any null bytes SNMP::__construct(): Argument #3 ($community) must not be empty SNMP::__construct(): Argument #3 ($community) must not contain any null bytes