diff --git a/.github/scripts/windows/test_task.bat b/.github/scripts/windows/test_task.bat index 93595e3c40395..b719d288e6688 100644 --- a/.github/scripts/windows/test_task.bat +++ b/.github/scripts/windows/test_task.bat @@ -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 diff --git a/ext/snmp/tests/bigtest.js b/ext/snmp/tests/bigtest.js new file mode 100644 index 0000000000000..d8b4fc9778039 --- /dev/null +++ b/ext/snmp/tests/bigtest.js @@ -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"); +} diff --git a/ext/snmp/tests/bug64159.phpt b/ext/snmp/tests/bug64159.phpt index e7cdbd5437796..622cb1ce019d7 100644 --- a/ext/snmp/tests/bug64159.phpt +++ b/ext/snmp/tests/bug64159.phpt @@ -7,7 +7,6 @@ snmp --SKIPIF-- --ENV-- MIBS=noneXistent @@ -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