PATH:
opt
/
alt
/
tests
/
alt-php51-pecl-igbinary_1.2.1-1.el8
/
tests
--TEST-- b0rked random data test --SKIPIF-- --FILE-- <?php error_reporting(E_ERROR | E_PARSE); if(!extension_loaded('igbinary')) { dl('igbinary.' . PHP_SHLIB_SUFFIX); } function test() { $serialized = igbinary_serialize(null); $serialized = substr($serialized, 0, -1); $length = mt_rand(1, 255); for ($i = 0; $i < $length; ++$i) { $serialized .= chr(mt_rand(0, 255)); } // if returned null everything is OK if (($unserialized = igbinary_unserialize($serialized)) === null) { return true; } // whole data is read? if ($serialized !== igbinary_serialize($unserialized)) { return true; } echo bin2hex($serialized), "\n"; var_dump($unserialized); return false; } mt_srand(0xface); for ($i = 0; $i < 100; ++$i) { if (!test()) break; } ?> --EXPECT--
[-] igbinary_043.phpt
[edit]
[-] igbinary_045.phpt
[edit]
[-] igbinary_045b.phpt
[edit]
[-] igbinary_004.phpt
[edit]
[-] igbinary_bug54662.phpt
[edit]
[-] igbinary_017.phpt
[edit]
[-] igbinary_032.phpt
[edit]
[-] igbinary_005.phpt
[edit]
[-] igbinary_044.phpt
[edit]
[-] igbinary_033.phpt
[edit]
[-] igbinary_040.phpt
[edit]
[-] igbinary_006.phpt
[edit]
[-] igbinary_046.phpt
[edit]
[-] igbinary_021.phpt
[edit]
[-] igbinary_034.phpt
[edit]
[-] igbinary_029.phpt
[edit]
[-] igbinary_014.phpt
[edit]
[-] igbinary_025.phpt
[edit]
[-] igbinary_016.phpt
[edit]
[-] igbinary_024.phpt
[edit]
[-] igbinary_009.phpt
[edit]
[-] igbinary_023.phpt
[edit]
[-] igbinary_012.phpt
[edit]
[-] igbinary_030.phpt
[edit]
[-] igbinary_018.phpt
[edit]
[-] igbinary_015.phpt
[edit]
[-] igbinary_042.phpt
[edit]
[-] igbinary_026b.phpt
[edit]
[-] igbinary_002.phpt
[edit]
[-] igbinary_031.phpt
[edit]
[-] igbinary_027.phpt
[edit]
[-] igbinary_020.phpt
[edit]
[-] igbinary_022.phpt
[edit]
[-] igbinary_015b.phpt
[edit]
[-] igbinary_007.phpt
[edit]
[+]
..
[-] igbinary_013.phpt
[edit]
[-] igbinary_010.phpt
[edit]
[-] igbinary_028.phpt
[edit]
[-] igbinary_001.phpt
[edit]
[-] igbinary_003.phpt
[edit]
[-] igbinary_008.phpt
[edit]
[-] igbinary_026.phpt
[edit]
[-] igbinary_047.phpt
[edit]