Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/scripts/windows/test_task.bat
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ popd

rem prepare for snmp
set MIBDIRS=%DEPS_DIR%\share\mibs
sed -i "s/exec HexTest .*/exec HexTest cscript\.exe \/nologo %GITHUB_WORKSPACE:\=\/%\/ext\/snmp\/tests\/bigtest\.js/g" %GITHUB_WORKSPACE%\ext\snmp\tests\snmpd.conf
start %DEPS_DIR%\bin\snmpd.exe -C -c %GITHUB_WORKSPACE%\ext\snmp\tests\snmpd.conf -Ln

set PHP_BUILD_DIR=%PHP_BUILD_OBJ_DIR%\Release
Expand Down
3 changes: 3 additions & 0 deletions ext/snmp/tests/bigtest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
for (var i = 0; i < 32; i++) {
WScript.StdOut.Write("\x03\x02\x04\x09\x12\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17");
}
12 changes: 8 additions & 4 deletions ext/snmp/tests/bug64159.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ snmp
--SKIPIF--
<?php
require_once(__DIR__.'/skipif.inc');
if (PHP_OS_FAMILY === "Windows") die("xfail fails on Windows for unknown reasons");
?>
--ENV--
MIBS=noneXistent
Expand All @@ -18,10 +17,15 @@ require_once(__DIR__.'/snmp_include.inc');
snmp_set_quick_print(false);
snmp_set_valueretrieval(SNMP_VALUE_LIBRARY);

var_dump(("ab8283f948419b2d24d22f44a80b17d3" === md5(snmpget($hostname, $community, '.1.3.6.1.4.1.2021.8.1.101.1'))));

$ext_output = snmpget($hostname, $community, '.1.3.6.1.4.1.2021.8.1.101.1');
$md5 = md5($ext_output);
if ($md5 === "ab8283f948419b2d24d22f44a80b17d3") {
echo "okay\n";
} else {
echo $ext_output;
}
?>
--EXPECTF--
MIB search path: %s
Cannot find module (noneXistent): At line %d in (%s)
bool(true)
okay
Loading